From 4641a877cd6a94e4d35dca7f7f14bc1443e2d2ad Mon Sep 17 00:00:00 2001 From: luobisheng <727299681@qq.com> Date: 星期二, 29 十一月 2022 17:59:55 +0800 Subject: [PATCH] 上传处置类型修改 --- src/views/operate/fivepack/threepack/components/updateUser/index.vue | 48 +++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 45 insertions(+), 3 deletions(-) diff --git a/src/views/operate/fivepack/threepack/components/updateUser/index.vue b/src/views/operate/fivepack/threepack/components/updateUser/index.vue index cc23488..4bf856b 100644 --- a/src/views/operate/fivepack/threepack/components/updateUser/index.vue +++ b/src/views/operate/fivepack/threepack/components/updateUser/index.vue @@ -82,6 +82,27 @@ ></el-option> </el-select> </el-form-item> + + <!-- 搴楅摵鐘舵�� --> + <el-form-item + v-if="isStorePage" + class="optionItem" + label="搴楅摵鐘舵��:" + prop="status" + > + <el-select + v-model="store.status" + placeholder="璇烽�夋嫨搴楅摵鐘舵��" + :disabled="isView()" + > + <el-option + v-for="item in statusList" + :key="item.id" + :value="item.id" + :label="item.name" + ></el-option> + </el-select> + </el-form-item> <el-form-item v-if="!isStorePage" class="optionItem" @@ -147,6 +168,7 @@ relationVideo: "", type: null, storeScore: null, + status: null, }, rules: { type: [{ required: true, validator: validateStoreType }], @@ -168,9 +190,16 @@ relationVideo: [ { required: true, trigger: "blur", message: "璇疯緭鍏ュ叧鑱旀憚鍍忔満" }, ], + status: [ + { required: true, trigger: "blur", message: "璇烽�夋嫨搴楅摵鐘舵��" }, + ], }, shopTypeList: [], relationVideoList: [], + statusList: [ + { id: 1, name: "缁忚惀" }, + { id: 2, name: "鍊掗棴" }, + ], }; }, async created() { @@ -183,7 +212,7 @@ this.store.relationVideo = this.store.videoPoint.name; } } - + if (!this.isView()) { await this.getShopTypeList(); } @@ -193,7 +222,6 @@ onSubmit() { this.$refs.store.validate((valid) => { if (valid) { - debugger this.store.type = this.store.type[1]; if (this.isCreated()) { addStoreInfo(this.store) @@ -215,6 +243,20 @@ } }); }, + + async created() { + if (this.storeInfo) { + this.$set(this, 'store', this.storeInfo); + const result = await getVideoPoint({ current: 1, size: 100 }); + this.relationVideoList = result.records; + if (this.storeInfo && this.isStorePage) { + this.store.relationVideo = this.store.videoPoint.name; + } + if (!this.isView()) { + await this.getShopTypeList(); + } + } + }, isView() { return this.dialogType === "view"; @@ -228,7 +270,7 @@ async getShopTypeList() { let arr = await getCodeList("16"); this.shopTypeList = this.createShopTypeTree(arr); - + if (this.dialogType === "update") { const selectedStoreType = arr.find( (item) => item.name === this.store.typeName -- Gitblit v1.8.0