From 36599eb356a979115a7f7134861f076a75f0f84a Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期二, 09 一月 2024 14:26:37 +0800 Subject: [PATCH] 新建产品-产品负责人设置默认值和不可点击及新增接口 --- src/views/productManage/product/AddProductDialog.vue | 25 +++++++++++++++++++++---- 1 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/views/productManage/product/AddProductDialog.vue b/src/views/productManage/product/AddProductDialog.vue index d1b5371..9e00b6d 100644 --- a/src/views/productManage/product/AddProductDialog.vue +++ b/src/views/productManage/product/AddProductDialog.vue @@ -282,9 +282,14 @@ placeholder="璇烽�夋嫨" size="mini" style="width: 85%" - :disabled="!showFooter" + disabled > - <el-option v-for="item in memberOptions" :key="item.id" :label="item.name" :value="item.name"> + <el-option + v-for="(item, index) in memberOptions" + :key="index" + :label="item.userName" + :value="item.userName" + > </el-option> </el-select> </el-form-item> @@ -512,7 +517,7 @@ import IconCropper from "./IconCropper" import { getProductCategoryList } from "@/api/product/productCategory" import { getProductList, addProduct, updateProduct } from "@/api/product/product" -import { uploadFiles } from "@/api/common/other" +import { uploadFiles, getUserInfo } from "@/api/common/other" import codeMixin from "@/components/mixin/codeMixin" import { getDataByType } from "@/api/data" export default { @@ -556,7 +561,7 @@ // 閲囪喘绫诲瀷 purchaseType: [{ required: true, message: "璇烽�夋嫨", trigger: "blur" }] }, - memberOptions: [{ name: "绠$悊鍛�", id: 1 }], + memberOptions: [], productCategoryOptions: [], // 浜у搧绫诲埆 productTypeOptions: [ { name: "鑳芥秷鑰�", id: 1 }, @@ -631,8 +636,20 @@ } this.setOptionalFieldsToEmpty() this.formInfo() + this.getUserInfo() }, methods: { + // 鑾峰彇鐧诲綍鐢ㄦ埛淇℃伅 + getUserInfo() { + getUserInfo().then((res) => { + console.log(res) + if (res.code == 200) { + this.editConfig.infomation.principal = res.data.userName + this.memberOptions.push(res.data) + } + console.log(this.memberOptions) + }) + }, formInfo() { this.objCode.type = "鐗╂枡缂栫爜" this.objCode.codeStandID = "" -- Gitblit v1.8.0