From fa65e938ddb5c206be73ce5dc7f51437d6396e05 Mon Sep 17 00:00:00 2001
From: 李林 <z1292839451@163.com>
Date: 星期四, 07 三月 2024 11:30:51 +0800
Subject: [PATCH] 完成客户管理

---
 /dev/null                             |  155 -----------------
 src/components/tool/value-table.vue   |    9 
 src/components/view/custom_manage.vue |  313 ++++++++++++++++++++++++++++++++++
 static/js/menu.js                     |    4 
 src/assets/api/controller.js          |    3 
 5 files changed, 326 insertions(+), 158 deletions(-)

diff --git a/src/assets/api/controller.js b/src/assets/api/controller.js
index f19dc25..8a7b676 100644
--- a/src/assets/api/controller.js
+++ b/src/assets/api/controller.js
@@ -30,6 +30,9 @@
 	selectPowerByRoleId: "/role/selectPowerByRoleId", //閫氳繃瑙掕壊id鏌ヨ鏉冮檺鍒楄〃
 	upRole: "/role/upRole", //淇敼瑙掕壊
 	getUserMenu: "/user/getUserMenu", //鑾峰彇鐢ㄦ埛鏋氫妇
+	selectCustomPageList: "/user/selectCustomPageList", //鑾峰彇瀹㈡埛鍒楄〃
+	delCustomById: "/user/delCustomById", //鍒犻櫎瀹㈡埛淇℃伅
+	addCustom: "/user/addCustom", //鏂板瀹㈡埛淇℃伅
 }
 
 const dataReporting = {
diff --git a/src/components/tool/value-table.vue b/src/components/tool/value-table.vue
index 8d82289..c98d03a 100644
--- a/src/components/tool/value-table.vue
+++ b/src/components/tool/value-table.vue
@@ -68,7 +68,7 @@
 						<span v-else>{{scope.row[a.label]}}</span>
 					</template>
 				</el-table-column>
-				<el-table-column fixed="right" align="center" label="鎿嶄綔" :width="60 + data.do.length * 40"
+				<el-table-column fixed="right" align="center" label="鎿嶄綔" :width="getWidth()"
 					v-if="data.do.length > 0">
 					<template slot-scope="scope">
 						<el-button v-for="(a, ai) in data.do" :key="ai" :type="a.type"
@@ -711,6 +711,13 @@
           this.$emit(val.method,row)
         }
       },
+			getWidth(){
+				let count = 0
+				this.data.do.forEach(a=>{
+					count += a.font.length
+				})
+				return count * 15 + 60 + 'px'
+			}
 		}
 	}
 </script>
