WZQ 1 год назад
Родитель
Сommit
a93deeb11c

+ 71 - 0
src/api/home/home.js

@@ -3,6 +3,12 @@ import { baseRequest } from '@/utils/request'
3 3
 const request = (url, ...arg) => baseRequest(`/dev/config/` + url, ...arg)
4 4
 const requestACC = (url, ...arg) => baseRequest(`/homePage/hmcarousel/` + url, ...arg)
5 5
 const requestIMG = (url, ...arg) => baseRequest(`/homePage/hmimagenews/` + url, ...arg)
6
+const requestBBQ = (url, ...arg) => baseRequest(`/homePage/hmsupervisioninspectionconfig/` + url, ...arg)
7
+const requestDDL = (url, ...arg) => baseRequest(`/homePage/hmrelatedwebsitesconfig/` + url, ...arg)
8
+const requestRRT = (url, ...arg) => baseRequest(`/homePage/hmgovernmentaffairsconfig/` + url, ...arg)
9
+const requestEEC = (url, ...arg) => baseRequest(`/homePage/hminteractionconfig/` + url, ...arg)
10
+
11
+//
6 12
 export default {
7 13
 	configPage(data) {
8 14
 		return request('page', data, 'get')
@@ -51,5 +57,70 @@ export default {
51 57
 	//del
52 58
 	IMGXWdelete(data) {
53 59
 		return requestIMG('delete', data, 'post')
60
+	},
61
+	//启用
62
+	IMGXWbatchUpdateStatus(data) {
63
+		return requestIMG('batchUpdateStatus', data, 'post')
64
+	},
65
+	//获取首页管理-监督检查模块配置表分页
66
+	JDJClist(data) {
67
+		return requestBBQ('page', data, 'get')
68
+	},
69
+	//add
70
+	JDJCadd(data) {
71
+		return requestBBQ('add', data, 'post')
72
+	},
73
+	// detail
74
+	JDJCdetail(data) {
75
+		return requestBBQ('detail', data, 'get')
76
+	},
77
+	//edit
78
+	JDJCedit(data) {
79
+		return requestBBQ('edit', data, 'post')
80
+	},
81
+	//del
82
+	JDJCdel(data) {
83
+		return requestBBQ('delete', data, 'post')
84
+	},
85
+	JDJCbatchUpdateStatus(data) {
86
+		return requestBBQ('batchUpdateStatus', data, 'post')
87
+	},
88
+	//获取首页管理-相关网站模块配置表分页
89
+	XIANGGUANlist(data) {
90
+		return requestDDL('page', data, 'get')
91
+	},
92
+	//add
93
+	XIANGGUANadd(data) {
94
+		return requestDDL('add', data, 'post')
95
+	},
96
+	//detail
97
+	XIANGGUANdetail(data) {
98
+		return requestDDL('detail', data, 'get')
99
+	},
100
+	//edit
101
+	XIANGGUANedit(data) {
102
+		return requestDDL('edit', data, 'post')
103
+	},
104
+	//del
105
+	XIANGGUANdelete(data) {
106
+		return requestDDL('delete', data, 'post')
107
+	},
108
+	XIANGGUANbatchUpdateStatus(data) {
109
+		return requestDDL('batchUpdateStatus', data, 'post')
110
+	},
111
+	// 政务公开模块配置
112
+	ZWGKlist(data) {
113
+		return requestRRT('getList', data, 'get')
114
+	},
115
+	// add
116
+	ZWGKadd(data) {
117
+		return requestRRT('disposition', data, 'post')
118
+	},
119
+	//互动交流模块配置表详情
120
+	HDJLlist(data) {
121
+		return requestEEC('page', data, 'get')
122
+	},
123
+	HDJLadd(data) {
124
+		return requestEEC('disposition', data, 'post')
54 125
 	}
55 126
 }

+ 72 - 17
src/views/home/Configuration/index.vue

@@ -7,10 +7,10 @@
7 7
 					<a-col :span="6">
8 8
 						<div>
9 9
 							<div class="box1">
10
-								<a-checkbox value="A"></a-checkbox>
10
+								<a-checkbox :value="1"></a-checkbox>
11 11
 								<div class="img_del">
12 12
 									<div class="img_svg"><img src="../../../../public/img/text_0.svg" alt="" /></div>
13
-									<div>领导信息</div>
13
+									<div>政府信息公开指南</div>
14 14
 								</div>
15 15
 							</div>
16 16
 						</div>
@@ -18,10 +18,10 @@
18 18
 					<a-col :span="6">
19 19
 						<div>
20 20
 							<div class="box1">
21
-								<a-checkbox value="B"></a-checkbox>
21
+								<a-checkbox :value="2"></a-checkbox>
22 22
 								<div class="img_del">
23 23
 									<div class="img_svg"><img src="../../../../public/img/text_1.svg" alt="" /></div>
24
-									<div>机构职能</div>
24
+									<div>政府信息公开制度</div>
25 25
 								</div>
26 26
 							</div>
27 27
 						</div>
@@ -29,10 +29,10 @@
29 29
 					<a-col :span="6">
30 30
 						<div>
31 31
 							<div class="box1">
32
-								<a-checkbox value="C"></a-checkbox>
32
+								<a-checkbox :value="3"></a-checkbox>
33 33
 								<div class="img_del">
34 34
 									<div class="img_svg"><img src="../../../../public/img/text_2.svg" alt="" /></div>
35
-									<div>信息公开指南</div>
35
+									<div>法定主动公开内容</div>
36 36
 								</div>
37 37
 							</div>
38 38
 						</div>
@@ -40,10 +40,10 @@
40 40
 					<a-col :span="6">
41 41
 						<div>
42 42
 							<div class="box1">
43
-								<a-checkbox value="D"></a-checkbox>
43
+								<a-checkbox :value="4"></a-checkbox>
44 44
 								<div class="img_del">
45 45
 									<div class="img_svg"><img src="../../../../public/img/text_5.svg" alt="" /></div>
46
-									<div>人事信息</div>
46
+									<div>政府信息公开年报</div>
47 47
 								</div>
48 48
 							</div>
49 49
 						</div>
@@ -51,10 +51,10 @@
51 51
 					<a-col :span="6">
52 52
 						<div>
53 53
 							<div class="box1">
54
-								<a-checkbox value="E"></a-checkbox>
54
+								<a-checkbox :value="5"></a-checkbox>
55 55
 								<div class="img_del">
56 56
 									<div class="img_svg"><img src="../../../../public/img/text_3.svg" alt="" /></div>
57
-									<div>文件通知</div>
57
+									<div>政策文件</div>
58 58
 								</div>
59 59
 							</div>
60 60
 						</div>
@@ -62,7 +62,7 @@
62 62
 					<a-col :span="6">
63 63
 						<div>
64 64
 							<div class="box1">
65
-								<a-checkbox value="F"></a-checkbox>
65
+								<a-checkbox :value="6"></a-checkbox>
66 66
 								<div class="img_del">
67 67
 									<div class="img_svg"><img src="../../../../public/img/text_4.svg" alt="" /></div>
68 68
 									<div>政策解读</div>
@@ -70,6 +70,39 @@
70 70
 							</div>
71 71
 						</div>
72 72
 					</a-col>
73
+					<a-col :span="6">
74
+						<div>
75
+							<div class="box1">
76
+								<a-checkbox :value="7"></a-checkbox>
77
+								<div class="img_del">
78
+									<div class="img_svg"><img src="../../../../public/img/text_4.svg" alt="" /></div>
79
+									<div>行政规范性文件</div>
80
+								</div>
81
+							</div>
82
+						</div>
83
+					</a-col>
84
+					<a-col :span="6">
85
+						<div>
86
+							<div class="box1">
87
+								<a-checkbox :value="8"></a-checkbox>
88
+								<div class="img_del">
89
+									<div class="img_svg"><img src="../../../../public/img/text_4.svg" alt="" /></div>
90
+									<div>依申请公开</div>
91
+								</div>
92
+							</div>
93
+						</div>
94
+					</a-col>
95
+					<a-col :span="6">
96
+						<div>
97
+							<div class="box1">
98
+								<a-checkbox :value="9"></a-checkbox>
99
+								<div class="img_del">
100
+									<div class="img_svg"><img src="../../../../public/img/text_4.svg" alt="" /></div>
101
+									<div>政府网站工作年报</div>
102
+								</div>
103
+							</div>
104
+						</div>
105
+					</a-col>
73 106
 				</a-row>
74 107
 			</a-checkbox-group>
75 108
 
@@ -78,8 +111,8 @@
78 111
 
79 112
 			<a-space class="search">
80 113
 				<div class="btnBox">
81
-					<a-button type="primary" class="primarySele"> 保存 </a-button>
82
-					<a-button class="primarySele snowy-buttom-left"> 提交 </a-button>
114
+					<a-button type="primary" class="primarySele" @click="del_add"> 保存 </a-button>
115
+					<a-button class="primarySele snowy-buttom-left" @click="del_add"> 提交 </a-button>
83 116
 				</div>
84 117
 			</a-space>
85 118
 		</a-card>
@@ -93,10 +126,32 @@
93 126
 	import { defineComponent } from 'vue'
94 127
 	import { message } from 'ant-design-vue'
95 128
 
96
-	const value = ref(['A'])
129
+	const value = ref([])
130
+	onMounted(() => {
131
+		list()
132
+	})
97 133
 
98
-	const del = (v) => {
99
-		console.log(v)
134
+	const list = async () => {
135
+		value.value = []
136
+		const res = await business.ZWGKlist()
137
+		value.value = res.map((item) => {
138
+			return item.type
139
+		})
140
+	}
141
+
142
+	const del = (v) => {}
143
+	const code = ref([])
144
+	const del_add = async () => {
145
+		code.value = value.value.map((item) => {
146
+			return { type: item }
147
+		})
148
+		if (code.value.length >= 7) {
149
+			message.info('最多选6个')
150
+		} else {
151
+			const res = await business.ZWGKadd(code.value)
152
+			message.success('操作成功')
153
+			list()
154
+		}
100 155
 	}
101 156
 </script>
102 157
 <style lang="less" scoped>
@@ -106,7 +161,7 @@
106 161
 	.box1 {
107 162
 		width: 250px;
108 163
 		height: 250px;
109
-		.img_del {
164
+		.img_del_add {
110 165
 			border: 1px solid #e4e4e4;
111 166
 			width: 160px;
112 167
 			height: 160px;

+ 31 - 8
src/views/home/Interactive/index.vue

@@ -7,7 +7,7 @@
7 7
 					<a-col :span="6">
8 8
 						<div>
9 9
 							<div class="box1">
10
-								<a-checkbox value="A"></a-checkbox>
10
+								<a-checkbox :value="1"></a-checkbox>
11 11
 								<div class="img_del">
12 12
 									<div class="img_svg"><img src="../../../../public/img/text01.svg" alt="" /></div>
13 13
 									<div>领导信箱</div>
@@ -18,7 +18,7 @@
18 18
 					<a-col :span="6">
19 19
 						<div>
20 20
 							<div class="box1">
21
-								<a-checkbox value="B"></a-checkbox>
21
+								<a-checkbox :value="2"></a-checkbox>
22 22
 								<div class="img_del">
23 23
 									<div class="img_svg"><img src="../../../../public/img/text02.svg" alt="" /></div>
24 24
 									<div>信访举报</div>
@@ -29,7 +29,7 @@
29 29
 					<a-col :span="6">
30 30
 						<div>
31 31
 							<div class="box1">
32
-								<a-checkbox value="C"></a-checkbox>
32
+								<a-checkbox :value="3"></a-checkbox>
33 33
 								<div class="img_del">
34 34
 									<div class="img_svg"><img src="../../../../public/img/text03.svg" alt="" /></div>
35 35
 									<div>民意征集</div>
@@ -45,8 +45,8 @@
45 45
 
46 46
 			<a-space class="search">
47 47
 				<div class="btnBox">
48
-					<a-button type="primary" class="primarySele"> 保存 </a-button>
49
-					<a-button class="primarySele snowy-buttom-left"> 提交 </a-button>
48
+					<a-button type="primary" class="primarySele" @click="del_add"> 保存 </a-button>
49
+					<a-button class="primarySele snowy-buttom-left" @click="del_add"> 提交 </a-button>
50 50
 				</div>
51 51
 			</a-space>
52 52
 		</a-card>
@@ -60,10 +60,33 @@
60 60
 	import { defineComponent } from 'vue'
61 61
 	import { message } from 'ant-design-vue'
62 62
 
63
-	const value = ref(['A'])
63
+	const value = ref([])
64 64
 
65
-	const del = (v) => {
66
-		console.log(v)
65
+	onMounted(() => {
66
+		list()
67
+	})
68
+
69
+	const list = async () => {
70
+		value.value = []
71
+		const res = await business.HDJLlist({ current: 1, size: 10 })
72
+		value.value = res.records.map((item) => {
73
+			return item.type
74
+		})
75
+	}
76
+
77
+	const del = (v) => {}
78
+	const code = ref([])
79
+	const del_add = async () => {
80
+		code.value = value.value.map((item) => {
81
+			return { type: item }
82
+		})
83
+		// if (code.value.length >= 7) {
84
+		// 	message.info('最多选6个')
85
+		// } else {
86
+		const res = await business.HDJLadd(code.value)
87
+		message.success('操作成功')
88
+		list()
89
+		// }
67 90
 	}
68 91
 </script>
69 92
 <style lang="less" scoped>

+ 34 - 60
src/views/home/Related/form.vue

@@ -1,23 +1,15 @@
1 1
 <template>
2 2
 	<xn-form-container :title="'基本设置'" :width="800" :visible="visible" :destroy-on-close="true" @close="onClose">
3
-		<a-form
4
-			:model="formState"
5
-			ref="formStateRef"
6
-			:rules="formStateRules"
7
-			name="basic"
8
-			autocomplete="off"
9
-			@finish="onFinish"
10
-			@finishFailed="onFinishFailed"
11
-		>
3
+		<a-form :model="formState" ref="formStateRef" :rules="formStateRules" name="basic" autocomplete="off">
12 4
 			<!-- <div class="form"> -->
13 5
 			<a-row>
14 6
 				<a-col :span="24">
15
-					<a-form-item class="form-item" label="模块名称" name="systemName" :label-col="{ span: 3 }">
7
+					<a-form-item class="form-item" label="模块名称" name="moduleName" :label-col="{ span: 3 }">
16 8
 						<a-input
17 9
 							placeholder="请输入模块名称"
18 10
 							style="width: 500px"
19 11
 							:disabled="disabled"
20
-							v-model:value="formState.systemName"
12
+							v-model:value="formState.moduleName"
21 13
 						/>
22 14
 					</a-form-item>
23 15
 				</a-col>
@@ -26,12 +18,12 @@
26 18
 
27 19
 			<a-row>
28 20
 				<a-col :span="24">
29
-					<a-form-item class="form-item" label="链接地址" name="systemName" :label-col="{ span: 3 }">
21
+					<a-form-item class="form-item" label="链接地址" name="linkAddress" :label-col="{ span: 3 }">
30 22
 						<a-textarea
31 23
 							placeholder="请输入链接地址"
32 24
 							style="width: 500px"
33 25
 							:disabled="disabled"
34
-							v-model:value="formState.systemName"
26
+							v-model:value="formState.linkAddress"
35 27
 						/>
36 28
 					</a-form-item>
37 29
 				</a-col>
@@ -40,8 +32,8 @@
40 32
 
41 33
 			<a-form-item>
42 34
 				<div class="item-submit">
43
-					<a-button class="btn1" :disabled="disabled" html-type="submit" @click="onClose">提交</a-button>
44
-					<a-button class="btn1" :disabled="disabled" type="primary" html-type="submit">保存</a-button>
35
+					<a-button class="btn1" :disabled="disabled" @click="onFinish(2)">提交</a-button>
36
+					<a-button class="btn1" :disabled="disabled" type="primary" @click="onFinish(1)">保存</a-button>
45 37
 				</div>
46 38
 			</a-form-item>
47 39
 		</a-form>
@@ -72,29 +64,25 @@
72 64
 					detail(row.id)
73 65
 				}
74 66
 			}
67
+			const rest = () => {
68
+				for (let key in formState.value) {
69
+					formState.value[key] = ''
70
+				}
71
+			}
75 72
 			const detail = async (v) => {
76
-				const res = await {}({ id: v })
73
+				const res = await business.XIANGGUANdetail({ id: v })
77 74
 				formState.value = res
78
-				formState.value.attachment = res.attachment.split(',')
79
-				formState.value.createUser = res.createUserName
80
-				console.log(formState.value)
81 75
 			}
82 76
 			const onClose = () => {
83 77
 				visible.value = false
78
+				rest()
84 79
 			}
85 80
 			watch(
86 81
 				() => visible.value,
87 82
 				(newVal) => {
88 83
 					if (!newVal) {
89 84
 						setTimeout(() => {
90
-							formState.value = {
91
-								systemName: '',
92
-								createUser: JSON.parse(localStorage.getItem('USER_INFO')).name,
93
-								publishTime: '',
94
-								publishContent: '',
95
-								attachment: '',
96
-								id: ''
97
-							}
85
+							rest()
98 86
 						}, 0)
99 87
 					}
100 88
 				},
@@ -102,49 +90,39 @@
102 90
 			)
103 91
 
104 92
 			const formState = ref({
105
-				systemName: '',
106
-				createUser: JSON.parse(localStorage.getItem('USER_INFO')).name,
107
-				publishTime: '',
108
-				publishContent: '',
109
-				attachment: '',
110
-				id: ''
93
+				moduleName: '',
94
+				linkAddress: '',
95
+				status: 0
111 96
 			})
112 97
 			const formStateRules = ref({
113
-				systemName: [{ required: true, message: '请填写!', trigger: 'blur' }],
114
-				publishTime: [{ required: true, message: '请填写!', trigger: 'change' }],
115
-				attachment: [{ required: true, message: '请填写!', trigger: 'change' }]
98
+				// systemName: [{ required: true, message: '请填写!', trigger: 'blur' }],
99
+				// publishTime: [{ required: true, message: '请填写!', trigger: 'change' }],
100
+				// attachment: [{ required: true, message: '请填写!', trigger: 'change' }]
116 101
 			})
117 102
 			const formStateRef = ref(null)
118 103
 
119
-			const onFinish = async (values) => {
120
-				formState.value.attachment = values.attachment.join(',')
121
-				await handleAdd(formState.value)
122
-				emit('change')
123
-				formState.value = {
124
-					systemName: '',
125
-					createUser: '',
126
-					publishTime: '',
127
-					publishContent: '',
128
-					attachment: '',
129
-					id: ''
130
-				}
131
-				onClose()
104
+			const onFinish = async (status) => {
105
+				formStateRef.value.validate().then(async () => {
106
+					try {
107
+						formState.value.status = status
108
+						await handleAdd(formState.value)
109
+						emit('change')
110
+						onClose()
111
+					} catch (err) {
112
+						console.log(err)
113
+					}
114
+				})
132 115
 			}
133 116
 
134 117
 			const handleAdd = async (val) => {
135 118
 				if (records.value == 'edit') {
136
-					console.log(records.value)
137
-					const res = await {}(val)
119
+					const res = await business.XIANGGUANedit(val)
138 120
 				} else {
139
-					const res = await {}(val)
121
+					const res = await business.XIANGGUANadd(val)
140 122
 					console.log('add')
141 123
 				}
142 124
 			}
143 125
 
144
-			const delADD = () => {
145
-				formStateRef.value.validate().then(() => {})
146
-			}
147
-
148 126
 			const onFinishFailed = (errorInfo) => {
149 127
 				console.log('Failed:', errorInfo)
150 128
 			}
@@ -160,10 +138,6 @@
160 138
 			}
161 139
 
162 140
 			return {
163
-				beforeUpload,
164
-				uploadDataList,
165
-				changeUpload,
166
-				delADD,
167 141
 				formStateRef,
168 142
 				formStateRules,
169 143
 				formState,

+ 31 - 27
src/views/home/Related/index.vue

@@ -5,9 +5,9 @@
5 5
 			<a-space class="search">
6 6
 				<div class="silt-title">
7 7
 					<span style="width: 70px; margin-right: 8px; text-align: right; display: block; line-height: 30px">{{
8
-						'功能名称'
8
+						'模块名称'
9 9
 					}}</span>
10
-					<a-input style="width: 220px" v-model:value="SearchFormDel.unitName" placeholder="请输入" />
10
+					<a-input style="width: 220px" v-model:value="SearchFormDel.moduleName" placeholder="请输入" />
11 11
 				</div>
12 12
 				<div class="btnBox">
13 13
 					<a-button type="primary" class="primarySele" @click="Search"> 查询 </a-button>
@@ -20,10 +20,7 @@
20 20
 						:loading="state.loading"
21 21
 						@click="start"
22 22
 					>
23
-						批量共享
24
-					</a-button>
25
-					<a-button class="btnl colro" type="primary" :disabled="!hasSelected" :loading="state.loading" @click="start">
26
-						批量禁用
23
+						批量操作(启用/禁用)
27 24
 					</a-button>
28 25
 				</div>
29 26
 			</a-space>
@@ -38,12 +35,21 @@
38 35
 				:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }"
39 36
 			>
40 37
 				<template #bodyCell="{ column, record }">
41
-					<template v-if="column.dataIndex === 'isShare'">
38
+					<template v-if="column.dataIndex === 'status'">
42 39
 						<div class="switch_del">
43 40
 							<a-switch
44
-								:checked="record.isShare == '0' ? false : true"
45
-								:checked-children="'是'"
46
-								:un-checked-children="'否'"
41
+								v-if="record.status !== 1"
42
+								:checked="record.status == 2 ? true : false"
43
+								:checked-children="'启用'"
44
+								:un-checked-children="'禁用'"
45
+								@change="handleSwitchChange(record)"
46
+								size="default"
47
+							/>
48
+							<a-switch
49
+								v-if="record.status == 1"
50
+								:checked="record.status == 1 ? false : true"
51
+								:checked-children="'启用'"
52
+								:un-checked-children="'保存'"
47 53
 								@change="handleSwitchChange(record)"
48 54
 								size="default"
49 55
 							/>
@@ -52,7 +58,6 @@
52 58
 					<template v-if="column.key === '操作'">
53 59
 						<a-button type="link" @click="onView('view', record)">查看</a-button>
54 60
 						<a-button type="link" @click="onView('edit', record)">编辑</a-button>
55
-						<a-button type="link">状态</a-button>
56 61
 						<a-popconfirm title="确定要删除吗?" @confirm="onView('del', record)">
57 62
 							<a-button type="link">删除</a-button>
58 63
 						</a-popconfirm>
@@ -85,21 +90,22 @@
85 90
 				return `${index + 1}`
86 91
 			}
87 92
 		},
88
-		{ title: '功能名称', align: 'center', dataIndex: 'unitName' },
89
-		{ title: '链接地址', align: 'center', dataIndex: 'creditLevel' },
90
-		{ title: '状态', align: 'center', dataIndex: 'assessResult' },
91
-		{ title: '修改日期', align: 'center', dataIndex: 'assessResultDepict' },
92
-		{ title: '发布人', align: 'center', dataIndex: 'isShare' },
93
+		{ title: '模块名称', align: 'center', dataIndex: 'moduleName' },
94
+		{ title: '链接地址', align: 'center', dataIndex: 'linkAddress' },
95
+		{ title: '状态', align: 'center', dataIndex: 'status' },
96
+		{ title: '修改日期', align: 'center', dataIndex: 'updateTime' },
97
+		{ title: '发布人', align: 'center', dataIndex: 'createUser' },
93 98
 		{ title: '操作', align: 'center', key: '操作' }
94 99
 	]
95 100
 
96 101
 	//共享
97 102
 	const handleSwitchChange = async (v) => {
98
-		// console.log(v)
99
-		if (v.isShare == 1) {
100
-			const res = await {}([{ id: v.id, isShare: 0 }])
101
-		} else {
102
-			const res = await {}([{ id: v.id, isShare: 1 }])
103
+		if (v.status == 1) {
104
+			const res = await business.XIANGGUANbatchUpdateStatus([{ id: v.id, status: 2 }])
105
+		} else if (v.status == 2) {
106
+			const res = await business.XIANGGUANbatchUpdateStatus([{ id: v.id, status: 3 }])
107
+		} else if (v.status == 3) {
108
+			const res = await business.XIANGGUANbatchUpdateStatus([{ id: v.id, status: 2 }])
103 109
 		}
104 110
 		message.success('操作成功')
105 111
 		await onSearch()
@@ -112,9 +118,10 @@
112 118
 	const hasSelected = computed(() => state.selectedRowKeys.length > 0)
113 119
 	const start = async () => {
114 120
 		state.loading = true
115
-		const res = await {}(del.value)
121
+		const res = await business.XIANGGUANbatchUpdateStatus(del.value)
116 122
 		setTimeout(() => {
117 123
 			state.loading = false
124
+			state.selectedRowKeys = []
118 125
 			message.success('操作成功')
119 126
 			onSearch()
120 127
 		}, 300)
@@ -127,18 +134,15 @@
127 134
 		del.value = state.selectedRowKeys.map((item) => {
128 135
 			return {
129 136
 				id: item.id,
130
-				isShare: 1
137
+				status: item.status === 1 ? 2 : item.status === 2 ? 3 : 2
131 138
 			}
132 139
 		})
133 140
 		console.log(del.value)
134 141
 	}
135 142
 
136 143
 	const { DEl, change, tableData, onSearch, handlePageChange, pagination, Search, onReset, SearchFormDel } =
137
-		listPagination({ unitName: '' }, business.configPage, {}, { isEntAppQuery: 1, sortOrder: 'ASCEND' })
144
+		listPagination({ moduleName: '' }, business.XIANGGUANlist, business.XIANGGUANdelete, { sortOrder: 'ASCEND' })
138 145
 
139
-	setTimeout(() => {
140
-		tableData.value = [{ unitName: '33' }]
141
-	}, 900)
142 146
 	const onView = (record, row) => {
143 147
 		switch (record) {
144 148
 			case 'add':

+ 34 - 57
src/views/home/Supervision/form.vue

@@ -1,23 +1,15 @@
1 1
 <template>
2 2
 	<xn-form-container :title="'基本设置'" :width="800" :visible="visible" :destroy-on-close="true" @close="onClose">
3
-		<a-form
4
-			:model="formState"
5
-			ref="formStateRef"
6
-			:rules="formStateRules"
7
-			name="basic"
8
-			autocomplete="off"
9
-			@finish="onFinish"
10
-			@finishFailed="onFinishFailed"
11
-		>
3
+		<a-form :model="formState" ref="formStateRef" :rules="formStateRules" name="basic" autocomplete="off">
12 4
 			<!-- <div class="form"> -->
13 5
 			<a-row>
14 6
 				<a-col :span="24">
15
-					<a-form-item class="form-item" label="功能名称" name="systemName" :label-col="{ span: 3 }">
7
+					<a-form-item class="form-item" label="功能名称" name="functionName" :label-col="{ span: 3 }">
16 8
 						<a-input
17 9
 							placeholder="请输入功能名称"
18 10
 							style="width: 500px"
19 11
 							:disabled="disabled"
20
-							v-model:value="formState.systemName"
12
+							v-model:value="formState.functionName"
21 13
 						/>
22 14
 					</a-form-item>
23 15
 				</a-col>
@@ -26,12 +18,12 @@
26 18
 
27 19
 			<a-row>
28 20
 				<a-col :span="24">
29
-					<a-form-item class="form-item" label="链接地址" name="systemName" :label-col="{ span: 3 }">
21
+					<a-form-item class="form-item" label="链接地址" name="linkAddress" :label-col="{ span: 3 }">
30 22
 						<a-textarea
31 23
 							placeholder="请输入链接地址"
32 24
 							style="width: 500px"
33 25
 							:disabled="disabled"
34
-							v-model:value="formState.systemName"
26
+							v-model:value="formState.linkAddress"
35 27
 						/>
36 28
 					</a-form-item>
37 29
 				</a-col>
@@ -40,8 +32,8 @@
40 32
 
41 33
 			<a-form-item>
42 34
 				<div class="item-submit">
43
-					<a-button class="btn1" :disabled="disabled" html-type="submit" @click="onClose">提交</a-button>
44
-					<a-button class="btn1" :disabled="disabled" type="primary" html-type="submit">保存</a-button>
35
+					<a-button class="btn1" :disabled="disabled" @click="onFinish(2)">提交</a-button>
36
+					<a-button class="btn1" :disabled="disabled" type="primary" @click="onFinish(1)">保存</a-button>
45 37
 				</div>
46 38
 			</a-form-item>
47 39
 		</a-form>
@@ -72,29 +64,25 @@
72 64
 					detail(row.id)
73 65
 				}
74 66
 			}
67
+			const rest = () => {
68
+				for (let key in formState.value) {
69
+					formState.value[key] = ''
70
+				}
71
+			}
75 72
 			const detail = async (v) => {
76
-				const res = await {}({ id: v })
73
+				const res = await business.JDJCdetail({ id: v })
77 74
 				formState.value = res
78
-				formState.value.attachment = res.attachment.split(',')
79
-				formState.value.createUser = res.createUserName
80
-				console.log(formState.value)
81 75
 			}
82 76
 			const onClose = () => {
83 77
 				visible.value = false
78
+				rest()
84 79
 			}
85 80
 			watch(
86 81
 				() => visible.value,
87 82
 				(newVal) => {
88 83
 					if (!newVal) {
89 84
 						setTimeout(() => {
90
-							formState.value = {
91
-								systemName: '',
92
-								createUser: JSON.parse(localStorage.getItem('USER_INFO')).name,
93
-								publishTime: '',
94
-								publishContent: '',
95
-								attachment: '',
96
-								id: ''
97
-							}
85
+							rest()
98 86
 						}, 0)
99 87
 					}
100 88
 				},
@@ -102,49 +90,39 @@
102 90
 			)
103 91
 
104 92
 			const formState = ref({
105
-				systemName: '',
106
-				createUser: JSON.parse(localStorage.getItem('USER_INFO')).name,
107
-				publishTime: '',
108
-				publishContent: '',
109
-				attachment: '',
110
-				id: ''
93
+				functionName: '',
94
+				linkAddress: '',
95
+				status: 0
111 96
 			})
112 97
 			const formStateRules = ref({
113
-				systemName: [{ required: true, message: '请填写!', trigger: 'blur' }],
114
-				publishTime: [{ required: true, message: '请填写!', trigger: 'change' }],
115
-				attachment: [{ required: true, message: '请填写!', trigger: 'change' }]
98
+				// systemName: [{ required: true, message: '请填写!', trigger: 'blur' }],
99
+				// publishTime: [{ required: true, message: '请填写!', trigger: 'change' }],
100
+				// attachment: [{ required: true, message: '请填写!', trigger: 'change' }]
116 101
 			})
117 102
 			const formStateRef = ref(null)
118 103
 
119
-			const onFinish = async (values) => {
120
-				formState.value.attachment = values.attachment.join(',')
121
-				await handleAdd(formState.value)
122
-				emit('change')
123
-				formState.value = {
124
-					systemName: '',
125
-					createUser: '',
126
-					publishTime: '',
127
-					publishContent: '',
128
-					attachment: '',
129
-					id: ''
130
-				}
131
-				onClose()
104
+			const onFinish = async (status) => {
105
+				formStateRef.value.validate().then(async () => {
106
+					try {
107
+						formState.value.status = status
108
+						await handleAdd(formState.value)
109
+						emit('change')
110
+						onClose()
111
+					} catch (err) {
112
+						console.log(err)
113
+					}
114
+				})
132 115
 			}
133 116
 
134 117
 			const handleAdd = async (val) => {
135 118
 				if (records.value == 'edit') {
136
-					console.log(records.value)
137
-					const res = await {}(val)
119
+					const res = await business.JDJCedit(val)
138 120
 				} else {
139
-					const res = await {}(val)
121
+					const res = await business.JDJCadd(val)
140 122
 					console.log('add')
141 123
 				}
142 124
 			}
143 125
 
144
-			const delADD = () => {
145
-				formStateRef.value.validate().then(() => {})
146
-			}
147
-
148 126
 			const onFinishFailed = (errorInfo) => {
149 127
 				console.log('Failed:', errorInfo)
150 128
 			}
@@ -163,7 +141,6 @@
163 141
 				beforeUpload,
164 142
 				uploadDataList,
165 143
 				changeUpload,
166
-				delADD,
167 144
 				formStateRef,
168 145
 				formStateRules,
169 146
 				formState,

+ 34 - 29
src/views/home/Supervision/index.vue

@@ -5,18 +5,19 @@
5 5
 			<a-space class="search">
6 6
 				<div class="silt-title">
7 7
 					<span style="width: 70px; margin-right: 8px; text-align: right; display: block; line-height: 30px">{{
8
-						'标题'
8
+						'功能名称'
9 9
 					}}</span>
10
-					<a-input style="width: 220px" v-model:value="SearchFormDel.unitName" placeholder="请输入" />
10
+					<a-input style="width: 220px" v-model:value="SearchFormDel.functionName" placeholder="请输入" />
11 11
 				</div>
12 12
 				<div class="silt-title">
13 13
 					<span style="width: 70px; margin-right: 8px; text-align: right; display: block; line-height: 30px">{{
14 14
 						'状态'
15 15
 					}}</span>
16 16
 
17
-					<a-select style="width: 220px" v-model:value="SearchFormDel.unitName">
18
-						<a-select-option :value="1">禁用</a-select-option>
17
+					<a-select style="width: 220px" v-model:value="SearchFormDel.status">
18
+						<a-select-option :value="3">禁用</a-select-option>
19 19
 						<a-select-option :value="2">启用</a-select-option>
20
+						<a-select-option :value="1">保存</a-select-option>
20 21
 					</a-select>
21 22
 				</div>
22 23
 				<div class="btnBox">
@@ -30,10 +31,7 @@
30 31
 						:loading="state.loading"
31 32
 						@click="start"
32 33
 					>
33
-						批量共享
34
-					</a-button>
35
-					<a-button class="btnl colro" type="primary" :disabled="!hasSelected" :loading="state.loading" @click="start">
36
-						批量禁用
34
+						批量操作(启用/禁用)
37 35
 					</a-button>
38 36
 				</div>
39 37
 			</a-space>
@@ -48,12 +46,21 @@
48 46
 				:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }"
49 47
 			>
50 48
 				<template #bodyCell="{ column, record }">
51
-					<template v-if="column.dataIndex === 'isShare'">
49
+					<template v-if="column.dataIndex === 'status'">
52 50
 						<div class="switch_del">
53 51
 							<a-switch
54
-								:checked="record.isShare == '0' ? false : true"
55
-								:checked-children="'是'"
56
-								:un-checked-children="'否'"
52
+								v-if="record.status !== 1"
53
+								:checked="record.status == 2 ? true : false"
54
+								:checked-children="'启用'"
55
+								:un-checked-children="'禁用'"
56
+								@change="handleSwitchChange(record)"
57
+								size="default"
58
+							/>
59
+							<a-switch
60
+								v-if="record.status == 1"
61
+								:checked="record.status == 1 ? false : true"
62
+								:checked-children="'启用'"
63
+								:un-checked-children="'保存'"
57 64
 								@change="handleSwitchChange(record)"
58 65
 								size="default"
59 66
 							/>
@@ -62,7 +69,6 @@
62 69
 					<template v-if="column.key === '操作'">
63 70
 						<a-button type="link" @click="onView('view', record)">查看</a-button>
64 71
 						<a-button type="link" @click="onView('edit', record)">编辑</a-button>
65
-						<a-button type="link">状态</a-button>
66 72
 						<a-popconfirm title="确定要删除吗?" @confirm="onView('del', record)">
67 73
 							<a-button type="link">删除</a-button>
68 74
 						</a-popconfirm>
@@ -95,21 +101,22 @@
95 101
 				return `${index + 1}`
96 102
 			}
97 103
 		},
98
-		{ title: '功能名称', align: 'center', dataIndex: 'unitName' },
99
-		{ title: '链接地址', align: 'center', dataIndex: 'creditLevel' },
100
-		{ title: '状态', align: 'center', dataIndex: 'assessResult' },
101
-		{ title: '修改日期', align: 'center', dataIndex: 'assessResultDepict' },
102
-		{ title: '发布人', align: 'center', dataIndex: 'isShare' },
104
+		{ title: '功能名称', align: 'center', dataIndex: 'functionName' },
105
+		{ title: '链接地址', align: 'center', dataIndex: 'linkAddress' },
106
+		{ title: '状态', align: 'center', dataIndex: 'status' },
107
+		{ title: '修改日期', align: 'center', dataIndex: 'createTime' },
108
+		{ title: '发布人', align: 'center', dataIndex: 'createUser' },
103 109
 		{ title: '操作', align: 'center', key: '操作' }
104 110
 	]
105 111
 
106 112
 	//共享
107 113
 	const handleSwitchChange = async (v) => {
108
-		// console.log(v)
109
-		if (v.isShare == 1) {
110
-			const res = await {}([{ id: v.id, isShare: 0 }])
111
-		} else {
112
-			const res = await {}([{ id: v.id, isShare: 1 }])
114
+		if (v.status == 1) {
115
+			const res = await business.JDJCbatchUpdateStatus([{ id: v.id, status: 2 }])
116
+		} else if (v.status == 2) {
117
+			const res = await business.JDJCbatchUpdateStatus([{ id: v.id, status: 3 }])
118
+		} else if (v.status == 3) {
119
+			const res = await business.JDJCbatchUpdateStatus([{ id: v.id, status: 2 }])
113 120
 		}
114 121
 		message.success('操作成功')
115 122
 		await onSearch()
@@ -122,7 +129,8 @@
122 129
 	const hasSelected = computed(() => state.selectedRowKeys.length > 0)
123 130
 	const start = async () => {
124 131
 		state.loading = true
125
-		const res = await {}(del.value)
132
+		state.selectedRowKeys = []
133
+		const res = await business.JDJCbatchUpdateStatus(del.value)
126 134
 		setTimeout(() => {
127 135
 			state.loading = false
128 136
 			message.success('操作成功')
@@ -137,18 +145,15 @@
137 145
 		del.value = state.selectedRowKeys.map((item) => {
138 146
 			return {
139 147
 				id: item.id,
140
-				isShare: 1
148
+				status: item.status === 1 ? 2 : item.status === 2 ? 3 : 2
141 149
 			}
142 150
 		})
143 151
 		console.log(del.value)
144 152
 	}
145 153
 
146 154
 	const { DEl, change, tableData, onSearch, handlePageChange, pagination, Search, onReset, SearchFormDel } =
147
-		listPagination({ unitName: '' }, business.configPage, {}, { isEntAppQuery: 1, sortOrder: 'ASCEND' })
155
+		listPagination({ functionName: '', status: '' }, business.JDJClist, business.JDJCdel, { sortOrder: 'ASCEND' })
148 156
 
149
-	setTimeout(() => {
150
-		tableData.value = [{ unitName: '33' }]
151
-	}, 900)
152 157
 	const onView = (record, row) => {
153 158
 		switch (record) {
154 159
 			case 'add':

+ 5 - 7
src/views/home/carousel/form.vue

@@ -122,20 +122,18 @@
122 122
 
123 123
 			const onFinish = async (status) => {
124 124
 				formStateRef.value.validate().then(async () => {
125
-					formState.value.status = status
126
-					await handleAdd(formState.value)
127
-					emit('change')
128
-					rest()
129
-					onClose()
130 125
 					try {
131
-						console.log(2)
126
+						formState.value.status = status
127
+						await handleAdd(formState.value)
128
+						emit('change')
129
+						onClose()
132 130
 					} catch (err) {
133 131
 						console.log(err)
134 132
 					}
135 133
 				})
136 134
 			}
137 135
 
138
-			const handleAdd = async (val, status) => {
136
+			const handleAdd = async (val) => {
139 137
 				if (records.value == 'edit') {
140 138
 					const res = await business.HOMEedit(val)
141 139
 				} else {

+ 2 - 5
src/views/home/carousel/index.vue

@@ -31,10 +31,7 @@
31 31
 						:loading="state.loading"
32 32
 						@click="start"
33 33
 					>
34
-						批量启用
35
-					</a-button>
36
-					<a-button class="btnl colro" type="primary" :disabled="!hasSelected" :loading="state.loading" @click="start">
37
-						批量禁用
34
+						批量操作(启用/禁用)
38 35
 					</a-button>
39 36
 				</div>
40 37
 			</a-space>
@@ -132,6 +129,7 @@
132 129
 		const res = await business.HOMEtype(del.value)
133 130
 		setTimeout(() => {
134 131
 			state.loading = false
132
+			state.selectedRowKeys = []
135 133
 			message.success('操作成功')
136 134
 			onSearch()
137 135
 		}, 300)
@@ -152,7 +150,6 @@
152 150
 
153 151
 	const { DEl, change, tableData, onSearch, handlePageChange, pagination, Search, onReset, SearchFormDel } =
154 152
 		listPagination({ headlineTitle: '', status: '' }, business.HOMElist, business.HOMEdel, {
155
-			isEntAppQuery: 1,
156 153
 			sortOrder: 'ASCEND'
157 154
 		})
158 155
 

+ 0 - 1
src/views/home/tabloid/form.vue

@@ -135,7 +135,6 @@
135 135
 						formState.value.newsImages = (formState.value.newsImages || []).filter((v) => v).join(',')
136 136
 						await handleAdd(formState.value, status)
137 137
 						emit('change')
138
-						rest()
139 138
 						onClose()
140 139
 					} catch (err) {
141 140
 						console.log(err)

+ 10 - 11
src/views/home/tabloid/index.vue

@@ -31,10 +31,7 @@
31 31
 						:loading="state.loading"
32 32
 						@click="start"
33 33
 					>
34
-						批量共享
35
-					</a-button>
36
-					<a-button class="btnl colro" type="primary" :disabled="!hasSelected" :loading="state.loading" @click="start">
37
-						批量禁用
34
+						批量操作(启用/禁用)
38 35
 					</a-button>
39 36
 				</div>
40 37
 			</a-space>
@@ -113,10 +110,12 @@
113 110
 
114 111
 	//共享
115 112
 	const handleSwitchChange = async (v) => {
116
-		if (v.isShare == 1) {
117
-			const res = await {}([{ id: v.id, isShare: 0 }])
118
-		} else {
119
-			const res = await {}([{ id: v.id, isShare: 1 }])
113
+		if (v.status == 1) {
114
+			const res = await business.IMGXWbatchUpdateStatus([{ id: v.id, status: 2 }])
115
+		} else if (v.status == 2) {
116
+			const res = await business.IMGXWbatchUpdateStatus([{ id: v.id, status: 3 }])
117
+		} else if (v.status == 3) {
118
+			const res = await business.IMGXWbatchUpdateStatus([{ id: v.id, status: 2 }])
120 119
 		}
121 120
 		message.success('操作成功')
122 121
 		await onSearch()
@@ -129,7 +128,8 @@
129 128
 	const hasSelected = computed(() => state.selectedRowKeys.length > 0)
130 129
 	const start = async () => {
131 130
 		state.loading = true
132
-		const res = await {}(del.value)
131
+		state.selectedRowKeys = []
132
+		const res = await business.IMGXWbatchUpdateStatus(del.value)
133 133
 		setTimeout(() => {
134 134
 			state.loading = false
135 135
 			message.success('操作成功')
@@ -144,7 +144,7 @@
144 144
 		del.value = state.selectedRowKeys.map((item) => {
145 145
 			return {
146 146
 				id: item.id,
147
-				isShare: 1
147
+				status: item.status === 1 ? 2 : item.status === 2 ? 3 : 2
148 148
 			}
149 149
 		})
150 150
 		console.log(del.value)
@@ -152,7 +152,6 @@
152 152
 
153 153
 	const { DEl, change, tableData, onSearch, handlePageChange, pagination, Search, onReset, SearchFormDel } =
154 154
 		listPagination({ newsTitle: '', status: '' }, business.IMGXWlist, business.IMGXWdelete, {
155
-			isEntAppQuery: 1,
156 155
 			sortOrder: 'ASCEND'
157 156
 		})
158 157