From 6814bba0a6c374e595510fd9d65b651ff9e86b69 Mon Sep 17 00:00:00 2001
From: lzhe <lzhe@example.com>
Date: 星期四, 30 五月 2024 18:05:38 +0800
Subject: [PATCH] 1
---
src/views/configuration/custom/planSettings.vue | 35 ++++++++++++++++++++++++++++++++---
1 files changed, 32 insertions(+), 3 deletions(-)
diff --git a/src/views/configuration/custom/planSettings.vue b/src/views/configuration/custom/planSettings.vue
index 368eb9a..50bcca1 100644
--- a/src/views/configuration/custom/planSettings.vue
+++ b/src/views/configuration/custom/planSettings.vue
@@ -2,7 +2,7 @@
* @Author: lzhe lzhe@example.com
* @Date: 2024-03-26 10:28:33
* @LastEditors: lzhe lzhe@example.com
- * @LastEditTime: 2024-05-29 17:32:55
+ * @LastEditTime: 2024-05-30 18:04:52
* @FilePath: /smart-web/src/views/master/person/main/index.vue
* @Description: 杩欐槸榛樿璁剧疆,璇疯缃甡customMade`, 鎵撳紑koroFileHeader鏌ョ湅閰嶇疆 杩涜璁剧疆: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
@@ -12,7 +12,16 @@
<div class="title">璁″垝鏄剧ず璁剧疆</div>
<div class="type">
<div class="item last" @click="openPlan">鏂板缓璁″垝绫诲瀷妯$増</div>
- <div :class="{item:true, activeTab:index == 0?true:false}" v-for="(item,index) in planData">{{item.templateName}}<span>...</span></div>
+ <div :class="{item:true, activeTab: item.active}" v-for="(item,index) in planData" @click="changePlanData(item,index)">
+ <span style="margin-right: 12px;cursor: pointer;">{{item.templateName}}</span>
+ <el-popover placement="right-start" :width="30" trigger="click" :hide-after="0" :show-after="0">
+ <template #reference>...</template>
+ <template #default>
+ <span class="popvoer-title" @click="table_edit(item,index)">缂栬緫</span>
+ <span class="popvoer-title" style="margin-left: 12px" v-if="index != 0">鍒犻櫎</span>
+ </template>
+ </el-popover>
+ </div>
</div>
</div>
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
@@ -69,6 +78,7 @@
name: "custom",
data(){
return {
+ id: "",
dialog: {
save: false
},
@@ -101,15 +111,31 @@
this.$HTTP.get(`/api/blade-system/custom-template/list?businessType=${this.$route.query.type}`).then(res=> {
if(res.code == 200) {
this.planData = res.data.reverse();
+ this.id = this.planData[0].id;
+ this.planData[0].active = true;
this.getTableList();
}
})
},
+ changePlanData(row,index) {
+ this.id = row.id;
+ this.planData.forEach(item=> {
+ item.active = false;
+ })
+ this.planData[index].active = true;
+ this.getTableList();
+ },
getTableList() {
- this.$HTTP.get(`/api/blade-system/custom-template-field/listField?configType=1&templateId=${this.planData[0].id}`).then(res=> {
+ this.$HTTP.get(`/api/blade-system/custom-template-field/listField?configType=1&templateId=${this.id}`).then(res=> {
if(res.code == 200) {
this.tableData0 = res.data.systemFieldList;
}
+ })
+ },
+ table_edit(row) {
+ this.dialog.save = true
+ this.$nextTick(() => {
+ this.$refs.saveDialog.open(this.productList,this.planData,'edit').setData(row);
})
},
openPlan() {
@@ -183,4 +209,7 @@
color: #000;
margin: 14px 0;
}
+.popvoer-title {
+ cursor: pointer;
+}
</style>
--
Gitblit v1.9.3