|
@@ -59,39 +59,45 @@
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
@selection-change="handleSelectionChange">
|
|
@selection-change="handleSelectionChange">
|
|
<el-table-column
|
|
<el-table-column
|
|
- type="selection"
|
|
|
|
- >
|
|
|
|
- </el-table-column>
|
|
|
|
|
|
+ type="selection"
|
|
|
|
+ width="55">
|
|
|
|
+ </el-table-column>
|
|
|
|
+
|
|
<el-table-column
|
|
<el-table-column
|
|
label="电签元素名称"
|
|
label="电签元素名称"
|
|
|
|
+ prop="eName"
|
|
>
|
|
>
|
|
- <template slot-scope="scope">{{ scope.row.date }}</template>
|
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="name"
|
|
|
|
|
|
+ prop="elementTypeName"
|
|
label="字符类型"
|
|
label="字符类型"
|
|
>
|
|
>
|
|
|
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="address"
|
|
|
|
|
|
+
|
|
label="元素来源"
|
|
label="元素来源"
|
|
>
|
|
>
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-link type="primary" @click="eleCheck(scope.row,scope.$index,1)">查看</el-link>
|
|
|
|
+ </template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="address"
|
|
|
|
|
|
+
|
|
label="绑定岗位"
|
|
label="绑定岗位"
|
|
>
|
|
>
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-link type="primary" @click="eleCheck(scope.row,scope.$index,1)">查看</el-link>
|
|
|
|
+ </template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="tag"
|
|
|
|
|
|
+ prop="status"
|
|
label="状态"
|
|
label="状态"
|
|
width="100"
|
|
width="100"
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-tag
|
|
|
|
- :type="scope.row.tag === '家' ? 'primary' : 'success'"
|
|
|
|
- disable-transitions>{{scope.row.tag}}</el-tag>
|
|
|
|
|
|
+ <i class="el-icon-success" style="font-size: 20px;color:#67C23A" v-if="scope.row.status==1"></i>
|
|
|
|
+ <i class="el-icon-error" style="font-size: 20px;color:red" v-else></i>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -103,7 +109,7 @@
|
|
:page-sizes="[10, 20, 30, 40,50]"
|
|
:page-sizes="[10, 20, 30, 40,50]"
|
|
:page-size="pageSize"
|
|
:page-size="pageSize"
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
- :total="400">
|
|
|
|
|
|
+ :total="total">
|
|
</el-pagination>
|
|
</el-pagination>
|
|
</div>
|
|
</div>
|
|
</el-col>
|
|
</el-col>
|
|
@@ -118,9 +124,7 @@
|
|
:before-close="handleAddClose">
|
|
:before-close="handleAddClose">
|
|
<div>
|
|
<div>
|
|
<el-table
|
|
<el-table
|
|
-
|
|
|
|
:data="tableData1"
|
|
:data="tableData1"
|
|
-
|
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
>
|
|
>
|
|
|
|
|
|
@@ -164,14 +168,14 @@
|
|
label="元素来源"
|
|
label="元素来源"
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-link type="primary" @click="eleCheck(scope.row)">请选择</el-link>
|
|
|
|
|
|
+ <el-link type="primary" @click="eleCheck(scope.row,scope.$index)">请选择</el-link>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
prop="address"
|
|
prop="address"
|
|
label="绑定岗位"
|
|
label="绑定岗位"
|
|
> <template slot-scope="scope">
|
|
> <template slot-scope="scope">
|
|
- <el-link type="primary" @click="selectPost(scope.row)">请选择</el-link>
|
|
|
|
|
|
+ <el-link type="primary" @click="selectPost(scope.row,scope.$index)">请选择</el-link>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
@@ -180,10 +184,10 @@
|
|
width="100"
|
|
width="100"
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-button type="text" @click="handleAdd(scope.row)">
|
|
|
|
|
|
+ <el-button type="text" @click="handleAdd(scope.row,$index)">
|
|
<i class="el-icon-circle-plus-outline" style="font-size: 20px;color:#67C23A"></i>
|
|
<i class="el-icon-circle-plus-outline" style="font-size: 20px;color:#67C23A"></i>
|
|
</el-button>
|
|
</el-button>
|
|
- <el-button type="text" @click="handleDelete(scope.row)">
|
|
|
|
|
|
+ <el-button type="text" @click="handleDelete(scope.row,$index)">
|
|
<i class="el-icon-remove-outline" style="font-size: 20px;color:red"></i>
|
|
<i class="el-icon-remove-outline" style="font-size: 20px;color:red"></i>
|
|
</el-button>
|
|
</el-button>
|
|
</template>
|
|
</template>
|
|
@@ -192,7 +196,7 @@
|
|
</div>
|
|
</div>
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
<el-button @click="addDialogVisible = false">取 消</el-button>
|
|
<el-button @click="addDialogVisible = false">取 消</el-button>
|
|
- <el-button type="primary" @click="addDialogVisible = false">确 定</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="saveBatch" :loading="saveBatchLoading">确 定</el-button>
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
<!-- 选择元素来源 -->
|
|
<!-- 选择元素来源 -->
|
|
@@ -201,19 +205,19 @@
|
|
title="选择元素来源"
|
|
title="选择元素来源"
|
|
:visible.sync="sourceDialogVisible"
|
|
:visible.sync="sourceDialogVisible"
|
|
width="50%"
|
|
width="50%"
|
|
- :before-close="handleSourceClose">
|
|
|
|
|
|
+ :close="handleSourceClose">
|
|
<div>
|
|
<div>
|
|
<p class="tip-text" >
|
|
<p class="tip-text" >
|
|
提示:配置之后会把所有元素表该元素字段都自动配置电签岗位对应关系。
|
|
提示:配置之后会把所有元素表该元素字段都自动配置电签岗位对应关系。
|
|
</p>
|
|
</p>
|
|
<div class="source-radio-group">
|
|
<div class="source-radio-group">
|
|
<el-radio-group v-model="selectedSourceOption">
|
|
<el-radio-group v-model="selectedSourceOption">
|
|
- <el-radio :label="1">适配所有元素表</el-radio>
|
|
|
|
- <el-radio :label="2">部分元素表</el-radio>
|
|
|
|
|
|
+ <el-radio :label="0">适配所有元素表</el-radio>
|
|
|
|
+ <el-radio :label="1">部分元素表</el-radio>
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
</div>
|
|
</div>
|
|
<!-- 并行显示的下拉框 -->
|
|
<!-- 并行显示的下拉框 -->
|
|
- <div v-if="selectedSourceOption === 2" class="dropdown-container">
|
|
|
|
|
|
+ <div v-if="selectedSourceOption === 1" class="dropdown-container">
|
|
<el-select v-model="elementCategorySelect" placeholder="请选择表分类" style="flex: 1; margin-right: 10px;" clearable @change="changeSelect" >
|
|
<el-select v-model="elementCategorySelect" placeholder="请选择表分类" style="flex: 1; margin-right: 10px;" clearable @change="changeSelect" >
|
|
<el-option
|
|
<el-option
|
|
v-for="item in elementCategoryOptions"
|
|
v-for="item in elementCategoryOptions"
|
|
@@ -227,9 +231,7 @@
|
|
placeholder="请输入元素表名称进行模糊检索"
|
|
placeholder="请输入元素表名称进行模糊检索"
|
|
style="flex: 1;"
|
|
style="flex: 1;"
|
|
filterable clearable multiple
|
|
filterable clearable multiple
|
|
- collapse-tags
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
v-for="item in elementTableOptions"
|
|
v-for="item in elementTableOptions"
|
|
@@ -239,18 +241,31 @@
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
- <div v-if="selectedSourceOption === 2" class="element-list-container">
|
|
|
|
|
|
+ <div v-if="selectedSourceOption === 1&&!isEleView" class="element-list-container">
|
|
<el-scrollbar>
|
|
<el-scrollbar>
|
|
<ul class="element-checkbox-list">
|
|
<ul class="element-checkbox-list">
|
|
- <li v-for="(item, index) in elementList" :key="index" class="element-item">
|
|
|
|
- <el-checkbox v-model="item.checked">{{ item.label }}</el-checkbox>
|
|
|
|
|
|
+ <li v-for="(item, index) in elementList" :key="item.value" class="element-item">
|
|
|
|
+ <el-checkbox v-model="item.checked" @change="changeEleClick($event,item)">{{ item.label }}</el-checkbox>
|
|
</li>
|
|
</li>
|
|
</ul>
|
|
</ul>
|
|
</el-scrollbar>
|
|
</el-scrollbar>
|
|
</div>
|
|
</div>
|
|
|
|
+ <el-table
|
|
|
|
+ v-else
|
|
|
|
+ :data="elementList1"
|
|
|
|
+ border
|
|
|
|
+ style="width: 100%">
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="label"
|
|
|
|
+ label="元素表名称"
|
|
|
|
+ >
|
|
|
|
+ </el-table-column>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ </el-table>
|
|
</div>
|
|
</div>
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
- <el-button @click="sourceDialogVisible = false">取 消</el-button>
|
|
|
|
|
|
+ <el-button @click="quitClose">取 消</el-button>
|
|
<el-button type="primary" @click="confirmSourceSelection">确 定</el-button>
|
|
<el-button type="primary" @click="confirmSourceSelection">确 定</el-button>
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
@@ -272,7 +287,8 @@
|
|
:value="item.value">
|
|
:value="item.value">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
- <el-select v-model="positionNameSelect" filterable placeholder="请输入岗位名称进行模糊检索" style="flex: 1;">
|
|
|
|
|
|
+ <el-select v-model="positionNameSelect" filterable multiple placeholder="请输入岗位名称进行模糊检索" style="flex: 1;" @change="changePositionName" >
|
|
|
|
+
|
|
<el-option
|
|
<el-option
|
|
v-for="item in positionNameOptions"
|
|
v-for="item in positionNameOptions"
|
|
:key="item.value"
|
|
:key="item.value"
|
|
@@ -287,14 +303,14 @@
|
|
<el-scrollbar > <!-- 18行 * 30px = 540px -->
|
|
<el-scrollbar > <!-- 18行 * 30px = 540px -->
|
|
<ul class="position-checkbox-list">
|
|
<ul class="position-checkbox-list">
|
|
<li v-for="(item, index) in positionList" :key="index" class="position-item">
|
|
<li v-for="(item, index) in positionList" :key="index" class="position-item">
|
|
- <el-checkbox v-model="item.checked">{{ item.name }}</el-checkbox>
|
|
|
|
|
|
+ <el-checkbox v-model="item.checked" @change="changePosClick($event,item)">{{ item.label }}</el-checkbox>
|
|
</li>
|
|
</li>
|
|
</ul>
|
|
</ul>
|
|
</el-scrollbar>
|
|
</el-scrollbar>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
- <el-button @click="bindPostDialogVisible = false">取 消</el-button>
|
|
|
|
|
|
+ <el-button @click="positionClose">取 消</el-button>
|
|
<el-button type="primary" @click="confirmBindPostSelection">确 定</el-button>
|
|
<el-button type="primary" @click="confirmBindPostSelection">确 定</el-button>
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
@@ -302,7 +318,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
- import {getRoleList,getListPage,getElementList,getTableTypeList,getTableList,queryAllRoleList} from "@/api/sigital/signer.js";
|
|
|
|
|
|
+ import {getRoleList,getListPage,getElementList,getTableTypeList,getTableList,queryAllRoleList,submitEle,elementDetail} from "@/api/sigital/signer.js";
|
|
import { getDictionary } from "@/api/system/dict";
|
|
import { getDictionary } from "@/api/system/dict";
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
@@ -318,14 +334,20 @@
|
|
},
|
|
},
|
|
currentPage: 1,
|
|
currentPage: 1,
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
|
|
+ total: 0,
|
|
|
|
+
|
|
addDialogVisible: false,
|
|
addDialogVisible: false,
|
|
|
|
+ saveBatchLoading: false,
|
|
|
|
+
|
|
tableData1: [{}],
|
|
tableData1: [{}],
|
|
eleOptions: [
|
|
eleOptions: [
|
|
|
|
|
|
],
|
|
],
|
|
dataTypeList: [],
|
|
dataTypeList: [],
|
|
sourceDialogVisible: false, // 控制弹窗显示
|
|
sourceDialogVisible: false, // 控制弹窗显示
|
|
|
|
+ isEleView: true, // 是否查看
|
|
eleCheckRow: {},
|
|
eleCheckRow: {},
|
|
|
|
+ eleIndex: 0,
|
|
selectedSourceOption: 1, // 默认选中 "适配所有元素表"
|
|
selectedSourceOption: 1, // 默认选中 "适配所有元素表"
|
|
elementCategorySelect: '', // 元素分类表分类选中值
|
|
elementCategorySelect: '', // 元素分类表分类选中值
|
|
elementTableNameSelect: [], // 元素表名称筛选选中值
|
|
elementTableNameSelect: [], // 元素表名称筛选选中值
|
|
@@ -336,45 +358,60 @@
|
|
|
|
|
|
],
|
|
],
|
|
elementList:[],
|
|
elementList:[],
|
|
|
|
+ elementList1:[],
|
|
bindPostDialogVisible: false,
|
|
bindPostDialogVisible: false,
|
|
partyCategorySelect: '', // 参建方分类选中值
|
|
partyCategorySelect: '', // 参建方分类选中值
|
|
- positionNameSelect: '', // 岗位名称选中值
|
|
|
|
|
|
+ positionNameSelect: [], // 岗位名称选中值
|
|
partyCategoryOptions: [
|
|
partyCategoryOptions: [
|
|
- { value: 'contractor', label: '施工单位' },
|
|
|
|
- { value: 'supervisor', label: '监理单位' },
|
|
|
|
- { value: 'owner', label: '业主单位' }
|
|
|
|
- ],
|
|
|
|
- positionNameOptions: [
|
|
|
|
- { value: 'manager', label: '项目经理' },
|
|
|
|
- { value: 'supervise', label: '现场监理' },
|
|
|
|
- { value: 'engineer', label: '技术负责人' }
|
|
|
|
|
|
+ { value: '1', label: '施工方' },
|
|
|
|
+ { value: '2', label: '监理方' },
|
|
|
|
+ { value: '3', label: '业主方' }
|
|
],
|
|
],
|
|
- positionList: Array.from({ length: 20 }, (_, i) => ({
|
|
|
|
- name: `岗位名称 ${i + 1}`,
|
|
|
|
- checked: false
|
|
|
|
- })),
|
|
|
|
|
|
+ positionNameOptions: [],
|
|
|
|
+ positionList: [],
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
elementTableNameSelect(newVal) {
|
|
elementTableNameSelect(newVal) {
|
|
if (newVal) {
|
|
if (newVal) {
|
|
-
|
|
|
|
- let arr=[];
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ let arr=[];
|
|
this.elementTableOptions.forEach(item => {
|
|
this.elementTableOptions.forEach(item => {
|
|
newVal.forEach(tableName => {
|
|
newVal.forEach(tableName => {
|
|
if (item.value === tableName) {
|
|
if (item.value === tableName) {
|
|
- item.checked = true;
|
|
|
|
arr.push(item)
|
|
arr.push(item)
|
|
}
|
|
}
|
|
});
|
|
});
|
|
});
|
|
});
|
|
-
|
|
|
|
- this.elementList = arr;
|
|
|
|
- // this.fetchElementList(newVal);
|
|
|
|
|
|
+
|
|
|
|
+ // 更新 elementList 并自动选中对应的项
|
|
|
|
+ this.elementList = arr.map(element => ({
|
|
|
|
+ ...element,
|
|
|
|
+ checked: true // 自动选中
|
|
|
|
+ }))
|
|
|
|
+
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ positionNameSelect(newVal) {
|
|
|
|
+ if (newVal) {
|
|
|
|
+ let arr=[];
|
|
|
|
+ this.positionNameOptions.forEach(item => {
|
|
|
|
+ newVal.forEach(roleName => {
|
|
|
|
+ if (item.value === roleName) {
|
|
|
|
+ arr.push(item)
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ // 更新 elementList 并自动选中对应的项
|
|
|
|
+ this.positionList = arr.map(element => ({
|
|
|
|
+ ...element,
|
|
|
|
+ checked: true // 自动选中
|
|
|
|
+ }))
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
clearInput() {
|
|
clearInput() {
|
|
@@ -415,21 +452,20 @@
|
|
id: this.selectedItem.id||'',
|
|
id: this.selectedItem.id||'',
|
|
}).then(res => {
|
|
}).then(res => {
|
|
this.tableLoading = false;
|
|
this.tableLoading = false;
|
|
- if (res.code == 200) {
|
|
|
|
|
|
+ if (res.data.code == 200) {
|
|
|
|
|
|
- this.tableData = res.data;
|
|
|
|
|
|
+ this.tableData = res.data.data['records'];
|
|
|
|
+ this.total = res.data.data['total'];
|
|
}else{
|
|
}else{
|
|
this.tableData = [];
|
|
this.tableData = [];
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
handleSizeChange(val) {
|
|
handleSizeChange(val) {
|
|
- console.log(`每页 ${val} 条`);
|
|
|
|
this.pageSize = val;
|
|
this.pageSize = val;
|
|
this.getTableData();
|
|
this.getTableData();
|
|
},
|
|
},
|
|
handleCurrentChange(val) {
|
|
handleCurrentChange(val) {
|
|
- console.log(`当前页: ${val}`);
|
|
|
|
this.currentPage = val;
|
|
this.currentPage = val;
|
|
this.getTableData();
|
|
this.getTableData();
|
|
},
|
|
},
|
|
@@ -441,7 +477,6 @@
|
|
},
|
|
},
|
|
getEleOptions(){
|
|
getEleOptions(){
|
|
getElementList().then(res => {
|
|
getElementList().then(res => {
|
|
-
|
|
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
this.eleOptions = res.data.data.map(item => ({
|
|
this.eleOptions = res.data.data.map(item => ({
|
|
value: item.id,
|
|
value: item.id,
|
|
@@ -468,30 +503,57 @@
|
|
this.dataTypeList = res.data.data;
|
|
this.dataTypeList = res.data.data;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- handleAdd(row) {
|
|
|
|
|
|
+ handleAdd(row,index) {
|
|
console.log('新增', row);
|
|
console.log('新增', row);
|
|
|
|
+ this.tableData1.splice(index, 0, {});
|
|
|
|
+
|
|
// 新增操作的逻辑
|
|
// 新增操作的逻辑
|
|
},
|
|
},
|
|
- handleDelete(row) {
|
|
|
|
|
|
+ handleDelete(row,index) {
|
|
console.log('删除', row);
|
|
console.log('删除', row);
|
|
|
|
+ this.tableData1.splice(index, 1);
|
|
// 删除操作的逻辑
|
|
// 删除操作的逻辑
|
|
},
|
|
},
|
|
changeEleType(value,row) {
|
|
changeEleType(value,row) {
|
|
const selectedItem = this.eleOptions.find(item => item.value === value);
|
|
const selectedItem = this.eleOptions.find(item => item.value === value);
|
|
if (selectedItem && selectedItem.etype != null) {
|
|
if (selectedItem && selectedItem.etype != null) {
|
|
row.elementType = selectedItem.etype; // 假设接口返回的 eleOptions 中有 etype 字段
|
|
row.elementType = selectedItem.etype; // 假设接口返回的 eleOptions 中有 etype 字段
|
|
|
|
+ row.eName=selectedItem.label;
|
|
|
|
+ row.elementId=selectedItem.value;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
},
|
|
//选择元素来源
|
|
//选择元素来源
|
|
- eleCheck(row) {
|
|
|
|
- console.log('选择元素来源');
|
|
|
|
- this.eleCheckRow = row;
|
|
|
|
-
|
|
|
|
- this.sourceDialogVisible = true;
|
|
|
|
- this.getElementCategoryOptions();
|
|
|
|
-
|
|
|
|
|
|
+ eleCheck(row,index,type) {
|
|
|
|
+ if(type===1){
|
|
|
|
+ this.isEleView = true;
|
|
|
|
+ this.getEleDetail(row.id)
|
|
|
|
+ this.selectedSourceOption=row.tableType
|
|
|
|
+ }else{
|
|
|
|
+ this.isEleView = false;
|
|
|
|
+ this.eleCheckRow = row;
|
|
|
|
+ this.eleIndex=index
|
|
|
|
+ this.selectedSourceOption=0
|
|
|
|
+ this.sourceDialogVisible = true;
|
|
|
|
+ this.getElementCategoryOptions();
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ //查看详情
|
|
|
|
+ getEleDetail(id){
|
|
|
|
+ elementDetail({
|
|
|
|
+ id
|
|
|
|
+ }).then(res => {
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ this.elementList1 = res.data;
|
|
|
|
+ }else{
|
|
|
|
+ this.elementList1 = [];
|
|
|
|
+ }
|
|
|
|
+ })
|
|
},
|
|
},
|
|
//获取元素表分类
|
|
//获取元素表分类
|
|
|
|
|
|
@@ -528,18 +590,84 @@
|
|
// 弹窗关闭时的回调
|
|
// 弹窗关闭时的回调
|
|
handleSourceClose(done) {
|
|
handleSourceClose(done) {
|
|
this.sourceDialogVisible = false;
|
|
this.sourceDialogVisible = false;
|
|
|
|
+
|
|
|
|
+
|
|
done();
|
|
done();
|
|
},
|
|
},
|
|
|
|
+ changeEleClick(value,item) {
|
|
|
|
+ if(!value){
|
|
|
|
+ this.elementTableNameSelect.forEach((ele,index)=>{
|
|
|
|
+ if(ele == item.value){
|
|
|
|
+ this.elementTableNameSelect.splice(index,1);
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ changePosClick(value,item) {
|
|
|
|
+ if(!value){
|
|
|
|
+ this.positionNameSelect.forEach((ele,index)=>{
|
|
|
|
+ if(ele == item.value){
|
|
|
|
+ this.positionNameSelect.splice(index,1);
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ quitClose() {
|
|
|
|
+ this.sourceDialogVisible = false;
|
|
|
|
+ this.selectedSourceOption = 1;
|
|
|
|
+ this.elementTableNameSelect = [];
|
|
|
|
+ this.elementList = [];
|
|
|
|
+ this.elementCategorySelect = '';
|
|
|
|
+ },
|
|
|
|
+ positionClose() {
|
|
|
|
+ this.bindPostDialogVisible = false;
|
|
|
|
+ this.partyCategorySelect=''
|
|
|
|
+ this.positionNameSelect = [];
|
|
|
|
+ this.positionList = [];
|
|
|
|
+ this.partyCategorySelect = '';
|
|
|
|
+ },
|
|
// 确认按钮点击事件
|
|
// 确认按钮点击事件
|
|
confirmSourceSelection() {
|
|
confirmSourceSelection() {
|
|
if (this.selectedSourceOption === 1) {
|
|
if (this.selectedSourceOption === 1) {
|
|
// 处理适配所有元素表的逻辑
|
|
// 处理适配所有元素表的逻辑
|
|
console.log("适配所有元素表");
|
|
console.log("适配所有元素表");
|
|
- this.eleCheckRow.tableType = 1;
|
|
|
|
|
|
+ // this.eleCheckRow.tableType = 1;
|
|
|
|
+ this.tableData1.forEach((item, index) => {
|
|
|
|
+ if (item.id === this.eleCheckRow.id) {
|
|
|
|
+ this.tableData1[index].tableType = 1;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
} else {
|
|
} else {
|
|
// 处理适配部分元素表的逻辑
|
|
// 处理适配部分元素表的逻辑
|
|
console.log("适配部分元素表");
|
|
console.log("适配部分元素表");
|
|
- this.eleCheckRow.tableType = 2
|
|
|
|
|
|
+ // this.eleCheckRow.tableType = 2
|
|
|
|
+ this.tableData1.forEach((item, index) => {
|
|
|
|
+ if (item.id === this.eleCheckRow.id) {
|
|
|
|
+ this.tableData1[index].tableType = 2;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ if (this.elementTableNameSelect.length > 0) {
|
|
|
|
+ this.tableData1.forEach((item, index) => {
|
|
|
|
+ if (item.id === this.eleCheckRow.id) {
|
|
|
|
+ this.tableData1[index].tableIds = this.elementTableNameSelect.join(',');
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }else{
|
|
|
|
+ this.tableData1.forEach((item, index) => {
|
|
|
|
+ if (item.id === this.eleCheckRow.id) {
|
|
|
|
+ this.tableData1[index].tableIds ='';
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
// 关闭弹窗
|
|
// 关闭弹窗
|
|
@@ -548,8 +676,31 @@
|
|
// 打开绑定岗位弹窗
|
|
// 打开绑定岗位弹窗
|
|
selectPost(row) {
|
|
selectPost(row) {
|
|
this.bindPostDialogVisible = true;
|
|
this.bindPostDialogVisible = true;
|
|
|
|
+ this.partyCategorySelect='1'
|
|
|
|
+ this.getPositionList();
|
|
this.selectedPostRow = row;
|
|
this.selectedPostRow = row;
|
|
|
|
+ this.positionNameSelect = [];
|
|
|
|
+ this.partyCategorySelect = '';
|
|
|
|
+ this.positionList = [];
|
|
},
|
|
},
|
|
|
|
+ changePositionName() {
|
|
|
|
+ this.getPositionList();
|
|
|
|
+ },
|
|
|
|
+ // 获取岗位列表
|
|
|
|
+ getPositionList() {
|
|
|
|
+ queryAllRoleList({
|
|
|
|
+ type:this.partyCategorySelect
|
|
|
|
+ }).then(res => {
|
|
|
|
+
|
|
|
|
+ if (res.data.code == 200) {
|
|
|
|
+ this.positionNameOptions = res.data.data.map(item => ({
|
|
|
|
+ value: item.id,
|
|
|
|
+ label: item.roleName
|
|
|
|
+ }));
|
|
|
|
+ }else{ this.positionNameOptions = [];}
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
|
|
// 弹窗关闭回调
|
|
// 弹窗关闭回调
|
|
handleBindPostClose(done) {
|
|
handleBindPostClose(done) {
|
|
@@ -559,14 +710,39 @@
|
|
|
|
|
|
// 确认选择岗位
|
|
// 确认选择岗位
|
|
confirmBindPostSelection() {
|
|
confirmBindPostSelection() {
|
|
- const selectedPositions = this.positionList.filter(item => item.checked);
|
|
|
|
- console.log('选中的岗位:', selectedPositions);
|
|
|
|
-
|
|
|
|
- // 示例:将选中岗位赋值给当前行
|
|
|
|
- this.selectedPostRow.selectedPositions = selectedPositions.map(i => i.name);
|
|
|
|
-
|
|
|
|
|
|
+ if (this.positionNameSelect.length > 0) {
|
|
|
|
+ // this.selectedPostRow.roleIds = this.positionNameSelect.join(',');
|
|
|
|
+ this.tableData1.forEach((item, index) => {
|
|
|
|
+ if (item.id === this.selectedPostRow.id) {
|
|
|
|
+ this.tableData1[index].roleIds =this.positionNameSelect.join(',');
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }else{
|
|
|
|
+ // this.selectedPostRow.roleIds = '';
|
|
|
|
+ this.tableData1.forEach((item, index) => {
|
|
|
|
+ if (item.id === this.selectedPostRow.id) {
|
|
|
|
+ this.tableData1[index].roleIds =''
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ console.log(this.tableData1,'this.tableData1');
|
|
this.bindPostDialogVisible = false;
|
|
this.bindPostDialogVisible = false;
|
|
},
|
|
},
|
|
|
|
+ saveBatch(){
|
|
|
|
+ console.log(this.tableData1,'this.tableData1');
|
|
|
|
+ this.saveBatchLoading = true;
|
|
|
|
+ submitEle(
|
|
|
|
+ this.tableData1
|
|
|
|
+ ).then((res) => {
|
|
|
|
+ if(res.data.code==200){
|
|
|
|
+ this.$message.success(res.data.msg)
|
|
|
|
+ }else{
|
|
|
|
+ this.$message.error(res.data.msg)
|
|
|
|
+ }
|
|
|
|
+ }).finally(() => {
|
|
|
|
+ this.saveBatchLoading = false;
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|