1
lzhe
2024-05-30 6814bba0a6c374e595510fd9d65b651ff9e86b69
1
已修改2个文件
42 ■■■■ 文件已修改
src/views/configuration/custom/addPlan.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/configuration/custom/planSettings.vue 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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>
@@ -98,7 +98,6 @@
            },
            //表单注入数据
            setData(data){
                console.log(data)
                Object.assign(this.addPlanForm, data);
            }
        }
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>