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 ++++++++++++++++++++++++++++++++---
src/views/configuration/custom/addPlan.vue | 9 ++++-----
2 files changed, 36 insertions(+), 8 deletions(-)
diff --git a/src/views/configuration/custom/addPlan.vue b/src/views/configuration/custom/addPlan.vue
index 67bd7e9..d057537 100644
--- a/src/views/configuration/custom/addPlan.vue
+++ b/src/views/configuration/custom/addPlan.vue
@@ -9,15 +9,15 @@
</el-col>
<el-col :span="24">
<el-form-item label="浜у搧绫诲瀷">
- <el-select v-model="relationIds" multiple placeholder="浜у搧绫诲瀷" style="width: 100%">
+ <el-select v-model="addPlanForm.relationIds" multiple placeholder="浜у搧绫诲瀷" style="width: 100%">
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">{{
item.name }}</el-option>
</el-select>
</el-form-item>
</el-col>
- <el-col :span="24">
+ <el-col :span="24" v-if="mode != 'edit'">
<el-form-item label="閫氳繃宸叉湁璁″垝绫诲瀷鏂板缓" prop="copySourceId">
- <el-select v-model="copySourceId" placeholder="閫氳繃宸叉湁璁″垝绫诲瀷鏂板缓" style="width: 100%">
+ <el-select v-model="addPlanForm.copySourceId" placeholder="閫氳繃宸叉湁璁″垝绫诲瀷鏂板缓" style="width: 100%">
<el-option v-for="item in planData" :key="item.id" :label="item.templateName" :value="item.id">{{
item.templateName }}</el-option>
</el-select>
@@ -26,7 +26,7 @@
</el-row>
</el-form>
<template #footer>
- <el-button @click="visible=false" >鍙栨秷</el-button>
+ <el-button @click="visible=false">鍙栨秷</el-button>
<el-button v-if="mode!='show'" type="primary" :loading="isSaveing" @click="planSubmit">淇� 瀛�</el-button>
</template>
</el-dialog>
@@ -98,7 +98,6 @@
},
//琛ㄥ崟娉ㄥ叆鏁版嵁
setData(data){
- console.log(data)
Object.assign(this.addPlanForm, data);
}
}
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