diff --git a/src/components/view/custom_manage.vue b/src/components/view/custom_manage.vue
new file mode 100644
index 0000000..c82f01d
--- /dev/null
+++ b/src/components/view/custom_manage.vue
@@ -0,0 +1,313 @@
+<style scoped>
+	.title {
+		height: 60px;
+		line-height: 60px;
+	}
+
+	.search {
+		background-color: #fff;
+		height: 80px;
+		display: flex;
+		align-items: center;
+	}
+
+	.search_thing {
+		width: 350px;
+		display: flex;
+		align-items: center;
+	}
+
+	.search_label {
+		width: 110px;
+		font-size: 14px;
+		text-align: right;
+	}
+
+	.search_input {
+		width: calc(100% - 110px);
+	}
+
+	.table {
+		margin-top: 10px;
+		background-color: #fff;
+		width: calc(100% - 40px);
+		height: calc(100% - 60px - 80px - 10px - 40px);
+		padding: 20px;
+	}
+</style>
+
+<template>
+	<div class="custom_manage">
+		<div>
+			<el-row class="title">
+				<el-col :span="12" style="padding-left: 20px;">瀹㈡埛绠$悊</el-col>
+				<el-col :span="12" style="text-align: right;">
+					<el-button size="medium" type="primary" @click="addDia = true" v-if="addPower">鏂板</el-button>
+				</el-col>
+			</el-row>
+		</div>
+		<div class="search">
+			<div class="search_thing">
+				<div class="search_label">瀹㈡埛鍚嶇О锛�</div>
+				<div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
+						v-model="componentData.entity.name" @keyup.enter.native="refreshTable()"></el-input></div>
+			</div>
+			<div class="search_thing">
+				<div class="search_label">璐﹀彿鐘舵�侊細</div>
+				<div class="search_input">
+					<el-select size="small" v-model="componentData.entity.state" style="width: 100%;" @change="refreshTable()">
+						<el-option label="鍏ㄩ儴" :value="null"></el-option>
+						<el-option label="鍚敤" :value="1"></el-option>
+						<el-option label="鍋滅敤" :value="0"></el-option>
+					</el-select>
+				</div>
+			</div>
+			<div class="search_thing" style="padding-left: 30px;">
+				<el-button size="small" @click="refresh()">閲� 缃�</el-button>
+				<el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
+			</div>
+		</div>
+		<div class="table">
+			<ValueTable ref="ValueTable" :url="$api.user.selectCustomPageList" :delUrl="$api.user.delCustomById"
+				:componentData="componentData" :key="upIndex" />
+		</div>
+		<el-dialog title="鏂板瀹㈡埛" :visible.sync="addDia" width="450px">
+			<div style="margin-bottom: 15px;">
+				<el-row style="line-height: 50px;">
+					<el-col :span="7" style="text-align: right;padding-right: 8px;">
+						<span class="required-span">* </span>瀹㈡埛鍚嶇О锛�</el-col>
+					<el-col :span="15">
+						<el-input v-model="user.name" readonly size="small">
+							<template slot="append"><el-button slot="append" icon="el-icon-search"
+									@click="selectUserDia = true"></el-button></template>
+						</el-input>
+					</el-col>
+				</el-row>
+				<el-row style="line-height: 50px;">
+					<el-col :span="7" style="text-align: right;padding-right: 8px;"><span class="required-span">*
+						</span>瀹㈡埛璐︽埛锛�</el-col>
+					<el-col :span="15">
+						<el-input v-model="user.account" readonly size="small"></el-input>
+					</el-col>
+				</el-row>
+				<el-row style="line-height: 50px;">
+					<el-col :span="7" style="text-align: right;padding-right: 8px;">鐢靛瓙閭锛�</el-col>
+					<el-col :span="15">
+						<el-input v-model="user.email" size="small" clearable></el-input>
+					</el-col>
+				</el-row>
+				<el-row style="line-height: 50px;">
+					<el-col :span="7" style="text-align: right;padding-right: 8px;"><span class="required-span">*
+						</span>鐢佃瘽鍙风爜锛�</el-col>
+					<el-col :span="15">
+						<el-input v-model="user.phone" size="small" clearable></el-input>
+					</el-col>
+				</el-row>
+				<el-row style="line-height: 50px;">
+					<el-col :span="7" style="text-align: right;padding-right: 8px;"><span class="required-span">*
+						</span>瀹㈡埛鍗曚綅锛�</el-col>
+					<el-col :span="15">
+						<el-input v-model="user.company" size="small" clearable></el-input>
+					</el-col>
+				</el-row>
+				<el-row style="margin-top: 15px;">
+					<el-col :span="7" style="text-align: right;padding-right: 8px;"><span class="required-span">*
+						</span>鍗曚綅鍦板潃锛�</el-col>
+					<el-col :span="15">
+						<el-input type="textarea" v-model="user.address" size="small" clearable :autosize="{minRows: 2, maxRows: 4}"></el-input>
+					</el-col>
+				</el-row>
+			</div>
+			<span slot="footer" class="dialog-footer">
+				<el-button @click="addDia = false">鍙� 娑�</el-button>
+				<el-button type="primary" @click="customAdd" :loading="loading">纭� 瀹�</el-button>
+			</span>
+		</el-dialog>
+		<el-dialog title="閫夋嫨鐢ㄦ埛" :visible.sync="selectUserDia" width="70%">
+			<div class="body" style="height: 60vh;" v-if="selectUserDia">
+				<ValueTable ref="ValueTable2" :url="$api.user.selectUserList" :componentData="componentData2" />
+			</div>
+			<span slot="footer" class="dialog-footer">
+				<el-button @click="selectUserDia = false">鍙� 娑�</el-button>
+				<el-button type="primary" @click="selectUser">纭� 瀹�</el-button>
+			</span>
+		</el-dialog>
+	</div>
+</template>
+
+<script>
+	import ValueTable from '../tool/value-table.vue'
+	export default {
+		components: {
+			ValueTable
+		},
+		data() {
+			return {
+				componentData: {
+					entity: {
+						name: null,
+						state: null,
+						orderBy: {
+							field: 'id',
+							order: 'asc'
+						}
+					},
+					isIndex: true,
+					showSelect: false,
+					select: false,
+					do: [{
+						font: '濮旀墭璁板綍',
+						type: 'text',
+						method: 'entrust'
+					}, {
+						font: '鍗忚璁板綍',
+						type: 'text',
+						method: 'protocol'
+					}, {
+						id: 'delete',
+						font: '鍒犻櫎',
+						type: 'text',
+						method: 'doDiy'
+					}],
+					tagField: {
+						state: {
+							select: [{
+								value: 1,
+								type: 'success',
+								label: '鍚敤'
+							}, {
+								value: 0,
+								type: 'danger',
+								label: '鍋滅敤'
+							}]
+						}
+					},
+					selectField: {
+						state: {
+							select: [{
+								value: 1,
+								type: 'success',
+								label: '鍚敤'
+							}, {
+								value: 0,
+								type: 'danger',
+								label: '鍋滅敤'
+							}]
+						}
+					},
+					requiredAdd: [],
+					requiredUp: []
+				},
+				entityCopy: {},
+				upIndex: 0,
+				addDia: false,
+				addPower: true,
+				addDia: false,
+				user: {
+					name: null
+				},
+				selectUserDia: false,
+				loading: false,
+				componentData2: {
+					entity: {
+						isCustom: 0,
+						orderBy: {
+							field: 'id',
+							order: 'asc'
+						}
+					},
+					isIndex: true,
+					showSelect: true,
+					select: false,
+					do: [],
+					tagField: {},
+					selectField: {},
+				}
+			}
+		},
+		mounted() {
+			this.entityCopy = this.HaveJson(this.componentData.entity)
+			this.getPower()
+		},
+		methods: {
+			refreshTable() {
+				this.$refs['ValueTable'].selectList()
+			},
+			refresh() {
+				this.componentData.entity = this.HaveJson(this.entityCopy)
+				this.upIndex++
+			},
+			customAdd() {
+				if (this.user.name == '' || this.user.name == null) {
+					this.$message.error('璇峰~鍐欏鎴峰悕绉�')
+					return
+				}
+				if (this.user.account == '' || this.user.account == null) {
+					this.$message.error('璇峰~鍐欏鎴疯处鎴�')
+					return
+				}
+				if (this.user.phone == '' || this.user.phone == null) {
+					this.$message.error('璇峰~鍐欑數璇濆彿鐮�')
+					return
+				}
+				if (this.user.company == '' || this.user.company == null) {
+					this.$message.error('璇峰~鍐欏鎴峰崟浣�')
+					return
+				}
+				if (this.user.address == '' || this.user.address == null) {
+					this.$message.error('璇峰~鍐欏崟浣嶅湴鍧�')
+					return
+				}
+				this.loading = true
+				this.$axios.post(this.$api.user.addCustom, this.user, {
+					headers: {
+						'Content-Type': 'application/json'
+					}
+				}).then(res => {
+					if (res.code == 201) return
+					this.$message.success('娣诲姞鎴愬姛')
+					this.refreshTable()
+					this.loading = false
+					this.addDia = false
+				})
+			},
+			// 鏉冮檺鍒嗛厤
+			getPower() {
+				let power = JSON.parse(sessionStorage.getItem('power'))
+				let up = false
+				let del = false
+				let add = false
+				for (var i = 0; i < power.length; i++) {
+					if (power[i].menuMethod == 'delCustomById') {
+						del = true
+					}
+					if (power[i].menuMethod == 'addCustom') {
+						add = true
+					}
+				}
+				if (!del) {
+					this.componentData.do.splice(2, 1)
+				}
+				this.addPower = add
+			},
+			entrust(data) {
+
+			},
+			protocol(data) {
+
+			},
+			selectUser() {
+				let selects = this.$refs.ValueTable2.multipleSelection
+				if (selects.length == 0) {
+					this.$message.error('鏈�夋嫨鏁版嵁')
+					return
+				}
+				delete selects['orderBy']
+				delete selects['updateUser']
+				delete selects['updateTime']
+				this.user = selects
+				this.selectUserDia = false
+			}
+		}
+	}
+</script>
\ No newline at end of file
diff --git a/src/components/view/data-comparison.vue b/src/components/view/data-comparison.vue
deleted file mode 100644
index 3571fca..0000000
--- a/src/components/view/data-comparison.vue
+++ /dev/null
@@ -1,147 +0,0 @@
-<style scoped>
-	.title {
-		height: 60px;
-		line-height: 60px;
-	}
-
-	.search {
-		background-color: #fff;
-		height: 80px;
-		display: flex;
-		align-items: center;
-	}
-
-	.search_thing {
-		width: 350px;
-		display: flex;
-		align-items: center;
-	}
-
-	.search_label {
-		width: 120px;
-		font-size: 14px;
-		text-align: right;
-	}
-
-	.search_input {
-		width: calc(100% - 110px);
-	}
-
-	.table {
-		margin-top: 10px;
-		background-color: #fff;
-		width: calc(100% - 40px);
-		height: calc(100% - 60px - 80px - 10px - 40px);
-		padding: 20px;
-	}
-</style>
-
-<template>
-	<div class="role_manage">
-		<div>
-			<el-row class="title">
-				<el-col :span="12" style="padding-left: 20px;">鍛樺伐鏁版嵁瀵规瘮</el-col>
-			</el-row>
-		</div>
-		<div class="search">
-			<div class="search_thing">
-				<div class="search_label">涓昏处鎴峰悕绉帮細</div>
-				<div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
-						v-model="componentData.entity.name"></el-input></div>
-			</div>
-			<div class="search_thing">
-				<div class="search_label">瀛愯处鎴峰悕绉帮細</div>
-				<div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
-						v-model="componentData.entity.comparisonName"></el-input></div>
-			</div>
-			<div class="search_thing">
-				<div class="search_label">鐧昏鏃ユ湡锛�</div>
-				<div class="search_input">
-					<el-date-picker size="small" v-model="componentData.entity.createTime" type="date" placeholder="閫夋嫨鏃ユ湡"
-						value-format="yyyy-MM-dd" :clearable="false" :editable="false"></el-date-picker>
-				</div>
-			</div>
-			<div class="search_thing" style="padding-left: 30px;">
-				<el-button size="small" @click="refresh()">閲� 缃�</el-button>
-				<el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
-			</div>
-		</div>
-		<div class="table">
-			<ValueTable ref="ValueTable" :url="$api.dataReporting.selectDataComparisonDtoPageList"
-				:componentData="componentData" :key="upIndex" />
-		</div>
-	</div>
-</template>
-
-<script>
-	import ValueTable from '../tool/value-table.vue'
-	export default {
-		components: {
-			ValueTable
-		},
-		data() {
-			return {
-				componentData: {
-					entity: {
-						name: null,
-						comparisonName: null,
-						createTime: null,
-						orderBy: {
-							field: 'createTime',
-							order: 'desc'
-						}
-					},
-					isIndex: false,
-					showSelect: false,
-					select: true,
-					do: [],
-					tagField: {}
-				},
-				entityCopy: {},
-				upIndex: 0,
-				addDia: false,
-				product: [],
-				outPower: true
-			}
-		},
-		created() {
-			var today = new Date();
-			var yesterday = new Date(today);
-			yesterday.setDate(today.getDate() - 1);
-			var yyyy = yesterday.getFullYear();
-			var mm = yesterday.getMonth() + 1;
-			var dd = yesterday.getDate()
-			if (dd < 10) {
-				dd = "0" + dd;
-			}
-			if (mm < 10) {
-				mm = "0" + mm;
-			}
-			this.componentData.entity.createTime = `${yyyy}-${mm}-${dd} 00:00:00`
-			this.componentData.entity.name = localStorage.getItem('data_com_name')==undefined?null:localStorage.getItem('data_com_name')
-		},
-		mounted() {
-			this.entityCopy = this.HaveJson(this.componentData.entity)
-		},
-		methods: {
-			refreshTable() {
-				if (this.componentData.entity.name == null || this.componentData.entity.name == '') {
-					this.$message.error('涓昏处鎴峰悕绉版槸蹇呭~椤�')
-				} else if (this.componentData.entity.comparisonName == null || this.componentData.entity.comparisonName == '') {
-					this.$message.error('瀛愯处鎴峰悕绉版槸蹇呭~椤�')
-				} else if (this.componentData.entity.createTime == null) {
-					this.$message.error('鐧昏鏃堕棿鏄繀濉」')
-				} else if (this.componentData.entity.name === this.componentData.entity.comparisonName) {
-					this.$message.error('瀵规瘮鐨勮处鎴蜂笉鑳介噸澶�')
-				} else {
-					localStorage.setItem('data_com_name', this.componentData.entity.name)
-					this.$refs['ValueTable'].selectList()
-				}
-			},
-			refresh() {
-				this.componentData.entity = this.HaveJson(this.entityCopy)
-				this.upIndex++
-			}
-		}
-	}
-</script>
\ No newline at end of file
diff --git a/src/components/view/fans-submit.vue b/src/components/view/fans-submit.vue
deleted file mode 100644
index 821fb1d..0000000
--- a/src/components/view/fans-submit.vue
+++ /dev/null
@@ -1,253 +0,0 @@
-<style scoped>
-	.title {
-		height: 60px;
-		line-height: 60px;
-	}
-
-	.search {
-		background-color: #fff;
-		height: 80px;
-		display: flex;
-		align-items: center;
-	}
-
-	.search_thing {
-		width: 350px;
-		display: flex;
-		align-items: center;
-	}
-
-	.search_label {
-		width: 110px;
-		font-size: 14px;
-		text-align: right;
-	}
-
-	.search_input {
-		width: calc(100% - 110px);
-	}
-
-	.table {
-		margin-top: 10px;
-		background-color: #fff;
-		width: calc(100% - 40px);
-		height: calc(100% - 60px - 80px - 10px - 40px);
-		padding: 20px;
-	}
-</style>
-
-<template>
-	<div class="role_manage">
-		<div>
-			<el-row class="title">
-				<el-col :span="12" style="padding-left: 20px;">杩涚矇涓婃姤</el-col>
-				<el-col :span="12" style="text-align: right;">
-					<el-button size="medium" @click="$refs.ValueTable.openUpload()" v-if="inPower">
-						<i class="el-icon-upload2" style="color: #3A7BFA;"></i>
-						<span style="color: #3A7BFA;">瀵煎叆</span>
-					</el-button>
-					<el-button size="medium" @click="$refs.ValueTable.openDownDia()" v-if="outPower">
-						<i class="el-icon-download" style="color: #3A7BFA;"></i>
-						<span style="color: #3A7BFA;">瀵煎嚭</span>
-					</el-button>
-					<el-button size="medium" type="primary" @click="openAdd" v-if="addPower">鏂板</el-button>
-				</el-col>
-			</el-row>
-		</div>
-		<div class="search">
-			<div class="search_thing">
-				<div class="search_label">绯荤粺鏃ユ湡锛�</div>
-				<div class="search_input">
-					<el-date-picker size="small" v-model="componentData.entity.createTime" type="date" placeholder="閫夋嫨鏃ユ湡"
-						value-format="yyyy-MM-dd HH:mm:ss" :clearable="false" :editable="false" @change="refreshTable()"></el-date-picker>
-				</div>
-			</div>
-			<div class="search_thing">
-				<div class="search_label">瀹㈡埛鍚嶇О锛�</div>
-				<div class="search_input">
-					<el-select size="small" style="width: 100%;" placeholder="璇烽�夋嫨" v-model="componentData.entity.custom">
-						<el-option :value="null" label="鍏ㄩ儴"></el-option>
-						<el-option v-for="(a, ai) in custom" :key="ai" :label="a.name" :value="a.name"></el-option>
-					</el-select>
-				</div>
-			</div>
-			<div class="search_thing">
-				<div class="search_label">椤圭洰锛�</div>
-				<div class="search_input">
-					<el-select size="small" style="width: 100%;" placeholder="璇烽�夋嫨" v-model="componentData.entity.product">
-						<el-option :value="null" label="鍏ㄩ儴"></el-option>
-						<el-option v-for="(a, ai) in product" :key="ai" :label="a.product" :value="a.product"></el-option>
-					</el-select>
-				</div>
-			</div>
-			<div class="search_thing">
-				<div class="search_label">鐧昏浜猴細</div>
-				<div class="search_input">
-					<el-input size="small" v-model="componentData.entity.createUserName" clearable placeholder="鐧昏浜�"
-						@keyup.enter.native="refreshTable()"></el-input>
-				</div>
-			</div>
-			<div class="search_thing" style="padding-left: 30px;">
-				<el-button size="small" @click="refresh()">閲� 缃�</el-button>
-				<el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
-			</div>
-		</div>
-		<div class="table">
-			<ValueTable ref="ValueTable" :url="$api.dataReporting.selectFansSubmitList"
-				:upUrl="$api.dataReporting.updateFansSubmit" :delUrl="$api.dataReporting.delFansSubmit"
-				:componentData="componentData" :key="upIndex" :downUrl="$api.dataReporting.downFansSubmitFile" :inputUrl="$api.dataReporting.inputFansSubmitCsv"/>
-		</div>
-	</div>
-</template>
-
-<script>
-	import ValueTable from '../tool/value-table.vue'
-	export default {
-		components: {
-			ValueTable
-		},
-		data() {
-			return {
-				componentData: {
-					entity: {
-						createTime: null,
-						custom: null,
-						product: null,
-						createUserName: null,
-						orderBy: {
-							field: 'id',
-							order: 'asc'
-						}
-					},
-					isIndex: true,
-					showSelect: false,
-					select: true,
-					do: [{
-						id: 'update',
-						font: '缂栬緫',
-						type: 'text',
-						method: 'doDiy',
-						field: ['createUserName']
-					}, {
-						id: 'delete',
-						font: '鍒犻櫎',
-						type: 'text',
-						method: 'doDiy'
-					}],
-					tagField: {},
-					selectField: {
-						product: {
-							select: []
-						},
-						custom: {
-							select: []
-						}
-					},
-					requiredAdd: ['product', 'fansAdd', 'vx'],
-					requiredUp: ['product', 'fansAdd', 'vx'],
-					disabledUp: ['product', 'vx']
-				},
-				entityCopy: {},
-				upIndex: 0,
-				product: [],
-				custom: [],
-				addPower: true,
-				inPower: true,
-				outPower: true
-			}
-		},
-		created() {
-			var today = new Date();
-			var yyyy = today.getFullYear();
-			var mm = today.getMonth() + 1;
-			var dd = today.getDate()
-			if (dd < 10) {
-				dd = "0" + dd;
-			}
-			if (mm < 10) {
-				mm = "0" + mm;
-			}
-			this.componentData.entity.createTime = this.HaveJson(`${yyyy}-${mm}-${dd} 00:00:00`)
-		},
-		mounted() {
-			this.entityCopy = this.HaveJson(this.componentData.entity)
-			this.selectProductEnumList()
-			this.selectCustomEnumList()
-			this.getPower()
-		},
-		methods: {
-			refreshTable() {
-				this.$refs['ValueTable'].selectList()
-			},
-			refresh() {
-				this.componentData.entity = this.HaveJson(this.entityCopy)
-				this.upIndex++
-			},
-			openAdd() {
-				this.$refs.ValueTable.openAddDia(this.$api.dataReporting.addFansSubmit);
-			},
-			selectProductEnumList() {
-				this.$axios.get(this.$api.enums.selectProductEnumList).then(res => {
-					this.product = res.data
-					var str = []
-					res.data.forEach(a => {
-						str.push({
-							label: a.product,
-							value: a.product
-						})
-					})
-					this.componentData.selectField.product.select = str
-				})
-			},
-			selectCustomEnumList() {
-				this.$axios.get(this.$api.enums.selectCustomEnumList).then(res => {
-					this.custom = res.data
-					var str = []
-					res.data.forEach(a => {
-						str.push({
-							label: a.name,
-							value: a.name
-						})
-					})
-					this.componentData.selectField.custom.select = str
-				})
-			},
-			// 鏉冮檺鍒嗛厤
-			getPower() {
-				let power = JSON.parse(sessionStorage.getItem('power'))
-				let up = false
-				let del = false
-				let add = false
-				let inPower = false
-				let outPower = false
-				for (var i = 0; i < power.length; i++) {
-					if (power[i].menuMethod == 'upDataReporting') {
-						up = true
-					}
-					if (power[i].menuMethod == 'delFansSubmit') {
-						del = true
-					}
-					if (power[i].menuMethod == 'addFansSubmit') {
-						add = true
-					}
-					if (power[i].menuMethod == 'inputFansSubmitCsv') {
-						inPower = true
-					}
-					if (power[i].menuMethod == 'downFansSubmitFile') {
-						outPower = true
-					}
-				}
-				if (!del) {
-					this.componentData.do.splice(1, 1)
-				}
-				if (!up) {
-					this.componentData.do.splice(0, 1)
-				}
-				this.addPower = add
-				this.inPower = inPower
-				this.outPower = outPower
-			},
-			openUpload() {}
-		}
-	}
-</script>
diff --git a/src/components/view/finance-submit.vue b/src/components/view/finance-submit.vue
deleted file mode 100644
index ff389b0..0000000
--- a/src/components/view/finance-submit.vue
+++ /dev/null
@@ -1,280 +0,0 @@
-<style scoped>
-	.title {
-		height: 60px;
-		line-height: 60px;
-	}
-
-	.search {
-		background-color: #fff;
-		height: 80px;
-		display: flex;
-		align-items: center;
-	}
-
-	.search_thing {
-		width: 350px;
-		display: flex;
-		align-items: center;
-	}
-
-	.search_label {
-		width: 110px;
-		font-size: 14px;
-		text-align: right;
-	}
-
-	.search_input {
-		width: calc(100% - 110px);
-	}
-
-	.table {
-		margin-top: 10px;
-		background-color: #fff;
-		width: calc(100% - 40px);
-		height: calc(100% - 60px - 80px - 10px - 40px);
-		padding: 20px;
-	}
-	.el-radio-group{
-		width: 100%;
-	}
-</style>
-
-<template>
-	<div class="role_manage">
-		<div>
-			<el-row class="title">
-				<el-col :span="12" style="padding-left: 20px;">璐㈠姟涓婃姤</el-col>
-				<el-col :span="12" style="text-align: right;">
-					<el-button size="medium" @click="chooseDia = true" v-if="inPower">
-						<i class="el-icon-upload2" style="color: #3A7BFA;"></i>
-						<span style="color: #3A7BFA;">瀵煎叆</span>
-					</el-button>
-					<el-button size="medium" @click="$refs.ValueTable.openDownDia()" v-if="outPower">
-						<i class="el-icon-download" style="color: #3A7BFA;"></i>
-						<span style="color: #3A7BFA;">瀵煎嚭</span>
-					</el-button>
-					<el-button size="medium" type="primary" @click="openAdd" v-if="addPower">鏂板</el-button>
-				</el-col>
-			</el-row>
-		</div>
-		<div class="search">
-			<div class="search_thing">
-				<div class="search_label">绯荤粺鏃ユ湡锛�</div>
-				<div class="search_input">
-					<el-date-picker size="small" v-model="componentData.entity.createTime" type="date" placeholder="閫夋嫨鏃ユ湡"
-						value-format="yyyy-MM-dd HH:mm:ss" :clearable="false" :editable="false" @change="refreshTable()"></el-date-picker>
-				</div>
-			</div>
-			<div class="search_thing">
-				<div class="search_label">璐︽埛鍚嶏細</div>
-				<div class="search_input">
-					<el-input size="small" v-model="componentData.entity.name" clearable placeholder="璐︽埛鍚�"
-						@keyup.enter.native="refreshTable()"></el-input>
-				</div>
-			</div>
-			<div class="search_thing" style="padding-left: 30px;">
-				<el-button size="small" @click="refresh()">閲� 缃�</el-button>
-				<el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
-			</div>
-		</div>
-		<div class="table">
-			<ValueTable ref="ValueTable" :url="$api.dataReporting.selectFinanceSubmitList"
-				:upUrl="$api.dataReporting.updateFinanceSubmit" :delUrl="$api.dataReporting.delFinanceSubmit"
-				:componentData="componentData" :key="upIndex" :downUrl="$api.dataReporting.downFinanceSubmitFile" :inputUrl="$api.dataReporting.inputFinanceSubmitCsv"/>
-		</div>
-		<el-dialog title="璇烽�夋嫨璐㈠姟涓婃姤鐨勫璞�" :visible.sync="chooseDia" width="500px">
-			<div class="body" v-if="chooseDia" style="max-height: 550px;overflow-y: auto;padding: 5px 0;">
-				<el-radio-group v-model="userId">
-					<el-col :span="8" v-for="(a, ai) in users" :key="ai" style="margin-bottom: 2px;">
-						<el-radio border size="small" :label="a.id">{{a.name}}</el-radio>
-					</el-col>
-				</el-radio-group>
-			</div>
-			<span slot="footer" class="dialog-footer">
-				<el-button @click="chooseDia = false">鍙栨秷</el-button>
-				<el-button type="primary" @click="goDown">涓嬩竴姝�</el-button>
-			</span>
-		</el-dialog>
-	</div>
-</template>
-
-<script>
-	import ValueTable from '../tool/value-table.vue'
-	export default {
-		components: {
-			ValueTable
-		},
-		data() {
-			return {
-				componentData: {
-					entity: {
-						name: null,
-						createTime: null,
-						orderBy: {
-							field: 'id',
-							order: 'asc'
-						}
-					},
-					isIndex: true,
-					showSelect: false,
-					select: true,
-					do: [{
-						id: 'update',
-						font: '缂栬緫',
-						type: 'text',
-						method: 'doDiy',
-						field: ['createUserName','瀵硅薄=param']
-					}, {
-						id: 'delete',
-						font: '鍒犻櫎',
-						type: 'text',
-						method: 'doDiy'
-					}],
-					tagField: {},
-					selectField: {
-						product: {
-							select: []
-						},
-						custom: {
-							select: []
-						},
-						param:{
-							select:[]
-						}
-					},
-					requiredAdd: ['company', 'name', 'employeeRebate','param'],
-					requiredUp: ['employeeRebate'],
-					disabledUp: ['company', 'name','param'],
-					uploadStr: ""
-				},
-				entityCopy: {},
-				upIndex: 0,
-				product: [],
-				custom: [],
-				addPower: true,
-				inPower: true,
-				outPower: true,
-				chooseDia: false,
-				users: [],
-				userId: null
-			}
-		},
-		created() {
-			var today = new Date();
-			var yyyy = today.getFullYear();
-			var mm = today.getMonth() + 1;
-			var dd = today.getDate()
-			if (dd < 10) {
-				dd = "0" + dd;
-			}
-			if (mm < 10) {
-				mm = "0" + mm;
-			}
-			this.componentData.entity.createTime = this.HaveJson(`${yyyy}-${mm}-${dd} 00:00:00`)
-		},
-		mounted() {
-			this.entityCopy = this.HaveJson(this.componentData.entity)
-			this.selectProductEnumList()
-			this.selectCustomEnumList()
-			this.getPower()
-			this.getUserList()
-		},
-		methods: {
-			refreshTable() {
-				this.$refs['ValueTable'].selectList()
-			},
-			refresh() {
-				this.componentData.entity = this.HaveJson(this.entityCopy)
-				this.upIndex++
-			},
-			openAdd() {
-				this.$refs.ValueTable.openAddDia(this.$api.dataReporting.addFinanceSubmit);
-			},
-			selectProductEnumList() {
-				this.$axios.get(this.$api.enums.selectProductEnumList).then(res => {
-					this.product = res.data
-					var str = []
-					res.data.forEach(a => {
-						str.push({
-							label: a.product,
-							value: a.product
-						})
-					})
-					this.componentData.selectField.product.select = str
-				})
-			},
-			selectCustomEnumList() {
-				this.$axios.get(this.$api.enums.selectCustomEnumList).then(res => {
-					this.custom = res.data
-					var str = []
-					res.data.forEach(a => {
-						str.push({
-							label: a.name,
-							value: a.name
-						})
-					})
-					this.componentData.selectField.custom.select = str
-				})
-			},
-			// 鏉冮檺鍒嗛厤
-			getPower() {
-				let power = JSON.parse(sessionStorage.getItem('power'))
-				let up = false
-				let del = false
-				let add = false
-				let inPower = false
-				let outPower = false
-				for (var i = 0; i < power.length; i++) {
-					if (power[i].menuMethod == 'updateFinanceSubmit') {
-						up = true
-					}
-					if (power[i].menuMethod == 'delFinanceSubmit') {
-						del = true
-					}
-					if (power[i].menuMethod == 'addFinanceSubmit') {
-						add = true
-					}
-					if (power[i].menuMethod == 'inputFinanceSubmitCsv') {
-						inPower = true
-					}
-					if (power[i].menuMethod == 'downFinanceSubmitFile') {
-						outPower = true
-					}
-				}
-				if (!del) {
-					this.componentData.do.splice(1, 1)
-				}
-				if (!up) {
-					this.componentData.do.splice(0, 1)
-				}
-				this.addPower = add
-				this.inPower = inPower
-				this.outPower = outPower
-			},
-			getUserList(){
-				this.$axios.get(this.$api.user.getUserMenu).then(res => {
-					if (res.code === 201) {
-						return
-					}
-					this.users = res.data
-					var str = []
-					res.data.forEach(a => {
-						str.push({
-							label: a.name,
-							value: a.id
-						})
-					})
-					this.componentData.selectField.param.select = str
-				})
-			},
-			goDown(){
-				if(this.userId == null || this.userId == undefined) {
-					this.$message.error('璇烽�夋嫨璐㈠姟涓婃姤鐨勫璞�')
-					return
-				}
-				this.componentData.uploadStr = this.userId
-				this.$refs.ValueTable.openUpload()
-			}
-		}
-	}
-</script>
diff --git a/src/components/view/product-count.vue b/src/components/view/product-count.vue
deleted file mode 100644
index cdc867b..0000000
--- a/src/components/view/product-count.vue
+++ /dev/null
@@ -1,158 +0,0 @@
-<style scoped>
-	.title {
-		height: 60px;
-		line-height: 60px;
-	}
-
-	.search {
-		background-color: #fff;
-		height: 80px;
-		display: flex;
-		align-items: center;
-	}
-
-	.search_thing {
-		width: 350px;
-		display: flex;
-		align-items: center;
-	}
-
-	.search_label {
-		width: 110px;
-		font-size: 14px;
-		text-align: right;
-	}
-
-	.search_input {
-		width: calc(100% - 110px);
-	}
-
-	.table {
-		margin-top: 10px;
-		background-color: #fff;
-		width: calc(100% - 40px);
-		height: calc(100% - 60px - 80px - 10px - 40px);
-		padding: 20px;
-	}
-</style>
-
-<template>
-	<div class="product_count">
-		<div>
-			<el-row class="title">
-				<el-col :span="12" style="padding-left: 20px;">椤圭洰鏁版嵁缁熻</el-col>
-				<el-col :span="12" style="text-align: right;">
-					<el-button size="small" @click="$refs.ValueTable.openDownDia()" v-if="outPower">
-						<i class="el-icon-download" style="color: #3A7BFA;"></i>
-						<span style="color: #3A7BFA;">瀵煎嚭</span>
-					</el-button>
-				</el-col>
-			</el-row>
-		</div>
-		<div class="search">
-			<div class="search_thing">
-				<div class="search_label">鐧昏鏃ユ湡锛�</div>
-				<div class="search_input">
-					<el-date-picker size="small" v-model="componentData.entity.createTime" type="date" placeholder="閫夋嫨鏃ユ湡"
-						value-format="yyyy-MM-dd HH:mm:ss" :clearable="false" :editable="false"></el-date-picker>
-				</div>
-			</div>
-			<div class="search_thing">
-				<div class="search_label">椤圭洰锛�</div>
-				<div class="search_input">
-					<el-select size="small" style="width: 100%;" placeholder="璇烽�夋嫨" v-model="componentData.entity.product">
-						<el-option :value="null" label="鍏ㄩ儴"></el-option>
-						<el-option v-for="(a, ai) in product" :key="ai" :label="a.product" :value="a.product"></el-option>
-					</el-select>
-				</div>
-			</div>
-			<div class="search_thing" style="padding-left: 30px;">
-				<el-button size="small" @click="refresh()">閲� 缃�</el-button>
-				<el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
-			</div>
-		</div>
-		<div class="table">
-			<ValueTable ref="ValueTable" :url="$api.dataReporting.selectProductCountDtoPageList"
-				:componentData="componentData" :key="upIndex" :downUrl="$api.dataReporting.downProductCountFile" />
-		</div>
-	</div>
-</template>
-
-<script>
-	import ValueTable from '../tool/value-table.vue'
-	export default {
-		components: {
-			ValueTable
-		},
-		data() {
-			return {
-				componentData: {
-					entity: {
-						updateTime: null,
-						createTime: null,
-						product: null,
-						orderBy: {
-							field: 'update_time',
-							order: 'asc'
-						}
-					},
-					isIndex: false,
-					showSelect: false,
-					select: true,
-					do: [],
-					tagField: {}
-				},
-				entityCopy: {},
-				upIndex: 0,
-				addDia: false,
-				product: [],
-				outPower: true
-			}
-		},
-		created() {
-			var today = new Date();
-			var yesterday = new Date(today);
-			yesterday.setDate(today.getDate() - 1);
-			var yyyy = yesterday.getFullYear();
-			var mm = yesterday.getMonth() + 1;
-			var dd = yesterday.getDate()
-			if (dd < 10) {
-				dd = "0" + dd;
-			}
-			if (mm < 10) {
-				mm = "0" + mm;
-			}
-			this.componentData.entity.createTime = `${yyyy}-${mm}-${dd} 00:00:00`
-		},
-		mounted() {
-			this.entityCopy = this.HaveJson(this.componentData.entity)
-			this.selectProductEnumList()
-			this.getPower()
-		},
-		methods: {
-			refreshTable() {
-				this.$refs['ValueTable'].selectList()
-			},
-			refresh() {
-				this.componentData.entity = this.HaveJson(this.entityCopy)
-				this.upIndex++
-			},
-			selectProductEnumList() {
-				this.$axios.get(this.$api.enums.selectProductEnumList).then(res => {
-					this.product = res.data
-				})
-			},
-			// 鏉冮檺鍒嗛厤
-			getPower() {
-				let power = JSON.parse(sessionStorage.getItem('power'))
-				let outPower = false
-				for (var i = 0; i < power.length; i++) {
-					if (power[i].menuMethod == 'downProductCountFile') {
-						outPower = true
-					}
-				}
-				this.outPower = outPower
-			}
-		}
-	}
-</script>
\ No newline at end of file
diff --git a/src/components/view/product-enum.vue b/src/components/view/product-enum.vue
deleted file mode 100644
index 582c15d..0000000
--- a/src/components/view/product-enum.vue
+++ /dev/null
@@ -1,150 +0,0 @@
-<style scoped>
-	.title {
-		height: 60px;
-		line-height: 60px;
-	}
-
-	.search {
-		background-color: #fff;
-		height: 80px;
-		display: flex;
-		align-items: center;
-	}
-
-	.search_thing {
-		width: 350px;
-		display: flex;
-		align-items: center;
-	}
-
-	.search_label {
-		width: 110px;
-		font-size: 14px;
-		text-align: right;
-	}
-
-	.search_input {
-		width: calc(100% - 110px);
-	}
-
-	.table {
-		margin-top: 10px;
-		background-color: #fff;
-		width: calc(100% - 40px);
-		height: calc(100% - 60px - 80px - 10px - 40px);
-		padding: 20px;
-	}
-</style>
-
-<template>
-	<div class="product_manage">
-		<div>
-			<el-row class="title">
-				<el-col :span="12" style="padding-left: 20px;">椤圭洰绠$悊</el-col>
-				<el-col :span="12" style="text-align: right;">
-					<el-button size="medium" type="primary" @click="openAdd" v-if="addPower">鏂板</el-button>
-				</el-col>
-			</el-row>
-		</div>
-		<div class="search">
-			<div class="search_thing">
-				<div class="search_label">椤圭洰鍚嶇О锛�</div>
-				<div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
-						v-model="componentData.entity.product" @keyup.enter.native="refreshTable()"></el-input></div>
-			</div>
-			<div class="search_thing" style="padding-left: 30px;">
-				<el-button size="small" @click="refresh()">閲� 缃�</el-button>
-				<el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
-			</div>
-		</div>
-		<div class="table">
-			<ValueTable ref="ValueTable" :url="$api.enums.selectProductEnumLists" :upUrl="$api.enums.updateProductEnum" :delUrl="$api.enums.delProductEnum" :componentData="componentData" :key="upIndex"/>
-		</div>
-	</div>
-</template>
-
-<script>
-	import ValueTable from '../tool/value-table.vue'
-	export default {
-		components: {
-			ValueTable
-		},
-		data() {
-			return {
-				componentData: {
-					entity: {
-						product: null,
-						orderBy: {
-							field: 'id',
-							order: 'asc'
-						}
-					},
-					isIndex: true,
-					showSelect: true,
-					select: true,
-					do: [{
-						id: 'update',
-						font: '缂栬緫',
-						type: 'text',
-						method: 'doDiy',
-						field:[]
-					},{
-						id: 'delete',
-						font: '鍒犻櫎',
-						type: 'text',
-						method: 'doDiy'
-					}],
-					tagField: {},
-					selectField: {},
-					requiredAdd:['product'],
-					requiredUp:['product']
-				},
-				entityCopy: {},
-				upIndex: 0,
-				addDia: false,
-				addPower: true
-			}
-		},
-		mounted() {
-			this.entityCopy = this.HaveJson(this.componentData.entity)
-			this.getPower()
-		},
-		methods: {
-			refreshTable() {
-				this.$refs['ValueTable'].selectList()
-			},
-			refresh() {
-				this.componentData.entity = this.HaveJson(this.entityCopy)
-				this.upIndex++
-			},
-			openAdd(){
-				this.$refs.ValueTable.openAddDia(this.$api.enums.addProductEnum);
-			},
-			// 鏉冮檺鍒嗛厤
-			getPower(){
-				let power = JSON.parse(sessionStorage.getItem('power'))
-				let up = false
-				let del = false
-				let add = false
-				for (var i = 0; i < power.length; i++) {
-					if(power[i].menuMethod=='updateProductEnum'){
-						up = true
-					}
-					if(power[i].menuMethod=='delProductEnum'){
-						del = true
-					}
-					if(power[i].menuMethod=='addProductEnum'){
-						add = true
-					}
-				}
-				if(!del){
-					this.componentData.do.splice(1, 1)
-				}
-				if(!up){
-					this.componentData.do.splice(0, 1)
-				}
-				this.addPower = add
-			}
-		}
-	}
-</script>
\ No newline at end of file
diff --git a/src/components/view/registrant-count.vue b/src/components/view/registrant-count.vue
deleted file mode 100644
index 5f89802..0000000
--- a/src/components/view/registrant-count.vue
+++ /dev/null
@@ -1,155 +0,0 @@
-<style scoped>
-	.title {
-		height: 60px;
-		line-height: 60px;
-	}
-
-	.search {
-		background-color: #fff;
-		height: 80px;
-		display: flex;
-		align-items: center;
-	}
-
-	.search_thing {
-		width: 350px;
-		display: flex;
-		align-items: center;
-	}
-
-	.search_label {
-		width: 110px;
-		font-size: 14px;
-		text-align: right;
-	}
-
-	.search_input {
-		width: calc(100% - 110px);
-	}
-
-	.table {
-		margin-top: 10px;
-		background-color: #fff;
-		width: calc(100% - 40px);
-		height: calc(100% - 60px - 80px - 10px - 40px);
-		padding: 20px;
-	}
-</style>
-<style>
-	.registrant_count .el-table__row{
-		height: 41px;
-	}
-</style>
-
-<template>
-	<div class="registrant_count">
-		<div>
-			<el-row class="title">
-				<el-col :span="12" style="padding-left: 20px;">鍛樺伐鏁版嵁缁熻</el-col>
-				<el-col :span="12" style="text-align: right;">
-					<el-button size="small" @click="$refs.ValueTable.openDownDia()" v-if="outPower">
-						<i class="el-icon-download" style="color: #3A7BFA;"></i>
-						<span style="color: #3A7BFA;">瀵煎嚭</span>
-					</el-button>
-				</el-col>
-			</el-row>
-		</div>
-		<div class="search">
-			<div class="search_thing">
-				<div class="search_label">瀹㈡埛鍚嶇О锛�</div>
-				<div class="search_input">
-					<el-select size="small" style="width: 100%;" placeholder="璇烽�夋嫨" v-model="componentData.entity.name">
-						<el-option :value="null" label="鍏ㄩ儴"></el-option>
-						<el-option v-for="(a, ai) in custom" :key="ai" :label="a.name" :value="a.name"></el-option>
-					</el-select>
-				</div>
-			</div>
-			<div class="search_thing">
-				<div class="search_label">椤圭洰锛�</div>
-				<div class="search_input">
-					<el-select size="small" style="width: 100%;" placeholder="璇烽�夋嫨" v-model="componentData.entity.product">
-						<el-option :value="null" label="鍏ㄩ儴"></el-option>
-						<el-option v-for="(a, ai) in product" :key="ai" :label="a.product" :value="a.product"></el-option>
-					</el-select>
-				</div>
-			</div>
-			<div class="search_thing" style="padding-left: 30px;">
-				<el-button size="small" @click="refresh()">閲� 缃�</el-button>
-				<el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
-			</div>
-		</div>
-		<div class="table">
-			<ValueTable ref="ValueTable" :url="$api.dataReporting.selectRegistrantCountDtoPageList" :componentData="componentData" :key="upIndex" :downUrl="$api.dataReporting.downRegistrantCountFile"/>
-		</div>
-	</div>
-</template>
-
-<script>
-	import ValueTable from '../tool/value-table.vue'
-	export default {
-		components: {
-			ValueTable
-		},
-		data() {
-			return {
-				componentData: {
-					entity: {
-						name: null,
-						product: null,
-						orderBy: {
-							field: 'create_time',
-							order: 'desc'
-						}
-					},
-					isIndex: false,
-					showSelect: false,
-					select: true,
-					do: [],
-					tagField: {}
-				},
-				entityCopy: {},
-				upIndex: 0,
-				addDia: false,
-				product: [],
-				custom:[],
-				outPower: true
-			}
-		},
-		mounted() {
-			this.entityCopy = this.HaveJson(this.componentData.entity)
-			this.selectProductEnumList()
-			this.selectCustomEnumList()
-			this.getPower()
-		},
-		methods: {
-			refreshTable() {
-				this.$refs['ValueTable'].selectList()
-			},
-			refresh() {
-				this.componentData.entity = this.HaveJson(this.entityCopy)
-				this.upIndex++
-			},
-			selectProductEnumList(){
-				this.$axios.get(this.$api.enums.selectProductEnumList).then(res=>{
-					this.product = res.data
-				})
-			},
-			selectCustomEnumList(){
-				this.$axios.get(this.$api.enums.selectCustomEnumList).then(res=>{
-					this.custom = res.data
-				})
-			},
-			// 鏉冮檺鍒嗛厤
-			getPower() {
-				let power = JSON.parse(sessionStorage.getItem('power'))
-				let outPower = false
-				for (var i = 0; i < power.length; i++) {
-					if (power[i].menuMethod == 'downRegistrantCountFile') {
-						outPower = true
-					}
-				}
-				this.outPower = outPower
-			}
-		}
-	}
-</script>
\ No newline at end of file
diff --git a/static/js/menu.js b/static/js/menu.js
index 4373533..0181f46 100644
--- a/static/js/menu.js
+++ b/static/js/menu.js
@@ -177,8 +177,8 @@
 		}, {
 			v: "瀹㈡埛绠$悊",
 			i: "el-icon-s-tools",
-			u: "",
-			p: ""
+			u: "custom_manage",
+			p: "selectCustomPageList"
 		}, {
 			v: "绯荤粺鏃ュ織",
 			i: "el-icon-s-tools",

--
Gitblit v1.9.3