From e4bb381c896015c4b87faa002ba6875c06a2fd16 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期四, 26 十二月 2024 14:33:10 +0800
Subject: [PATCH] 同步检测中心cnas修改

---
 src/components/view/custom_manage.vue |  184 +++++++++++++++++++++++++++------------------
 1 files changed, 109 insertions(+), 75 deletions(-)

diff --git a/src/components/view/custom_manage.vue b/src/components/view/custom_manage.vue
index c82f01d..7c45ee4 100644
--- a/src/components/view/custom_manage.vue
+++ b/src/components/view/custom_manage.vue
@@ -40,7 +40,7 @@
 	<div class="custom_manage">
 		<div>
 			<el-row class="title">
-				<el-col :span="12" style="padding-left: 20px;">瀹㈡埛绠$悊</el-col>
+				<el-col :span="12" style="padding-left: 20px;text-align: left;">瀹㈡埛绠$悊</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>
@@ -49,18 +49,8 @@
 		<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 class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="componentData.entity.company"
+						@keyup.enter.native="refreshTable()"></el-input></div>
 			</div>
 			<div class="search_thing" style="padding-left: 30px;">
 				<el-button size="small" @click="refresh()">閲� 缃�</el-button>
@@ -69,54 +59,61 @@
 		</div>
 		<div class="table">
 			<ValueTable ref="ValueTable" :url="$api.user.selectCustomPageList" :delUrl="$api.user.delCustomById"
-				:componentData="componentData" :key="upIndex" />
+				:componentData="componentData" :key="upIndex" :upUrl="$api.user.upCustom"/>
 		</div>
-		<el-dialog title="鏂板瀹㈡埛" :visible.sync="addDia" width="450px">
+		<el-dialog title="鏂板瀹㈡埛" :visible.sync="addDia" width="450px" @close="resetUser">
 			<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>
+						</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-row style="line-height: 50px;">
+					<el-col :span="7" style="text-align: right;padding-right: 8px;">瀹㈡埛鍗曚綅EN锛�</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-input v-model="user.companyEn" 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;">鍗曚綅鍦板潃锛�</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>
+				<el-row style="margin-top: 15px;">
+					<el-col :span="7" style="text-align: right;padding-right: 8px;">瀹㈡埛鍦板潃EN锛�</el-col>
+					<el-col :span="15">
+						<el-input type="textarea" v-model="user.addressEn" size="small" clearable
+							:autosize="{minRows: 2, maxRows: 4}"></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.num" 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;">鍗曚綅鐢佃瘽锛�</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;">宸ュ巶鍩燂細</el-col>
+        	<el-col :span="15">
+        		<el-input v-model="user.code" 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;">瀹㈡埛缂栧彿锛�</el-col>
+        	<el-col :span="15">
+        		<el-input v-model="user.code2" size="small" clearable></el-input>
+        	</el-col>
+        </el-row>
 			</div>
 			<span slot="footer" class="dialog-footer">
 				<el-button @click="addDia = false">鍙� 娑�</el-button>
@@ -124,6 +121,13 @@
 			</span>
 		</el-dialog>
 		<el-dialog title="閫夋嫨鐢ㄦ埛" :visible.sync="selectUserDia" width="70%">
+			<div class="search" style="height: 35px; margin-bottom: 9px;">
+				<div class="search_thing">
+				<div class="search_label">鐢ㄦ埛鍚嶏細</div>
+				<div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
+					v-model="componentData2.entity.name" @keyup.enter.native="$refs.ValueTable2.selectList()"></el-input></div>
+				</div>
+			</div>
 			<div class="body" style="height: 60vh;" v-if="selectUserDia">
 				<ValueTable ref="ValueTable2" :url="$api.user.selectUserList" :componentData="componentData2" />
 			</div>
@@ -145,8 +149,7 @@
 			return {
 				componentData: {
 					entity: {
-						name: null,
-						state: null,
+						company: null,
 						orderBy: {
 							field: 'id',
 							order: 'asc'
@@ -163,7 +166,13 @@
 						font: '鍗忚璁板綍',
 						type: 'text',
 						method: 'protocol'
-					}, {
+					},{
+						id: 'update',
+						font: '缂栬緫',
+						type: 'text',
+						method: 'doDiy',
+						field:[]
+					},{
 						id: 'delete',
 						font: '鍒犻櫎',
 						type: 'text',
@@ -196,13 +205,12 @@
 						}
 					},
 					requiredAdd: [],
-					requiredUp: []
+					requiredUp: ['company','address','code2','companyEn','addressEn','num']
 				},
 				entityCopy: {},
 				upIndex: 0,
 				addDia: false,
 				addPower: true,
-				addDia: false,
 				user: {
 					name: null
 				},
@@ -220,8 +228,21 @@
 					showSelect: true,
 					select: false,
 					do: [],
-					tagField: {},
+					tagField: {
+						state: {
+							select: [{
+								value: 1,
+								type: 'success',
+								label: '鍚敤'
+							}, {
+								value: 0,
+								type: 'danger',
+								label: '鍋滅敤'
+							}]
+						}
+					},
 					selectField: {},
+          needSort: ['company'],
 				}
 			}
 		},
@@ -238,26 +259,30 @@
 				this.upIndex++
 			},
 			customAdd() {
-				if (this.user.name == '' || this.user.name == null) {
+				if (this.user.company == '' || this.user.company == 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
-				}
+				// if (this.user.address == '' || this.user.address == null) {
+				// 	this.$message.error('璇峰~鍐欏崟浣嶅湴鍧�')
+				// 	return
+				// }
+				// if (this.user.companyEn == '' || this.user.companyEn == null) {
+				// 	this.$message.error('璇峰~鍐欒嫳鏂囧鎴峰崟浣�')
+				// 	return
+				// }
+				// if (this.user.addressEn == '' || this.user.addressEn == null) {
+				// 	this.$message.error('璇峰~鍐欒嫳鏂囧崟浣嶅湴鍧�')
+				// 	return
+				// }
+        // if (this.user.code2 == '' || this.user.code2 == null) {
+        // 	this.$message.error('璇峰~鍐欏鎴风紪鍙�')
+        // 	return
+        // }
+        // if (this.user.code2 == '' || this.user.code2 == null) {
+        // 	this.$message.error('璇峰~鍐欏姞鎬ラ搴�')
+        // 	return
+        // }
 				this.loading = true
 				this.$axios.post(this.$api.user.addCustom, this.user, {
 					headers: {
@@ -271,6 +296,9 @@
 					this.addDia = false
 				})
 			},
+      resetUser () {
+        this.user = {}
+      },
 			// 鏉冮檺鍒嗛厤
 			getPower() {
 				let power = JSON.parse(sessionStorage.getItem('power'))
@@ -284,10 +312,16 @@
 					if (power[i].menuMethod == 'addCustom') {
 						add = true
 					}
+          if (power[i].menuMethod == 'upCustom') {
+          	up = true
+          }
 				}
 				if (!del) {
-					this.componentData.do.splice(2, 1)
+					this.componentData.do.splice(3, 1)
 				}
+        if (!up) {
+        	this.componentData.do.splice(2, 1)
+        }
 				this.addPower = add
 			},
 			entrust(data) {
@@ -310,4 +344,4 @@
 			}
 		}
 	}
-</script>
\ No newline at end of file
+</script>

--
Gitblit v1.9.3