|
@@ -42,25 +42,35 @@
|
|
|
</el-table>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane key="empPosition" label="行政职务字典" name="empPosition">
|
|
|
- <el-table :data="positionData" border style="width: 100%" stripe highlight-current-row
|
|
|
- :key="empPositionKey">
|
|
|
+ <el-table :data="positionData" border style="width: 100%" height="calc(100% - 1px)" stripe
|
|
|
+ highlight-current-row :key="empPositionKey" class="position-table normal-size">
|
|
|
<el-table-column type="index" label="序号" width="100" />
|
|
|
- <el-table-column prop="code" label="分类编码" width="200">
|
|
|
+ <el-table-column prop="code" label="分类编码" width="160">
|
|
|
<template v-slot="scope">
|
|
|
<el-input v-if="scope.row.isEdit" size="small" v-model="scope.row.code"></el-input>
|
|
|
<span v-else>{{ scope.row.code }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="name" label="名称" width="280">
|
|
|
+ <el-table-column prop="name" label="名称" width="240">
|
|
|
<template v-slot="scope">
|
|
|
<el-input v-if="scope.row.isEdit" size="small" v-model="scope.row.name"></el-input>
|
|
|
<span v-else>{{ scope.row.name }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="delFlag" label="是否无效(无效填1)" width="200">
|
|
|
+ <el-table-column prop="delFlag" label="是否无效" width="160">
|
|
|
<template v-slot="scope">
|
|
|
- <el-input v-if="scope.row.isEdit" size="small" v-model="scope.row.delFlag"></el-input>
|
|
|
- <span v-else>{{ scope.row.delFlag }}</span>
|
|
|
+ <div v-if="scope.row.isEdit">
|
|
|
+ <el-select v-model="scope.row.delFlag" clearable placeholder="请选择是否无效">
|
|
|
+ <el-option v-for="option in delFlagOptions" :key="option.code" :label="option.name"
|
|
|
+ :value="option.code"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+ <el-select v-model="scope.row.delFlag" disabled placeholder="请选择是否无效">
|
|
|
+ <el-option v-for="option in delFlagOptions" :key="option.code" :label="option.name"
|
|
|
+ :value="option.code"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="pyCode" label="拼音码" width="200" />
|
|
@@ -83,8 +93,8 @@
|
|
|
</el-table>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane key="empTitle" label="专业技术职称" name="empTitle">
|
|
|
- <el-table :data="empTitleData" border style="width: 100%" stripe highlight-current-row
|
|
|
- :key="empTitleKey">
|
|
|
+ <el-table :data="empTitleData" border style="width: 100%" height="calc(100% - 1px)" stripe
|
|
|
+ highlight-current-row :key="empTitleKey" class="emp-title-table normal-size">
|
|
|
<el-table-column type="index" label="序号" width="70" />
|
|
|
<el-table-column prop="code" label="分类编码" width="140">
|
|
|
<template v-slot="scope">
|
|
@@ -110,10 +120,20 @@
|
|
|
<span v-else>{{ scope.row.orderCode }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="delFlag" label="是否无效(无效填1)" width="160">
|
|
|
+ <el-table-column prop="delFlag" label="是否无效" width="140">
|
|
|
<template v-slot="scope">
|
|
|
- <el-input v-if="scope.row.isEdit" size="small" v-model="scope.row.delFlag"></el-input>
|
|
|
- <span v-else>{{ scope.row.delFlag }}</span>
|
|
|
+ <div v-if="scope.row.isEdit">
|
|
|
+ <el-select v-model="scope.row.delFlag" clearable placeholder="请选择是否无效">
|
|
|
+ <el-option v-for="option in delFlagOptions" :key="option.code" :label="option.name"
|
|
|
+ :value="option.code"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+ <el-select v-model="scope.row.delFlag" disabled placeholder="请选择是否无效">
|
|
|
+ <el-option v-for="option in delFlagOptions" :key="option.code" :label="option.name"
|
|
|
+ :value="option.code"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="pyCode" label="拼音码" width="160" />
|
|
@@ -139,22 +159,32 @@
|
|
|
<el-table :data="educationData" border style="width: 100%" stripe highlight-current-row
|
|
|
:key="educationKey">
|
|
|
<el-table-column type="index" label="序号" width="100" />
|
|
|
- <el-table-column prop="code" label="分类编码" width="200">
|
|
|
+ <el-table-column prop="code" label="分类编码" width="140">
|
|
|
<template v-slot="scope">
|
|
|
<el-input v-if="scope.row.isEdit" size="small" v-model="scope.row.code"></el-input>
|
|
|
<span v-else>{{ scope.row.code }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="name" label="名称" width="280">
|
|
|
+ <el-table-column prop="name" label="名称" width="240">
|
|
|
<template v-slot="scope">
|
|
|
<el-input v-if="scope.row.isEdit" size="small" v-model="scope.row.name"></el-input>
|
|
|
<span v-else>{{ scope.row.name }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="delFlag" label="是否无效(无效填1)" width="200">
|
|
|
+ <el-table-column prop="delFlag" label="是否无效" width="140">
|
|
|
<template v-slot="scope">
|
|
|
- <el-input v-if="scope.row.isEdit" size="small" v-model="scope.row.delFlag"></el-input>
|
|
|
- <span v-else>{{ scope.row.delFlag }}</span>
|
|
|
+ <div v-if="scope.row.isEdit">
|
|
|
+ <el-select v-model="scope.row.delFlag" clearable placeholder="请选择是否无效">
|
|
|
+ <el-option v-for="option in delFlagOptions" :key="option.code" :label="option.name"
|
|
|
+ :value="option.code"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+ <el-select v-model="scope.row.delFlag" disabled placeholder="请选择是否无效">
|
|
|
+ <el-option v-for="option in delFlagOptions" :key="option.code" :label="option.name"
|
|
|
+ :value="option.code"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="pyCode" label="拼音码" width="200" />
|
|
@@ -214,19 +244,19 @@
|
|
|
<el-table :data="empInmarkData" border style="width: 100%" stripe highlight-current-row
|
|
|
:key="empInmarkKey">
|
|
|
<el-table-column type="index" label="序号" width="100" />
|
|
|
- <el-table-column prop="code" label="分类编码" width="200">
|
|
|
+ <el-table-column prop="code" label="分类编码" width="160">
|
|
|
<template v-slot="scope">
|
|
|
<el-input v-if="scope.row.isEdit" size="small" v-model="scope.row.code"></el-input>
|
|
|
<span v-else>{{ scope.row.code }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="name" label="名称" width="280">
|
|
|
+ <el-table-column prop="name" label="名称" width="240">
|
|
|
<template v-slot="scope">
|
|
|
<el-input v-if="scope.row.isEdit" size="small" v-model="scope.row.name"></el-input>
|
|
|
<span v-else>{{ scope.row.name }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="mark" label="标识" width="200">
|
|
|
+ <el-table-column prop="mark" label="标识" width="150">
|
|
|
<template v-slot="scope">
|
|
|
<el-input v-if="scope.row.isEdit" size="small" v-model="scope.row.mark"></el-input>
|
|
|
<span v-else>{{ scope.row.mark }}</span>
|
|
@@ -270,6 +300,7 @@ import {
|
|
|
|
|
|
const editableTabsValue = ref('deptClass')
|
|
|
const megTip = '分类编码(code)有变更,原始字典记录存在关联,请谨慎做更改,是否确认!!!'
|
|
|
+const delFlagOptions = [{ code: '0', name: '有效' }, { code: '1', name: '无效' }]
|
|
|
|
|
|
let deptClassKey = ref(1)
|
|
|
let empPositionKey = ref(1)
|
|
@@ -414,6 +445,14 @@ const onAddItem = () => {
|
|
|
isEdit: true,
|
|
|
isAdd: true,
|
|
|
})
|
|
|
+ const el = document.querySelector('.position-table .el-scrollbar__wrap')
|
|
|
+ const el2 = document.querySelector('.position-table .el-table__body tbody')
|
|
|
+ setTimeout(() => {
|
|
|
+ const height = el2.clientHeight - el.clientHeight
|
|
|
+ if (height > 0) {
|
|
|
+ el.scrollTop = height
|
|
|
+ }
|
|
|
+ }, 100)
|
|
|
} else if (editableTabsValue.value === 'empTitle') {
|
|
|
empTitleData.value.push({
|
|
|
code: '',
|
|
@@ -426,6 +465,14 @@ const onAddItem = () => {
|
|
|
isEdit: true,
|
|
|
isAdd: true,
|
|
|
})
|
|
|
+ const el = document.querySelector('.emp-title-table .el-scrollbar__wrap')
|
|
|
+ const el2 = document.querySelector('.emp-title-table .el-table__body tbody')
|
|
|
+ setTimeout(() => {
|
|
|
+ const height = el2.clientHeight - el.clientHeight
|
|
|
+ if (height > 0) {
|
|
|
+ el.scrollTop = height
|
|
|
+ }
|
|
|
+ }, 100)
|
|
|
} else if (editableTabsValue.value === 'education') {
|
|
|
educationData.value.push({
|
|
|
code: '',
|
|
@@ -464,7 +511,6 @@ const editDeptClass = (row) => {
|
|
|
// 备份原始数据
|
|
|
row['oldRow'] = JSON.parse(JSON.stringify(row))
|
|
|
row.isEdit = true
|
|
|
- deptClassKey.value = Math.random()
|
|
|
}
|
|
|
// 取消
|
|
|
const cancelDeptClass = (row, index) => {
|
|
@@ -599,7 +645,6 @@ const editEmpPosition = (row) => {
|
|
|
// 备份原始数据
|
|
|
row['oldRow'] = JSON.parse(JSON.stringify(row))
|
|
|
row.isEdit = true
|
|
|
- empPositionKey.value = Math.random()
|
|
|
}
|
|
|
// 取消
|
|
|
const cancelEmpPosition = (row, index) => {
|
|
@@ -612,7 +657,6 @@ const cancelEmpPosition = (row, index) => {
|
|
|
row[i] = row.oldRow[i]
|
|
|
}
|
|
|
}
|
|
|
- empPositionKey.value = Math.random()
|
|
|
}
|
|
|
// 保存
|
|
|
const updateEmpPosition = (row) => {
|
|
@@ -734,7 +778,6 @@ const editEmpTitle = (row) => {
|
|
|
// 备份原始数据
|
|
|
row['oldRow'] = JSON.parse(JSON.stringify(row))
|
|
|
row.isEdit = true
|
|
|
- empTitleKey.value = Math.random()
|
|
|
}
|
|
|
// 取消
|
|
|
const cancelEmpTitle = (row, index) => {
|
|
@@ -747,7 +790,6 @@ const cancelEmpTitle = (row, index) => {
|
|
|
row[i] = row.oldRow[i]
|
|
|
}
|
|
|
}
|
|
|
- empTitleKey.value = Math.random()
|
|
|
}
|
|
|
// 保存
|
|
|
const updateEmpTitle = (row) => {
|