4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
1
2
3
4
|
<template>
<div class="item-box common-info-box">
<div class="item-title">安排部署</div>
<div class="item-body">
|
51ff8a48
“wangming”
1
|
5
|
<div style="
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
6
7
8
9
|
background-color: #fff;
width: 100%;
height: 100%;
padding: 15px;
|
51ff8a48
“wangming”
1
|
10
|
">
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
11
|
<el-row :gutter="15" class="">
|
51ff8a48
“wangming”
1
|
12
13
|
<el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right"
:disabled="!!isDetail" :rules="rules">
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
14
15
|
<el-col :span="24" v-if="false">
<el-form-item label="主键" prop="id">
|
51ff8a48
“wangming”
1
|
16
|
<el-input v-model="dataForm.id" placeholder="请输入" clearable :style="{ width: '100%' }">
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
17
18
19
20
21
|
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" v-if="ncc.hasFormP('specialActionType')">
<el-form-item label="类型" prop="specialActionType">
|
51ff8a48
“wangming”
1
|
22
23
24
25
|
<el-select v-model="dataForm.specialActionType" placeholder="请选择" clearable required
:style="{ width: '100%' }">
<el-option v-for="(item, index) in specialActionTypeOptions" :key="index" :label="item.fullName"
:value="item.id"></el-option>
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
26
27
28
29
30
|
</el-select>
</el-form-item>
</el-col>
<el-col :span="24" v-if="ncc.hasFormP('title')">
<el-form-item label="标题" prop="title">
|
51ff8a48
“wangming”
1
|
31
|
<el-input v-model="dataForm.title" placeholder="请输入" clearable required :style="{ width: '100%' }">
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
32
33
34
35
36
|
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" v-if="ncc.hasFormP('content')">
<el-form-item label="内容" prop="content">
|
51ff8a48
“wangming”
1
|
37
38
|
<el-input v-model="dataForm.content" placeholder="请输入" show-word-limit :style="{ width: '100%' }"
type="textarea" :autosize="{ minRows: 4, maxRows: 4 }">
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
39
40
41
|
</el-input>
</el-form-item>
</el-col>
|
51ff8a48
“wangming”
1
|
42
|
<el-col :span="12">
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
43
|
<el-form-item label="发布时间" prop="releaseTime">
|
51ff8a48
“wangming”
1
|
44
45
|
<el-date-picker v-model="dataForm.releaseTime" placeholder="请选择" clearable :style="{ width: '100%' }"
type="datetime">
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
46
47
48
|
</el-date-picker>
</el-form-item>
</el-col>
|
51ff8a48
“wangming”
1
|
49
|
<el-col :span="12">
|
51ff8a48
“wangming”
1
|
50
51
52
53
54
55
56
|
<el-form-item label="发布周期" prop="releaseCount">
<el-select v-model="dataForm.releaseCycle" placeholder="请选择">
<el-option v-for="item in CycleOptions" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
|
8c466dd7
“wangming”
1
|
57
|
<el-col :span="12">
|
51ff8a48
“wangming”
1
|
58
59
60
61
62
63
64
|
<el-form-item label="自动发布" prop="isOpenRelease">
<el-radio-group v-model="dataForm.isOpenRelease">
<el-radio :label="true">是</el-radio>
<el-radio :label="false">否</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
|
8c466dd7
“wangming”
1
|
65
66
67
68
69
|
<el-col :span="12">
<el-form-item label="发布次数" prop="releaseCount">
<el-input-number v-model="dataForm.releaseCount" :min="1" :max="100"></el-input-number>
</el-form-item>
</el-col>
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
70
71
|
<el-col :span="24" v-if="ncc.hasFormP('annex')">
<el-form-item label="附件" prop="annex">
|
51ff8a48
“wangming”
1
|
72
|
<NCC-UploadFz v-model="dataForm.annex" :fileSize="5" sizeUnit="MB" :limit="9" buttonText="点击上传">
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
73
74
75
76
77
|
</NCC-UploadFz>
</el-form-item>
</el-col>
<el-col :span="24" v-if="ncc.hasFormP('communicationArea')">
<el-form-item label="传达区域" prop="communicationArea">
|
51ff8a48
“wangming”
1
|
78
79
80
|
<el-checkbox-group v-model="dataForm.communicationArea" :style="{}">
<el-checkbox v-for="(item, index) in communicationAreaOptions" :key="index" :label="item.id">{{
item.fullName }}</el-checkbox>
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
81
|
</el-checkbox-group>
|
51ff8a48
“wangming”
1
|
82
83
84
85
|
<div style="margin-top: 10px;">
<el-button size="mini" @click="selectAll">全选</el-button>
<el-button size="mini" @click="invertSelection">反选</el-button>
</div>
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
86
87
|
</el-form-item>
</el-col>
|
2bbff3d8
“wangming”
1
|
88
89
|
<el-col :span="24" v-if="ncc.hasFormP('communicationArea')">
<el-form-item label="填报表单" prop="communicationArea">
|
8c466dd7
“wangming”
1
|
90
91
92
93
94
|
<el-select v-model="dataForm.relationId" placeholder="请选择专项行动填报表单" style="margin-right: 10px;width: 300px;">
<el-option v-for="item in BaseList" :key="item.id" :label="item.fullName" :value="item.id">
</el-option>
</el-select>
<el-button size="mini" type="text" @click="dialogVisible = true">没有找到表单?点击设计表单</el-button>
|
2bbff3d8
“wangming”
1
|
95
96
|
</el-form-item>
</el-col>
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
97
98
|
<el-col :span="24" v-if="false">
<el-form-item label="状态" prop="state">
|
51ff8a48
“wangming”
1
|
99
|
<el-input v-model="dataForm.state" placeholder="请输入" clearable :style="{ width: '100%' }">
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
100
101
102
103
104
|
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" v-if="false">
<el-form-item label="创建用户" prop="creatorUserId">
|
51ff8a48
“wangming”
1
|
105
|
<el-input v-model="dataForm.creatorUserId" placeholder="系统自动生成" readonly>
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
106
107
108
109
110
|
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" v-if="false">
<el-form-item label="创建时间" prop="creatorTime">
|
51ff8a48
“wangming”
1
|
111
|
<el-input v-model="dataForm.creatorTime" placeholder="系统自动生成" readonly>
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
112
113
114
115
116
|
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" v-if="false">
<el-form-item label="修改用户" prop="lastModifyUserId">
|
51ff8a48
“wangming”
1
|
117
|
<el-input v-model="dataForm.lastModifyUserId" placeholder="系统自动生成" readonly>
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
118
119
120
121
122
|
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" v-if="false">
<el-form-item label="修改时间" prop="lastModifyTime">
|
51ff8a48
“wangming”
1
|
123
|
<el-input v-model="dataForm.lastModifyTime" placeholder="系统自动生成" readonly>
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
124
125
126
127
128
129
130
|
</el-input>
</el-form-item>
</el-col>
</el-form>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取 消</el-button>
|
51ff8a48
“wangming”
1
|
131
|
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button>
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
132
133
134
|
</span>
</div>
</div>
|
8c466dd7
“wangming”
1
|
135
|
<el-dialog title="专项行动表单设计" :visible.sync="dialogVisible" fullscreen @close="handleClose">
|
2bbff3d8
“wangming”
1
|
136
137
138
|
<iframe
:src="nestedPageUrl"
width="100%"
|
8c466dd7
“wangming”
1
|
139
|
:height="viewportHeight - 58 + 'px'"
|
2bbff3d8
“wangming”
1
|
140
141
142
143
|
frameborder="0"
allowfullscreen>
</iframe>
</el-dialog>
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
144
145
146
147
148
149
|
</div>
</template>
<script>
import request from "@/utils/request";
import { getDictionaryDataSelector } from "@/api/systemData/dictionary";
import { previewDataInterface } from "@/api/systemData/dataInterface";
|
2bbff3d8
“wangming”
1
|
150
151
|
import webDesignForm from './webDesign/Form.vue';
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
152
|
export default {
|
2bbff3d8
“wangming”
1
|
153
|
components: { webDesignForm },
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
154
155
156
157
158
159
|
props: [],
data() {
return {
loading: false,
visible: false,
isDetail: false,
|
2bbff3d8
“wangming”
1
|
160
161
|
dialogVisible: false,
viewportHeight: 0,
|
8e0317fe
“wangming”
1
|
162
163
|
nestedPageUrl:"http://8.130.38.56:8043/old/#/onlineDev/webDesign/indexNew",
// nestedPageUrl:"http://localhost:3000/#/onlineDev/webDesign/indexNew",
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
164
|
dataForm: {
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
165
166
167
168
|
id: undefined,
specialActionType: undefined,
title: undefined,
content: undefined,
|
51ff8a48
“wangming”
1
|
169
|
releaseTime: null,
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
170
171
172
173
174
175
176
|
annex: [],
communicationArea: [],
state: undefined,
creatorUserId: undefined,
creatorTime: undefined,
lastModifyUserId: undefined,
lastModifyTime: undefined,
|
2bbff3d8
“wangming”
1
|
177
|
isOpenRelease: false,
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
|
},
rules: {
specialActionType: [
{
required: true,
message: "请输入类型",
trigger: "change",
},
],
title: [
{
required: true,
message: "请输入标题",
trigger: "blur",
},
],
},
|
51ff8a48
“wangming”
1
|
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
|
CycleOptions: [
{
value: '天',
label: '天'
}, {
value: '月',
label: '月'
},
{
value: '季',
label: '季'
},
{
value: '年',
label: '年'
},
],
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
212
213
|
specialActionTypeOptions: [],
communicationAreaOptions: [],
|
8c466dd7
“wangming”
1
|
214
|
BaseList:[]
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
215
216
217
218
219
220
|
};
},
computed: {},
watch: {},
created() {
this.getspecialActionTypeOptions();
|
51ff8a48
“wangming”
1
|
221
|
this.getcommunicationAreaOptions();
|
8c466dd7
“wangming”
1
|
222
|
this.getDataForm();
|
2bbff3d8
“wangming”
1
|
223
224
225
|
this.updateViewportHeight();
// 监听窗口大小变化事件
window.addEventListener('resize', this.updateViewportHeight);
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
226
|
},
|
51ff8a48
“wangming”
1
|
227
|
mounted() { },
|
2bbff3d8
“wangming”
1
|
228
229
230
231
|
beforeDestroy() {
// 移除窗口大小变化事件监听器
window.removeEventListener('resize', this.updateViewportHeight);
},
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
232
|
methods: {
|
8c466dd7
“wangming”
1
|
233
234
235
236
237
|
handleClose() {
// 这里是对话框关闭后需要执行的代码
this.getDataForm();
// 例如,你可以在这里添加任何其他的逻辑
},
|
51ff8a48
“wangming”
1
|
238
239
240
241
242
243
244
245
246
|
//查询所有区县
getcommunicationAreaOptions() {
request({
url: "/extend/systeminformation/GetRegionList",
method: "get",
}).then((res) => {
this.communicationAreaOptions = res.data;
});
},
|
8c466dd7
“wangming”
1
|
247
248
249
250
251
252
253
254
255
256
|
//查询表单
getDataForm() {
request({
url: "/visualdev/Base?type=1",
method: "get",
}).then((res) => {
this.BaseList = res.data.list[0].children;
console.log(this.BaseList)
});
},
|
2bbff3d8
“wangming”
1
|
257
258
259
260
|
updateViewportHeight() {
// 获取页面显示高度
this.viewportHeight = window.innerHeight || document.documentElement.clientHeight;
},
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
261
262
263
264
265
|
getspecialActionTypeOptions() {
getDictionaryDataSelector("576310654982423813").then((res) => {
this.specialActionTypeOptions = res.data.list;
});
},
|
51ff8a48
“wangming”
1
|
266
267
268
269
270
271
272
273
|
selectAll() {
this.dataForm.communicationArea = this.communicationAreaOptions.map(option => option.id);
},
invertSelection() {
this.dataForm.communicationArea = this.communicationAreaOptions
.filter(option => !this.dataForm.communicationArea.includes(option.id))
.map(option => option.id);
},
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
|
goBack() {
this.$emit("refresh");
},
init(id, isDetail) {
this.dataForm.id = id || 0;
this.visible = true;
this.isDetail = isDetail || false;
this.$nextTick(() => {
this.$refs["elForm"].resetFields();
if (this.dataForm.id) {
request({
url: "/Extend/BaseSpecialAction/" + this.dataForm.id,
method: "get",
}).then((res) => {
this.dataForm = res.data;
if (!this.dataForm.annex) this.dataForm.annex = [];
if (!this.dataForm.communicationArea)
this.dataForm.communicationArea = [];
});
}
});
},
dataFormSubmit() {
this.$refs["elForm"].validate((valid) => {
if (valid) {
if (!this.dataForm.id) {
request({
url: `/Extend/BaseSpecialAction`,
method: "post",
data: this.dataForm,
}).then((res) => {
this.$message({
message: res.msg,
type: "success",
duration: 1000,
onClose: () => {
(this.visible = false), this.$emit("refresh", true);
},
});
});
} else {
request({
url: "/Extend/BaseSpecialAction/" + this.dataForm.id,
method: "PUT",
data: this.dataForm,
}).then((res) => {
this.$message({
message: res.msg,
type: "success",
duration: 1000,
onClose: () => {
this.visible = false;
this.$emit("refresh", true);
},
});
});
}
}
});
},
},
};
</script>
|
2bbff3d8
“wangming”
1
|
337
|
<style>
|
90b78640
monkeyhouyi
弹框padding
|
338
|
/* .el-dialog__body{padding: 0px !important;} */
|
2bbff3d8
“wangming”
1
|
339
|
</style>
|