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
50
51
52
53
|
<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>
|
2bbff3d8
“wangming”
1
|
54
|
<el-col :span="24">
|
51ff8a48
“wangming”
1
|
55
56
57
58
59
60
61
|
<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>
|
2bbff3d8
“wangming”
1
|
62
|
<el-col :span="24">
|
51ff8a48
“wangming”
1
|
63
64
65
66
67
68
69
|
<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>
|
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
90
91
92
|
<el-col :span="24" v-if="ncc.hasFormP('communicationArea')">
<el-form-item label="填报表单" prop="communicationArea">
<el-button size="mini" @click="dialogVisible = true">设计表单</el-button>
</el-form-item>
</el-col>
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
93
94
|
<el-col :span="24" v-if="false">
<el-form-item label="状态" prop="state">
|
51ff8a48
“wangming”
1
|
95
|
<el-input v-model="dataForm.state" placeholder="请输入" clearable :style="{ width: '100%' }">
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
96
97
98
99
100
|
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" v-if="false">
<el-form-item label="创建用户" prop="creatorUserId">
|
51ff8a48
“wangming”
1
|
101
|
<el-input v-model="dataForm.creatorUserId" placeholder="系统自动生成" readonly>
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
102
103
104
105
106
|
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" v-if="false">
<el-form-item label="创建时间" prop="creatorTime">
|
51ff8a48
“wangming”
1
|
107
|
<el-input v-model="dataForm.creatorTime" placeholder="系统自动生成" readonly>
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
108
109
110
111
112
|
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" v-if="false">
<el-form-item label="修改用户" prop="lastModifyUserId">
|
51ff8a48
“wangming”
1
|
113
|
<el-input v-model="dataForm.lastModifyUserId" placeholder="系统自动生成" readonly>
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
114
115
116
117
118
|
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" v-if="false">
<el-form-item label="修改时间" prop="lastModifyTime">
|
51ff8a48
“wangming”
1
|
119
|
<el-input v-model="dataForm.lastModifyTime" placeholder="系统自动生成" readonly>
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
120
121
122
123
124
125
126
|
</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
|
127
|
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button>
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
128
129
130
|
</span>
</div>
</div>
|
2bbff3d8
“wangming”
1
|
131
132
133
134
135
136
137
138
139
140
|
<el-dialog title="专项行动表单设计" :visible.sync="dialogVisible" fullscreen >
<!-- <webDesignForm ref="webDesignForm"></webDesignForm> -->
<iframe
:src="nestedPageUrl"
width="100%"
:height="viewportHeight - 110 + 'px'"
frameborder="0"
allowfullscreen>
</iframe>
</el-dialog>
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
141
142
143
144
145
146
|
</div>
</template>
<script>
import request from "@/utils/request";
import { getDictionaryDataSelector } from "@/api/systemData/dictionary";
import { previewDataInterface } from "@/api/systemData/dataInterface";
|
2bbff3d8
“wangming”
1
|
147
148
|
import webDesignForm from './webDesign/Form.vue';
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
149
|
export default {
|
2bbff3d8
“wangming”
1
|
150
|
components: { webDesignForm },
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
151
152
153
154
155
156
|
props: [],
data() {
return {
loading: false,
visible: false,
isDetail: false,
|
2bbff3d8
“wangming”
1
|
157
158
159
|
dialogVisible: false,
viewportHeight: 0,
nestedPageUrl:"http://8.130.38.56:8043/old/#/onlineDev/webDesign/indexNew",
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
160
|
dataForm: {
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
161
162
163
164
|
id: undefined,
specialActionType: undefined,
title: undefined,
content: undefined,
|
51ff8a48
“wangming”
1
|
165
|
releaseTime: null,
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
166
167
168
169
170
171
172
|
annex: [],
communicationArea: [],
state: undefined,
creatorUserId: undefined,
creatorTime: undefined,
lastModifyUserId: undefined,
lastModifyTime: undefined,
|
2bbff3d8
“wangming”
1
|
173
|
isOpenRelease: false,
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
|
},
rules: {
specialActionType: [
{
required: true,
message: "请输入类型",
trigger: "change",
},
],
title: [
{
required: true,
message: "请输入标题",
trigger: "blur",
},
],
},
|
51ff8a48
“wangming”
1
|
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
|
CycleOptions: [
{
value: '天',
label: '天'
}, {
value: '月',
label: '月'
},
{
value: '季',
label: '季'
},
{
value: '年',
label: '年'
},
],
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
208
209
210
211
212
213
214
215
|
specialActionTypeOptions: [],
communicationAreaOptions: [],
};
},
computed: {},
watch: {},
created() {
this.getspecialActionTypeOptions();
|
51ff8a48
“wangming”
1
|
216
|
this.getcommunicationAreaOptions();
|
2bbff3d8
“wangming”
1
|
217
218
219
|
this.updateViewportHeight();
// 监听窗口大小变化事件
window.addEventListener('resize', this.updateViewportHeight);
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
220
|
},
|
51ff8a48
“wangming”
1
|
221
|
mounted() { },
|
2bbff3d8
“wangming”
1
|
222
223
224
225
|
beforeDestroy() {
// 移除窗口大小变化事件监听器
window.removeEventListener('resize', this.updateViewportHeight);
},
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
226
|
methods: {
|
2bbff3d8
“wangming”
1
|
227
|
|
51ff8a48
“wangming”
1
|
228
229
230
231
232
233
234
235
236
|
//查询所有区县
getcommunicationAreaOptions() {
request({
url: "/extend/systeminformation/GetRegionList",
method: "get",
}).then((res) => {
this.communicationAreaOptions = res.data;
});
},
|
2bbff3d8
“wangming”
1
|
237
238
239
240
|
updateViewportHeight() {
// 获取页面显示高度
this.viewportHeight = window.innerHeight || document.documentElement.clientHeight;
},
|
4424f41c
monkeyhouyi
网信执法、清单管理静态页面
|
241
242
243
244
245
|
getspecialActionTypeOptions() {
getDictionaryDataSelector("576310654982423813").then((res) => {
this.specialActionTypeOptions = res.data.list;
});
},
|
51ff8a48
“wangming”
1
|
246
247
248
249
250
251
252
253
|
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
网信执法、清单管理静态页面
|
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
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
|
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
|
317
318
319
|
<style>
.el-dialog__body{padding: 0px !important;}
</style>
|