From ce68dd3e32877d786f878657b464be4a488bb245 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期一, 17 七月 2023 14:17:59 +0800
Subject: [PATCH] Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs
---
Source/UBCS-WEB/src/components/work/BusinessWork.vue | 38 +++++++++++++++++++++++++-------------
1 files changed, 25 insertions(+), 13 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/work/BusinessWork.vue b/Source/UBCS-WEB/src/components/work/BusinessWork.vue
index 783f534..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>
@@ -117,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))
});
});
}
@@ -133,7 +145,7 @@
})
},
// 鐩戝惉鍗曞厓鏍肩偣鍑讳簨浠跺苟瀛樺偍姝e湪缂栬緫鐨勮
- handleCellClick(row, column) {
+ handleCellClick(row, column, cell, event) {
this.editingRow = row;
this.editShow = column.property;
},
--
Gitblit v1.9.3