From 36d3d9da36c71e65081e38cf9cfbd5e0ff6bfeed Mon Sep 17 00:00:00 2001 From: ludc Date: 星期五, 14 七月 2023 21:15:42 +0800 Subject: [PATCH] Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs --- Source/UBCS-WEB/src/components/work/BusinessWork.vue | 63 +++++++++++++++++++++---------- 1 files changed, 43 insertions(+), 20 deletions(-) diff --git a/Source/UBCS-WEB/src/components/work/BusinessWork.vue b/Source/UBCS-WEB/src/components/work/BusinessWork.vue index 3597bfa..ff955e8 100644 --- a/Source/UBCS-WEB/src/components/work/BusinessWork.vue +++ b/Source/UBCS-WEB/src/components/work/BusinessWork.vue @@ -22,17 +22,25 @@ :show-overflow-tooltip="true" align="center" > - <!-- 缂栬緫鍜屽睍绀洪�昏緫 --> - <!-- <template slot-scope="{ row }">--> - <!-- <el-input v-if="editingRow === row && editShow== item.prop" v-model="row[item.prop]" @blur="saveRow"></el-input>--> - <!-- <span v-else>{{row[item.prop]}}</span>--> - <!-- <el-switch--> - <!-- v-if="editShow === 'true'"--> - <!-- v-model="row[item.prop]"--> - <!-- active-color="#13ce66"--> - <!-- inactive-color="#ff4949">--> - <!-- </el-switch>--> - <!-- </template>--> + <template slot-scope="{ row }"> + <el-input v-if="editingRow === row && editShow== item.prop && item.prop != 'codeDateFormat' && (item.edit == 'text' ||item.edit == 'refer' )" v-model="row[item.prop]" + @blur="editingRows=null"></el-input> + <el-input-number size="small" controls-position="right" v-if="editingRow === row && editShow== item.prop && item.edit == 'number'" v-model="row[item.prop]" + @blur="editingRows=null" :style="{width:(item.width-10)+'px'}"></el-input-number> + <el-select v-model="row[item.prop]" filterable allow-create default-first-option slot="prepend" v-if="editingRow === row && editShow== item.prop && item.edit == 'select' " @blur="editingRows=null"> + <el-option + v-for="optionItem in item.data" + :key="optionItem.dictValue" + :label="optionItem.dictValue" + :value="optionItem.dictValue"> + </el-option> + </el-select> + <el-switch + v-if="item.edit === 'switch' || item.edit === 'truefalse'" v-model="row[item.prop]" active-value="true" + inactive-value="false"> + </el-switch> + <span v-else>{{ row[item.prop] }}</span> + </template> </el-table-column> </el-table> </div> @@ -53,16 +61,22 @@ tableData:[], editingRow: null, editShow: "", - editAttr: "" + editAttr: "", + columnType: { + text: "input", + combox: "select", + truefalse: "switch", + number: "number", + datetime: "datetime", + } } }, watch:{ ids:{ handler(newval,oldval){ this.BuinessOids=newval; + this.CrudHeaderRend() this.BuinseseRend() - console.log(newval) - console.log(this.BuinessOids) }, deep:true } @@ -78,11 +92,16 @@ //琛ㄦ牸澶存覆鏌� CrudHeaderRend() { if (this.codeClassifyOid != "") { + var data=new FormData() + data.append('templateId', this.templateId) + data.append('taskId', this.taskId) + data.append('modelKey', this.modelKey) + data.append('codeClassifyOid', this.codeClassifyOid) FlowTable({ - templateId: this.templateId, - taskId : this.taskId , - modelKey: this.modelKey, - codeClassifyOid: this.codeClassifyOid + 'templateId': this.templateId, + 'taskId': this.taskId, + 'modelKey': this.modelKey, + 'codeClassifyOid': this.codeClassifyOid }).then((res) => { this.options = res.data.tableDefineVO.seniorQueryColumns; this.List = res.data.tableDefineVO.cols[0]; @@ -106,8 +125,12 @@ return row[column.property] == 'true' || row[column.property] == '1' ? '鏄�' : '鍚�' } } + if (item.edit == 'select') { + //闇�瑕佽幏鍙栦笅鎷夋鏁版嵁 + columnItem.data=[] + } } - this.tableHeadData.push(columnItem) + this.tableHeadData.push(Object.assign(item, columnItem)) }); }); } @@ -122,7 +145,7 @@ }) }, // 鐩戝惉鍗曞厓鏍肩偣鍑讳簨浠跺苟瀛樺偍姝e湪缂栬緫鐨勮 - handleCellClick(row, column) { + handleCellClick(row, column, cell, event) { this.editingRow = row; this.editShow = column.property; }, -- Gitblit v1.9.3