From 083c818af77d33d619dba3dc20f94e996225a1c7 Mon Sep 17 00:00:00 2001
From: value <z1292839451@163.com>
Date: 星期四, 16 五月 2024 10:28:39 +0800
Subject: [PATCH] 增加人事系统对接

---
 src/components/view/b2-standard-template.vue |   53 ++++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 42 insertions(+), 11 deletions(-)

diff --git a/src/components/view/b2-standard-template.vue b/src/components/view/b2-standard-template.vue
index d6ca274..60cd463 100644
--- a/src/components/view/b2-standard-template.vue
+++ b/src/components/view/b2-standard-template.vue
@@ -59,11 +59,12 @@
 		</div>
 		<div class="table">
 			<ValueTable ref="ValueTable" :url="$api.StandardTemplate.selectStandardTemplatePageList"
-				:upUrl="$api.StandardTemplate.upStandardTemplate" :delUrl="$api.StandardTemplate.delStandardTemplate" :componentData="componentData" :key="upIndex" />
+				:upUrl="$api.StandardTemplate.upStandardTemplate" :delUrl="$api.StandardTemplate.delStandardTemplate"
+				:componentData="componentData" :key="upIndex" />
 		</div>
 		<el-dialog title="妯℃澘缂栧埗" :visible.sync="isShow" width="80%" :before-close="isClose">
 			<div style="width: 100%;height: 80vh;overflow: auto;" v-if="isShow">
-				<Excel :data="row.thing" :title="row.name" v-loading="loading"></Excel>
+				<Excel :data="row.thing" :execlTitle="row.name" v-loading="loading"></Excel>
 			</div>
 		</el-dialog>
 	</div>
@@ -95,7 +96,7 @@
 						font: '缂栬緫',
 						type: 'text',
 						method: 'doDiy',
-						field: ['createUserName', 'updateUserName','thing']
+						field: ['createUserName', 'updateUserName']
 					}, {
 						id: 'delete',
 						font: '鍒犻櫎',
@@ -169,34 +170,64 @@
 				this.isShow = true
 				this.row = row
 			},
-			closed(){
+			closed() {
 				this.loading = true
 				let data = luckysheet.toJson()
-				console.log(data);
-				this.$axios.post(this.$api.StandardTemplate.upStandardTemplate,{
+				delete data.title
+				delete data.container
+				delete data.lang
+				delete data.showsheetbar
+				delete data.showstatisticBarConfig
+				delete data.enableAddRow
+				delete data.enableAddBackTop
+				delete data.showtoolbarConfig
+				delete data.cellRightClickConfig
+				delete data.myFolderUrl
+				delete data.functionButton
+				if(data.data[0].config.borderInfo != undefined){
+					for (var i = 0; i < data.data[0].config.borderInfo.length; i++) {
+						let str = data.data[0].config.borderInfo
+						if (str[i].rangeType === 'range') {
+							if (str[i].borderType === 'border-none') {
+								data.data[0].config.borderInfo.splice(i, 1)
+								i -= 1
+							}
+						}
+					}
+				}
+        data.data[0].celldata.forEach(a=>{
+          if(a.v.ps!=undefined&&(a.v.ps.value==='妫�楠屽��' || a.v.ps.value==='璁惧鍚嶇О' || a.v.ps.value==='璁惧缂栫爜' || a.v.ps.value==='缁撹')){
+            if(a.v.v === undefined){
+              a.v.v = ""
+            }
+          }
+        })
+				this.$axios.post(this.$api.StandardTemplate.upStandardTemplate, {
 					id: this.row.id,
 					thing: JSON.stringify(data),
 					name: luckysheet.getWorkbookName(['name'])
-				},{
+				}, {
 					headers: {
 						'Content-Type': 'application/json'
 					}
-				}).then(res=>{
-					if (res.code==201) return
+				}).then(res => {
+					if (res.code == 201) return
 					this.loading = false
 					this.$message.success('宸蹭繚瀛�')
 					this.isShow = false
 					this.refreshTable()
 				})
 			},
-			isClose(done){
+			isClose(done) {
 				this.$confirm('鏄惁闇�瑕佷繚瀛�?', "璀﹀憡", {
 					confirmButtonText: "纭畾",
 					cancelButtonText: "鍙栨秷",
 					type: "warning"
 				}).then(() => {
 					this.closed()
-				}).catch(()=>{done()})
+				}).catch(() => {
+					done()
+				})
 			}
 		}
 	}

--
Gitblit v1.9.3