|
@@ -19,7 +19,6 @@
|
|
|
color: '#000000'
|
|
|
}"
|
|
|
:data="tableData"
|
|
|
- v-else
|
|
|
>
|
|
|
<el-table-column prop="name" label="姓名">
|
|
|
<template #default="scope">
|
|
@@ -29,8 +28,20 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="xb" label="性别">
|
|
|
<template #default="scope">
|
|
|
- <el-input v-model="scope.row.xb" v-if="scope.row.isEdit" />
|
|
|
- <span v-else>{{ scope.row.xb }}</span>
|
|
|
+ <el-select
|
|
|
+ v-if="scope.row.isEdit"
|
|
|
+ v-model="scope.row.xb"
|
|
|
+ style="width: 100%"
|
|
|
+ placeholder="请选择学历水平"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="opt in sexOptions"
|
|
|
+ :key="opt.value"
|
|
|
+ :label="opt.label"
|
|
|
+ :value="opt.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ <span v-else>{{ degreeShowValue(scope.row.xb, sexOptions) }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="gzdw" label="工作单位">
|
|
@@ -53,8 +64,20 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="gx" label="与本人关系">
|
|
|
<template #default="scope">
|
|
|
- <el-input v-model="scope.row.gx" v-if="scope.row.isEdit" />
|
|
|
- <span v-else>{{ scope.row.gx }}</span>
|
|
|
+ <el-select
|
|
|
+ v-if="scope.row.isEdit"
|
|
|
+ v-model="scope.row.gx"
|
|
|
+ style="width: 100%"
|
|
|
+ placeholder="请选择学历水平"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="opt in relationOptions"
|
|
|
+ :key="opt.value"
|
|
|
+ :label="opt.label"
|
|
|
+ :value="opt.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ <span v-else>{{ degreeShowValue(scope.row.gx, sexOptions) }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column fixed="right" label="操作" width="140">
|
|
@@ -88,6 +111,15 @@
|
|
|
*/
|
|
|
|
|
|
import { cloneDeep } from 'lodash-es'
|
|
|
+import { getDictList } from './index'
|
|
|
+
|
|
|
+// 字典
|
|
|
+const formConfigList = getDictList()
|
|
|
+const sexOptions = formConfigList['sex']
|
|
|
+const relationOptions = formConfigList['jjlxrgx']
|
|
|
+const degreeShowValue = (value, options) => {
|
|
|
+ return options.find((item) => item.value == value)?.label ?? ''
|
|
|
+}
|
|
|
|
|
|
interface ITable {
|
|
|
id?: string
|
|
@@ -187,7 +219,7 @@ const deleteRow = (index: number) => {
|
|
|
.add-tag {
|
|
|
position: absolute;
|
|
|
top: 2px;
|
|
|
- left: 120px;
|
|
|
+ right: 0;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
.detail-table {
|