|
@@ -0,0 +1,373 @@
|
|
|
+<template>
|
|
|
+ <div class="flex-box1">
|
|
|
+ <Seach :list="filterDataTwo" @seachList="seachList"></Seach>
|
|
|
+ <el-table :data="tableData" style="width: 100%;min-height: 600px;" ref="refTable" height="600px">
|
|
|
+ <el-table-column type="expand">
|
|
|
+ <template slot-scope="props">
|
|
|
+ <el-table :data="props.row.nextNodes" size="mini" style="width: 95%;margin-left: 5%;"
|
|
|
+ @cell-click="getRowList">
|
|
|
+ <el-table-column label="下一步环节" prop="name"></el-table-column>
|
|
|
+ <el-table-column label="resourceId" prop="resourceId"></el-table-column>
|
|
|
+
|
|
|
+ </el-table>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="环节" prop="name">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="resourceId" prop="resourceId">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button size="mini" type="text" @click="getRiskadminform(scope.row)">
|
|
|
+ 配置候选人</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+
|
|
|
+ <el-dialog title="配置信息" :visible.sync="dialogStatus" width="100%" style="height: 100%" :fullscreen="true"
|
|
|
+ :before-close="handleClose1" :modal="false" v-if="dialogStatus" :destroy-on-close="true">
|
|
|
+ <el-button type="primary" @click="dialogTreeStatus2 = true">新增</el-button>
|
|
|
+ <el-button type="primary" v-if="delarr.length>0" @click="delarrbtn">批量删除</el-button>
|
|
|
+ <el-table :data="tableData2" v-loading="loading" style="width: 100%;min-height: 600px;" ref="refTable"
|
|
|
+ height="600px" @selection-change="selectionChange">
|
|
|
+ <!-- 是否多选 -->
|
|
|
+ <el-table-column type="selection" width="55">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="loginNo" prop="loginNo">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="paramsJson" prop="paramsJson">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <!-- <el-button size="mini" type="text" @click="deit(scope.row)">
|
|
|
+ 修改</el-button> -->
|
|
|
+ <el-button size="mini" type="text" @click="del(scope.row)">
|
|
|
+ 删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-pagination style="display: flex; flex-direction: row-reverse" v-if="adminpageData.total > 0"
|
|
|
+ :current-page.sync="adminpageData.pageNum" :page-sizes="adminpageData.pageSizes ? adminpageData.pageSizes : [5, 10, 15, 20]
|
|
|
+ " :page-size="adminpageData.pageSize" layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :total="adminpageData.total" @size-change="adminhandleSizeChange"
|
|
|
+ @current-change="adminhandleCurrentChange" />
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <el-dialog title="配置字段" :visible.sync="dialogTreeStatus2" width="100%" style="height: 100%" :fullscreen="true"
|
|
|
+ :before-close="handleClose2" :modal="false" v-if="dialogTreeStatus2" :destroy-on-close="true">
|
|
|
+ <div style="height: 100%">
|
|
|
+ <div style="height: 100%">
|
|
|
+ <el-form ref="form" :model="fromList" :rules="rule" label-width="130px" style="margin-top: 30px">
|
|
|
+ <div class="flex-header">
|
|
|
+ <el-form-item label="字段名称:" prop="needName">
|
|
|
+ <el-input v-model="fromList.needName"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div class="flex-header">
|
|
|
+ <el-form-item label="字段值:" prop="needCode">
|
|
|
+ <el-input v-model="fromList.needCode"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </el-form>
|
|
|
+ <div style="text-align: center; margin-top: 30px">
|
|
|
+ <el-button type="primary" @click="clickSave(1)">确 定</el-button>
|
|
|
+ <el-button @click="dialogTreeStatus2 = false;">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog title="配置人员" :visible.sync="dialogTreeStatus" width="100%" style="height: 100%" :fullscreen="true"
|
|
|
+ :before-close="handleClose3" :modal="false" v-if="dialogTreeStatus" :destroy-on-close="true">
|
|
|
+ <div style="height: 100%">
|
|
|
+ <deptTreeOnly @treeCheck="treeCheckonly" :defaultList="defaultList" :type="depttype" :closeList="closeList">
|
|
|
+ </deptTreeOnly>
|
|
|
+ <div style="text-align: center; margin-top: 30px">
|
|
|
+ <el-button type="primary" @click="clickSave(2)">确 定</el-button>
|
|
|
+ <el-button @click="dialogTreeStatus = false;">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { json } from "body-parser";
|
|
|
+import TableId from "../../../components/el-formid";
|
|
|
+import Seach from "../../../components/el-search";
|
|
|
+import deptTreeOnly from "../../../components/newTree.vue";
|
|
|
+export default {
|
|
|
+ components: {
|
|
|
+ TableId,
|
|
|
+ Seach,
|
|
|
+ deptTreeOnly
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ let _self = this
|
|
|
+ return {
|
|
|
+ loading: false,
|
|
|
+ dialogStatus: false,
|
|
|
+ dialogTreeStatus: false,
|
|
|
+ dialogTreeStatus2: false,
|
|
|
+ rule: {
|
|
|
+ needCode: [
|
|
|
+ { required: true, message: "请添加字段值", trigger: "blur" },
|
|
|
+ ],
|
|
|
+ needName: [
|
|
|
+ { required: true, message: "请添加字段名称", trigger: "blur" },
|
|
|
+ ],
|
|
|
+
|
|
|
+ },
|
|
|
+ filterDataTwo: {
|
|
|
+ timeSelect: false, //是否显示日期控件
|
|
|
+ sreach: true,
|
|
|
+ restet: false,
|
|
|
+ elinput: [
|
|
|
+ {
|
|
|
+ name: "processId", //提示语275
|
|
|
+ key: "processId", //字段名
|
|
|
+ width: 275, //宽度
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "fresourceId", //提示语275
|
|
|
+ key: "fresourceId", //字段名
|
|
|
+ width: 275, //宽度
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ searchBox: {},
|
|
|
+ tableData: [],
|
|
|
+ tableData2: [],
|
|
|
+ adminpageData: {
|
|
|
+ total: 15, // 总条数
|
|
|
+ pageSizes: 10, // 每页数量
|
|
|
+ pageNum: 1, // 页码
|
|
|
+ },
|
|
|
+ fromList: {},
|
|
|
+ resourceId: '',
|
|
|
+ treeListonly: [],
|
|
|
+ defaultList: [],
|
|
|
+ delarr: [],
|
|
|
+ depttype: 0,
|
|
|
+ closeList: false,
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getRowList() {
|
|
|
+
|
|
|
+ },
|
|
|
+ delarrbtn() {///CfgWorkflowChoosePerson/delBatch
|
|
|
+ this.$http({
|
|
|
+ url: "/market/CfgWorkflowChoosePerson/delBatch",
|
|
|
+ method: "post",
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ },
|
|
|
+ data: this.delarr,
|
|
|
+ }).then((res) => {
|
|
|
+ this.$notify({
|
|
|
+ title: res.data.desc,
|
|
|
+ message: res.data.desc,
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.getRiskadminform(this.resourceId)
|
|
|
+ });
|
|
|
+ },
|
|
|
+ del(v) {///CfgWorkflowChoosePerson/delBatch
|
|
|
+ this.$http({
|
|
|
+ url: "/market/CfgWorkflowChoosePerson/del",
|
|
|
+ method: "post",
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ },
|
|
|
+ data: v,
|
|
|
+ }).then((res) => {
|
|
|
+ this.$notify({
|
|
|
+ title: res.data.desc,
|
|
|
+ message: res.data.desc,
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.getRiskadminform(this.resourceId)
|
|
|
+ });
|
|
|
+ },
|
|
|
+ deit(v) {
|
|
|
+ console.log(JSON.parse(v.paramsJson));
|
|
|
+ for (var key in JSON.parse(v.paramsJson)) {
|
|
|
+ console.log(key, JSON.parse(v.paramsJson)[key])
|
|
|
+ this.fromList.needName = key
|
|
|
+ this.fromList.needCode = JSON.parse(v.paramsJson)[key]
|
|
|
+ }
|
|
|
+ this.adminpageData.pageNum = 1;
|
|
|
+ this.dialogTreeStatus2 = true
|
|
|
+ },
|
|
|
+ selectionChange(val) {
|
|
|
+ console.log(val);
|
|
|
+ this.delarr=val
|
|
|
+ },
|
|
|
+ getRiskadminform(v) {///CfgWorkflowChoosePerson/queryPage
|
|
|
+ console.log(v);
|
|
|
+ if (v.resourceId) {
|
|
|
+ this.resourceId = v.resourceId
|
|
|
+ }
|
|
|
+ this.loading = true
|
|
|
+ this.$http({
|
|
|
+ url: "/market/CfgWorkflowChoosePerson/queryPage",
|
|
|
+ method: "post",
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ page: '{"pageNo":"' + this.adminpageData.pageNum + '","pageSize":"10"}',
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ resourceid: this.resourceId
|
|
|
+ },
|
|
|
+ }).then((res) => {
|
|
|
+ this.adminpageData.total = res.data.totalRecord;
|
|
|
+ this.tableData2 = res.data.data;
|
|
|
+ this.dialogStatus = true
|
|
|
+ this.loading = false
|
|
|
+ });
|
|
|
+
|
|
|
+ },
|
|
|
+ async clickSave(v) {
|
|
|
+ if (v == 1) {
|
|
|
+ this.$refs.form.validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ this.dialogTreeStatus = true
|
|
|
+ } else {
|
|
|
+ this.$message.error("请完善表单信息");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ // console.log(this.treeListonly);
|
|
|
+ // console.log(this.fromList);
|
|
|
+ // console.log(this.resourceId);
|
|
|
+ // console.log(this.searchBox);
|
|
|
+ let paramsJson = {}
|
|
|
+ paramsJson[this.fromList.needName] = this.fromList.needCode
|
|
|
+ // console.log(paramsJson);
|
|
|
+ let arr = []
|
|
|
+ this.treeListonly.map((item) => {
|
|
|
+ arr.push({
|
|
|
+ tableName: this.searchBox.processId,
|
|
|
+ fresourceId: this.searchBox.fresourceId,
|
|
|
+ resourceid: this.resourceId,
|
|
|
+ paramsJson: JSON.stringify(paramsJson),
|
|
|
+ loginNo: item.key
|
|
|
+ })
|
|
|
+ })
|
|
|
+ this.$http({
|
|
|
+ url: "/market/CfgWorkflowChoosePerson/addBatch",
|
|
|
+ method: "post",
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ },
|
|
|
+ data: arr,
|
|
|
+ }).then((res) => {
|
|
|
+ this.$notify({
|
|
|
+ title: res.data.desc,
|
|
|
+ message: res.data.desc,
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.dialogTreeStatus = false;
|
|
|
+ this.dialogStatus = false;
|
|
|
+ this.dialogTreeStatus2 = false;
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+ treeCheckonly(v) {
|
|
|
+ this.treeListonly = v;
|
|
|
+ },
|
|
|
+ seachList(e) {
|
|
|
+ this.adminpageData.pageNum = 1;
|
|
|
+ console.log(e);
|
|
|
+ this.searchBox = e
|
|
|
+ this.getRiskadminList(e)
|
|
|
+ },
|
|
|
+ handleClose1() {//关闭弹窗
|
|
|
+ this.dialogStatus = false;
|
|
|
+ },
|
|
|
+ handleClose2() {//关闭弹窗
|
|
|
+ this.dialogTreeStatus2 = false;
|
|
|
+ },
|
|
|
+ handleClose3() {//关闭弹窗
|
|
|
+ this.dialogTreeStatus = false;
|
|
|
+ },
|
|
|
+ getRiskadminList(e) {
|
|
|
+ this.$http({
|
|
|
+ url: "/market/waf/queryPathList",
|
|
|
+ method: "post",
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ },
|
|
|
+ data: this.searchBox,
|
|
|
+ }).then((res) => {
|
|
|
+ this.tableData = res.data.body;
|
|
|
+
|
|
|
+ });
|
|
|
+ },
|
|
|
+ adminhandleCurrentChange(val) {
|
|
|
+ // console.log(e)
|
|
|
+ this.adminpageData.pageNum = val;
|
|
|
+ this.getRiskadminform(this.resourceId)
|
|
|
+ console.log(`当前页: ${val}`);
|
|
|
+ },
|
|
|
+ adminhandleSizeChange() {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.flex-box1 {
|
|
|
+ display: flex;
|
|
|
+ width: calc(100% - 40px);
|
|
|
+ border-radius: 20px;
|
|
|
+ background-color: #fff;
|
|
|
+ margin: 0 auto;
|
|
|
+ margin-top: 20px;
|
|
|
+ position: relative;
|
|
|
+ flex-direction: column;
|
|
|
+
|
|
|
+ .flex-header {
|
|
|
+ display: flex;
|
|
|
+ width: 100%;
|
|
|
+ position: relative;
|
|
|
+ height: 60px;
|
|
|
+ margin: 1%;
|
|
|
+ border-bottom: 1px solid #e1e1e1;
|
|
|
+ justify-content: space-between;
|
|
|
+
|
|
|
+ .el-button {
|
|
|
+ width: 150px;
|
|
|
+ float: right;
|
|
|
+ height: 40px !important;
|
|
|
+ margin-right: 30px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .flex-load {
|
|
|
+ display: flex;
|
|
|
+ width: 80%;
|
|
|
+ position: relative;
|
|
|
+ margin: 1%;
|
|
|
+ border-bottom: 1px solid #e1e1e1;
|
|
|
+ justify-content: space-between;
|
|
|
+ // height: 354px!important;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+::v-deep .el-dialog__body {
|
|
|
+ // max-height: calc(100vh) !important;
|
|
|
+ // min-height: 100px;
|
|
|
+ height: 80%;
|
|
|
+ // overflow-y: hidden;
|
|
|
+}
|
|
|
+</style>
|