From 4bf10a1ba42ddaeab565c105b376c5732b0f3dab Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期二, 09 四月 2024 11:47:11 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.5.5:10010/r/silk/silk-web --- src/views/systemSetting/workshopManage/components/silkTableList.vue | 97 ++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 88 insertions(+), 9 deletions(-) diff --git a/src/views/systemSetting/workshopManage/components/silkTableList.vue b/src/views/systemSetting/workshopManage/components/silkTableList.vue index 8875782..144358d 100644 --- a/src/views/systemSetting/workshopManage/components/silkTableList.vue +++ b/src/views/systemSetting/workshopManage/components/silkTableList.vue @@ -50,6 +50,13 @@ </div> </div> <span v-else>{{ item.label }}</span> + <span v-if="item.iconRight"> + <i + @click="settingClick(item)" + :class="item.iconRight" + style="font-size: 16px ;color:#5582F3; margin-left: 5px; cursor: pointer" + ></i> + </span> </template> <!-- column鏍峰紡 --> <template slot-scope="scope"> @@ -73,17 +80,37 @@ ></el-input> </el-form-item> <el-form-item - v-else-if="item.projectName" + v-else-if="item.workshop" label=" " :prop="'tableData.' + scope.$index + '.' + item.prop" > <div class="custom-name"> <el-select v-model="scope.row[item.prop]" clearable size="mini" placeholder="璇烽�夋嫨"> <el-option - v-for="(item, index) in projectOptions" + v-for="(item, index) in workshopList" :key="index" - :label="item.value" - :value="item.value" + :label="item.name" + :value="item.ID" + > + </el-option> + </el-select> + <div class="common-select-btn" @click="clearupClient(scope)"> + <i class="el-icon-remove" title="鍒犻櫎"></i> + </div> + </div> + </el-form-item> + <el-form-item + v-else-if="item.carFlag" + label=" " + :prop="'tableData.' + scope.$index + '.' + item.prop" + > + <div class="custom-name"> + <el-select v-model="scope.row[item.prop]" clearable size="mini" placeholder="璇烽�夋嫨"> + <el-option + v-for="(item, index) in carFlagList" + :key="index" + :label="item.name" + :value="item.id" > </el-option> </el-select> @@ -123,7 +150,6 @@ v-model="scope.row[item.prop]" placeholder="" :min="0" - :precision="4" :disabled="!isOperate" :controls="false" size="mini" @@ -135,6 +161,25 @@ " ></el-input-number> </el-form-item> + <el-form-item + v-else-if="item.showInput" + label=" " + :prop="'tableData.' + scope.$index + '.' + item.prop" + :rules="[{ required: item.isRequird ? true : false, message: '杈撳叆涓嶈兘涓虹┖' }]" + > + <el-input + v-model="scope.row[item.prop]" + placeholder="" + size="mini" + style="width: 100%; margin-right: 5px" + ></el-input> + </el-form-item> + <!-- 璋冪敤鏂规硶鏄剧ず鏂囧瓧 --> + <div v-else-if="item.isCallMethod"> + <span :class="item.isClass ? item.getClassName(scope.row[item.prop], scope.row) : ''">{{ + item.getCallMethod(scope.row[item.prop], scope.row) + }}</span> + </div> <span v-else> <template> {{ scope.row[item.prop] }} @@ -161,7 +206,14 @@ } " ></el-input-number> + </el-form-item> + <!-- 璋冪敤鏂规硶鏄剧ず鏂囧瓧 --> + <div v-else-if="item.isCallMethod"> + <span :class="item.isClass ? item.getClassName(scope.row[item.prop], scope.row) : ''">{{ + item.getCallMethod(scope.row[item.prop], scope.row) + }}</span> + </div> <span v-else style="text-align: right">{{ scope.row[item.prop] }}</span> </template> </el-table-column> @@ -177,14 +229,14 @@ </el-table> </el-form> </div> - <div + <!-- <div v-if="detailEnter" class="add-column-box" @click="addColumnClick" :style="{ width: detailEnter ? '40px' : '0px' }" > <i class="el-icon-circle-plus"></i> - </div> + </div> --> </div> <div v-if="detailEnter" style="margin: 10px"> <div class="add-btn-box" @click="addRowClick"> @@ -198,6 +250,7 @@ <script> // import { getProductList } from "@/api/common/other" +import {getDict } from "@/api/systemSetting/dataDictionary" export default { name: "CommmonFormTableView", components: {}, @@ -256,7 +309,18 @@ { id: 3, value: "娓呮磥鍒�" }, { id: 4, value: "娲佸噣鍒�" }, { id: 5, value: "鏈�澶у亸宸�" } - ] + ], + workshopList:[],// 杞﹂棿鍒楄〃 + carFlagList:[ + {name:"宸﹀崐杞�",id:1}, + {name:"鍙冲崐杞�",id:2}, + {name:"鍏ㄨ溅缁撴潫",id:3}, + ],//鍗婅溅鏍囧織 + getDataParams:{ + page: 1, + pageSize:10, + dictType:1, + }, } }, created() { @@ -264,6 +328,7 @@ // this.getProductList() // } this.getTableInfo() + this.getWorkshopList() }, watch: { silkTableList: { @@ -275,6 +340,10 @@ }, computed: {}, methods: { + // 鑷畾涔夎〃澶寸偣鍑讳簨浠� + settingClick(item) { + this.$emit("settingClick", item); + }, getTableInfo() { this.tableList = this.silkTableList if (this.tableList.tableData.length === 1 && this.tableList.tableData[0].name === "") { @@ -322,6 +391,16 @@ clearupColumn(prop) { console.log(prop) this.$emit("clearupColumn", prop) + }, + async getWorkshopList(){ + await getDict({ + dictType:this.getDataParams.dictType, + page:this.getDataParams.page, + pageSize:this.getDataParams.pageSize, + }).then((res)=>{ + console.log(res,"res") + this.workshopList=res.data + }) } }, //瑙e喅琛ㄦ牸鎶栧姩闂 @@ -329,7 +408,7 @@ this.$nextTick(() => { this.$refs["fromTable"].doLayout() }) - } + }, } </script> -- Gitblit v1.8.0