|
@@ -47,12 +47,13 @@
|
|
|
|
|
|
<el-button type="primary" size="small" @click="addEleClick">新增</el-button>
|
|
<el-button type="primary" size="small" @click="addEleClick">新增</el-button>
|
|
<el-button type="info" size="small">编辑</el-button>
|
|
<el-button type="info" size="small">编辑</el-button>
|
|
- <el-button type="success" size="small">启用</el-button>
|
|
|
|
- <el-button type="warning" size="small">停用</el-button>
|
|
|
|
- <el-button type="danger" size="small">删除</el-button>
|
|
|
|
|
|
+ <el-button type="success" size="small" @click="openClick(row,1)" :loading="openLoading">启用</el-button>
|
|
|
|
+ <el-button type="warning" size="small" @click="openClick(row,0)" :loading="closeLoading">停用</el-button>
|
|
|
|
+ <el-button type="danger" size="small" @click="rowDel(row)" :loading="removeLoad">删除</el-button>
|
|
</div>
|
|
</div>
|
|
<div class="table-box">
|
|
<div class="table-box">
|
|
<el-table
|
|
<el-table
|
|
|
|
+ v-loading="tableLoading"
|
|
ref="multipleTable"
|
|
ref="multipleTable"
|
|
:data="tableData"
|
|
:data="tableData"
|
|
tooltip-effect="dark"
|
|
tooltip-effect="dark"
|
|
@@ -123,7 +124,7 @@
|
|
width="80%"
|
|
width="80%"
|
|
:before-close="handleAddClose">
|
|
:before-close="handleAddClose">
|
|
<div>
|
|
<div>
|
|
- <el-table
|
|
|
|
|
|
+ <el-table
|
|
:data="tableData1"
|
|
:data="tableData1"
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
>
|
|
>
|
|
@@ -318,7 +319,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
- import {getRoleList,getListPage,getElementList,getTableTypeList,getTableList,queryAllRoleList,submitEle,elementDetail} from "@/api/sigital/signer.js";
|
|
|
|
|
|
+ import {getRoleList,getListPage,getElementList,getTableTypeList,getTableList,queryAllRoleList,submitEle,elementDetail,removeEle,updateStatusEle} from "@/api/sigital/signer.js";
|
|
import { getDictionary } from "@/api/system/dict";
|
|
import { getDictionary } from "@/api/system/dict";
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
@@ -329,16 +330,22 @@
|
|
roleListLoading:false,
|
|
roleListLoading:false,
|
|
multipleTable:null,
|
|
multipleTable:null,
|
|
tableData: [],
|
|
tableData: [],
|
|
|
|
+ tableLoading: false,
|
|
|
|
+
|
|
selectedItem: {
|
|
selectedItem: {
|
|
id: '',
|
|
id: '',
|
|
},
|
|
},
|
|
|
|
+ removeLoad:false,
|
|
|
|
+ openLoading:false,
|
|
|
|
+ closeLoading:false,
|
|
|
|
+
|
|
currentPage: 1,
|
|
currentPage: 1,
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
total: 0,
|
|
total: 0,
|
|
|
|
|
|
addDialogVisible: false,
|
|
addDialogVisible: false,
|
|
saveBatchLoading: false,
|
|
saveBatchLoading: false,
|
|
-
|
|
|
|
|
|
+ checkedList: [],
|
|
tableData1: [{}],
|
|
tableData1: [{}],
|
|
eleOptions: [
|
|
eleOptions: [
|
|
|
|
|
|
@@ -410,6 +417,8 @@
|
|
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
},
|
|
},
|
|
@@ -422,7 +431,7 @@
|
|
this.getRoleData();
|
|
this.getRoleData();
|
|
},
|
|
},
|
|
handleSelectionChange(val) {
|
|
handleSelectionChange(val) {
|
|
-
|
|
|
|
|
|
+ this.checkedList=val
|
|
},
|
|
},
|
|
//获取岗位列表
|
|
//获取岗位列表
|
|
getRoleData() {
|
|
getRoleData() {
|
|
@@ -444,6 +453,7 @@
|
|
this.selectedItem = item;
|
|
this.selectedItem = item;
|
|
},
|
|
},
|
|
getTableData() {
|
|
getTableData() {
|
|
|
|
+ this.$refs.multipleTable.clearSelection();
|
|
this.tableLoading = true;
|
|
this.tableLoading = true;
|
|
getListPage({
|
|
getListPage({
|
|
size: this.pageSize,
|
|
size: this.pageSize,
|
|
@@ -472,6 +482,44 @@
|
|
addEleClick() {
|
|
addEleClick() {
|
|
this.addDialogVisible = true;
|
|
this.addDialogVisible = true;
|
|
},
|
|
},
|
|
|
|
+ //启用
|
|
|
|
+ openClick(row,type){
|
|
|
|
+ if(type==1){
|
|
|
|
+ this.openLoading=true;
|
|
|
|
+ }else{
|
|
|
|
+ this.closeLoading=true;
|
|
|
|
+ }
|
|
|
|
+ let ids = '';
|
|
|
|
+ if (this.checkedList.length > 0) {
|
|
|
|
+ ids = this.checkedList.map(item => item.id).join(',');
|
|
|
|
+ }
|
|
|
|
+ updateStatusEle({
|
|
|
|
+ ids: ids,
|
|
|
|
+ status: type
|
|
|
|
+ })
|
|
|
|
+ .then(res => {
|
|
|
|
+ if(res.data.code==200){
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'success',
|
|
|
|
+ message: '操作成功!'
|
|
|
|
+ });
|
|
|
|
+ this.getTableData();
|
|
|
|
+ }else{
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: res.data.msg
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }).finally(() => {
|
|
|
|
+ if(type==1){
|
|
|
|
+ this.openLoading=false;
|
|
|
|
+ }else{
|
|
|
|
+ this.closeLoading=false;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+
|
|
handleAddClose(){
|
|
handleAddClose(){
|
|
this.addDialogVisible = false;
|
|
this.addDialogVisible = false;
|
|
},
|
|
},
|
|
@@ -514,6 +562,42 @@
|
|
this.tableData1.splice(index, 1);
|
|
this.tableData1.splice(index, 1);
|
|
// 删除操作的逻辑
|
|
// 删除操作的逻辑
|
|
},
|
|
},
|
|
|
|
+ rowDel() {
|
|
|
|
+ let ids=''
|
|
|
|
+ if (this.checkedList.length > 0) {
|
|
|
|
+ ids = this.checkedList.map(item => item.id).join(',');
|
|
|
|
+ }
|
|
|
|
+ let _that = this;
|
|
|
|
+ this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning",
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ _that.remove({ ids });
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "info",
|
|
|
|
+ message: "已取消删除",
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ async remove(ids) {
|
|
|
|
+ this.removeLoad = true;
|
|
|
|
+ removeEle(ids).then(res => {
|
|
|
|
+ this.removeLoad = false;
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: "删除成功!",
|
|
|
|
+ });
|
|
|
|
+ this.getTableData();
|
|
|
|
+ }
|
|
|
|
+ }).finally(() => {
|
|
|
|
+ this.removeLoad = false;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
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) {
|
|
@@ -535,10 +619,11 @@
|
|
this.eleCheckRow = row;
|
|
this.eleCheckRow = row;
|
|
this.eleIndex=index
|
|
this.eleIndex=index
|
|
this.selectedSourceOption=0
|
|
this.selectedSourceOption=0
|
|
- this.sourceDialogVisible = true;
|
|
|
|
|
|
+
|
|
this.getElementCategoryOptions();
|
|
this.getElementCategoryOptions();
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+ this.sourceDialogVisible = true;
|
|
|
|
|
|
|
|
|
|
|
|
|