12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163 |
- <template>
- <div class="flex-box">
- <div :span="24" class="flex-header">
- <Tabs :tabList="tabListMain" @status="clickTabMains">
- </Tabs>
- <el-button v-if="clickTagName == 'first'" type="primary" @click="clickNewTag()">+新建</el-button>
- </div>
- <div class="flex-count">
- <Table v-loading="loading" @clickDemand="clickDemand" :list="lableTable" ref="TableList" @changeNum="changeNum"
- @changeSize="changeSize">
- </Table>
- </div>
- <el-dialog :title="dialogTitle" :visible.sync="dialogStatus" width="100%" :before-close="handleClose" :modal="false"
- v-if="dialogStatus" :destroy-on-close="true">
- <!-- 后期维护 -->
- <div style="position: fixed; z-index: 10000;top: 55px;">
- <el-button type="primary" v-if="saveStatus" @click="clickSave">保存</el-button>
- <el-button type="primary" v-if="startStatus" @click="clickHandles">处理</el-button>
- <el-button type="primary" v-if="closeStatus" @click="handleClose">关闭</el-button>
- </div>
- <el-form ref="form" :model="fromList" :rules="rule" label-width="145px" style="margin-top: 30px">
- <div style="text-align: center; font-size: 24px;">账号权限申请流程</div>
- <div class="flex-header">
- <el-form-item label="需求编号:">
- <el-input v-model="fromList.needNo" disabled></el-input>
- </el-form-item>
- </div>
- <div class="flex-header">
- <el-form-item label="申请人:">
- <el-input v-model="fromList.proposer" disabled></el-input>
- </el-form-item>
- <el-form-item label="申请时间:">
- <el-input v-model="fromList.proposerTime" disabled></el-input>
- </el-form-item>
- </div>
- <div class="flex-header">
- <el-form-item label="申请主题:" prop="needName">
- <el-input v-model="fromList.needName" :disabled="disabled"></el-input>
- </el-form-item>
- </div>
- <div class="flex-header">
- <el-form-item label="申请类型:" prop="proposerType">
- <el-select v-model="fromList.proposerType" placeholder="请选择申请类型" size="medium" :disabled="disabled">
- <el-option v-for="item in proposerTypeoption" :key="item.code" :label="item.name"
- :value="item.code" />
- </el-select>
- </el-form-item>
- <el-form-item label="八维度使用流程:" prop="dimensionalFlow">
- <el-select v-model="fromList.dimensionalFlow" placeholder="请选择八维度使用流程" size="medium"
- :disabled="disabled">
- <el-option v-for="item in dimensionalFlowoptions" :key="item.code" :label="item.name"
- :value="item.code" />
- </el-select>
- </el-form-item>
- </div>
- <div class="flex-header">
- <el-form-item label="主机ip/数据库实例:" prop="hostIp">
- <el-input v-model="fromList.hostIp" :disabled="disabled" :title="fromList.hostIp"></el-input>
- </el-form-item>
- <el-form-item label="账号名称:" prop="accountName">
- <el-input v-model="fromList.accountName" :disabled="disabled"></el-input>
- </el-form-item>
- </div>
- <div class="" style="margin: 1%; border-bottom: 1px solid #e1e1e1;">
- <el-form-item label="权限:" prop="authority">
- <el-input type="textarea" v-model="fromList.authority" maxlength="500" show-word-limit
- :disabled="disabled"></el-input>
- </el-form-item>
- </div>
- </el-form>
- <div v-if="dialoglablesStatus">
- <div class="table-title">流程追踪</div>
- <TableId :list="lables"></TableId>
- </div>
- </el-dialog>
- <div v-if="destroy">
- <el-dialog title="处理操作" width="100%" :visible.sync="handleStatus" :before-close="handleCloses" :modal="false"
- v-if="handleStatus" :destroy-on-close="true">
- <Workflow :list="fromList" v-if="isWorkflowStatus == true" @updateForm="updateForm"
- :requestForm="requestForm" :request_formTitle="request_form.title"/>
- <WorkflowEntrance :list="fromList" v-else :lastManList="lastManList" @beforeClose="updateForm"
- :requestForm="requestForm" :request_formTitle="request_form.title"/>
- <!-- 后期维护 -->
- </el-dialog>
- </div>
- </div>
- </template>
- <script>
- import Tabs from "../../../components/el-tabs";
- import Table from "../../../components/el-form";
- import TableId from "../../../components/el-formid";
- import Seach from "../../../components/el-search";
- import myUpload from "../../../components/workflowUpload";
- import Workflow from "../../../components/workflowBase";
- import WorkflowEntrance from "../../../components/workflowEntrance";
- import getConfig from '../../../config/dev.js'
- import {
- getTodoBase,
- getDoneBase,
- getInitiateBase,
- getNowdata,
- } from "../../../http/api.js";//../../../http/api.js
- import { log } from "console";
- export default {
- components: {
- Table,
- TableId,
- Tabs,
- myUpload,
- Workflow,
- Seach,
- WorkflowEntrance
- },
- data() {
- let _self = this
- return {
- loading: false,
- isWorkflowStatus: true, //默认展示模式组件,为true时展示多人处理组件
- lastManList: [],
- rule: {
- authority: [
- { required: true, message: "请添加权限", trigger: "blur" },
- ],
- hostIp: [
- { required: true, message: "请添加主机ip/数据库实例", trigger: "blur" },
- ],
- accountName: [
- { required: true, message: "请添加账号名称", trigger: "blur" },
- ],
- dimensionalFlow: [
- { required: true, message: "请选择八维度使用流程", trigger: "change" },
- ],
- proposerType: [
- { required: true, message: "请选择申请类型", trigger: "change" },
- ],
- needName: [
- { required: true, message: "请添加申请主题", trigger: "blur" },
- ],
- },
- form: {}, //表单数据
- fromList: {}, //表单数据
- fileInfo: {
- type: "bt1n",
- typename: "上传文件",
- // limit: 5,
- url: "/market/waf/uploadByMinio",
- fileList: [],
- },
- list: {},
- dimensionalFlowoptions: [
- {
- name: '无',
- code: '无'
- },
- {
- name: '欠费管理风险防控流程',
- code: '欠费管理风险防控流程'
- },
- {
- name: '出账及调账管理风险防控流程',
- code: '出账及调账管理风险防控流程'
- },
- {
- name: '异常话单管理风险防控流程',
- code: '异常话单管理风险防控流程'
- }
- ],
- proposerTypeoption: [
- {
- name: '主机',
- code: '主机'
- },
- {
- name: '数据库',
- code: '数据库'
- },
- ],
- disabled: false,
- pageNo: 1,//页码
- destroy: false,//处理
- handleStatus: false,//处理
- tableName: "ZHQX_process",
- request_form: {
- userId: "",
- userName: "",
- path: this.$router.currentRoute.name,
- userCode: JSON.parse(window.sessionStorage.userInfo).loginNo,
- // path:this.$roter.options.routers,
- // nextDealMan:'',
- title: "title",
- businessKey: "1",
- processDefinitionKey: "ZHQX_process",//流程key
- },
- requestForm: {
- // fresourceId: "14c60ff0-b1a8-11ed-886f-d6cd97160e00", // 本地环境
- // fresourceId: "canvas", // 生产环境
- // fresourceId: "2b9e648d-b24d-11ed-be6b-00505687dcd3", //测试91环境
- fresourceId: getConfig().accountPermissionsfresourceId,
- processDefinitionKey: "ZHQX_process",
- },
- dialogStatus: false, //dialog显示
- dialoglablesStatus: true, //dialogL流程追踪显示
- clickTagNameTop: 'First',//头部tab
- clickTagName: 'first',
- dialogTitle: '',//dialogtit
- startStatus: false,//处理状态按钮
- closeStatus: false, //关闭按钮状态
- saveStatus: false, //保存按钮状态
- lables: {
- height: "400",
- titledata: [
- {
- label: "环节名称",
- prop: "taskName",
- width: 300,
- },
- {
- label: "处理人",
- prop: "assignee",
- width: 300,
- },
- {
- label: "到达时间",
- prop: "startTime",
- width: 300,
- },
- {
- label: "处理时间",
- prop: "endTime",
- width: 300,
- },
- {
- label: "回复意见",
- prop: "content",
- width: 300,
- },
- ], //表格头
- data: [], //内容数据
- loading: true,
- pageData: {
- total: 0, // 总条数
- pageSizes: 10, // 每页数量
- pageNum: 1, // 页码
- },
- isSelection: false, // 表格有多选时设置
- isOperation: false, // 表格有操作列时设置
- isIndex: true, // 列表序号
- operation: {
- // 表格有操作列时设置
- label: "操作", // 列名
- width: "50", // 根据实际情况给宽度
- data: [
- {
- label: "操作", // 操作名称
- type: "", //按钮类型
- handleRow: function () { }, // 自定义事件
- },
- ],
- },
- },
- tabListMain: [
- {
- index: "first",
- label: "我的待办",
- number: 1,
- name: "prosss_key",
- },
- {
- index: "two",
- label: "我的已办",
- number: 2,
- },
- {
- index: "three",
- label: "我发起的",
- number: 3,
- },
- ],
- lableTable: {},//传给子组件table
- firstlabel: {
- height: "400",
- titledata: [
- {
- label: "申请主题",
- prop: "need_name",
- width: 300,
- },
- {
- label: "申请人",
- prop: "proposer",
- width: 300,
- },
- {
- label: "申请时间",
- prop: "proposer_time",
- width: 300,
- },
- {
- label: "账号",
- prop: "account_name",
- width: 300,
- },
- {
- label: "账号权限",
- prop: "authority",
- width: 300,
- },
- {
- label: "当前状态",
- prop: "taskName",
- width: 300,
- },
- ], //表格头
- data: [], //内容数据
- loading: true,
- pageData: {
- total: 10, // 总条数
- pageSizes: 10, // 每页数量
- pageNum: 1, // 页码
- },
- isSelection: false, // 表格有多选时设置
- isOperation: false, // 表格有操作列时设置
- isIndex: false, // 列表序号
- operation: {
- // 表格有操作列时设置
- label: "操作", // 列名
- width: "50", // 根据实际情况给宽度
- data: [
- {
- label: "操作", // 操作名称
- type: "", //按钮类型
- handleRow: function () { }, // 自定义事件
- },
- ],
- },
- },
- twolabel: {
- height: "400",
- titledata: [
- {
- label: "申请主题",
- prop: "need_name",
- width: 300,
- },
- {
- label: "申请人",
- prop: "proposer",
- width: 300,
- },
- {
- label: "申请时间",
- prop: "proposer_time",
- width: 300,
- },
- {
- label: "账号",
- prop: "account_name",
- width: 300,
- },
- {
- label: "账号权限",
- prop: "authority",
- width: 300,
- },
- {
- label: "当前状态",
- prop: "taskName",
- width: 300,
- },
- ], //表格头
- data: [], //内容数据
- loading: true,
- pageData: {
- total: 10, // 总条数
- pageSizes: 10, // 每页数量
- pageNum: 1, // 页码
- },
- isSelection: false, // 表格有多选时设置
- isOperation: false, // 表格有操作列时设置
- isIndex: false, // 列表序号
- operation: {
- // 表格有操作列时设置
- label: "操作", // 列名
- width: "50", // 根据实际情况给宽度
- data: [
- {
- label: "操作", // 操作名称
- type: "", //按钮类型
- handleRow: function () { }, // 自定义事件
- },
- ],
- },
- },
- threelabel: {
- height: "400",
- titledata: [
- {
- label: "申请主题",
- prop: "need_name",
- width: 300,
- },
- {
- label: "申请人",
- prop: "proposer",
- width: 300,
- },
- {
- label: "申请时间",
- prop: "proposer_time",
- width: 300,
- },
- {
- label: "当前处理人",
- prop: "currentMan",
- width: 300,
- },
- {
- label: "账号",
- prop: "account_name",
- width: 300,
- },
- {
- label: "账号权限",
- prop: "authority",
- width: 300,
- },
- {
- label: "当前状态",
- prop: "taskName",
- width: 300,
- },
- ], //表格头
- data: [], //内容数据
- loading: true,
- pageData: {
- total: 10, // 总条数
- pageSizes: 10, // 每页数量
- pageNum: 1, // 页码
- },
- isSelection: false, // 表格有多选时设置
- isOperation: false, // 表格有操作列时设置
- isIndex: false, // 列表序号
- operation: {
- // 表格有操作列时设置
- label: "操作", // 列名
- width: "50", // 根据实际情况给宽度
- data: [
- {
- label: "操作", // 操作名称
- type: "", //按钮类型
- handleRow: function () { }, // 自定义事件
- },
- ],
- },
- },
- filterData: {
- timeSelect: false, //是否显示日期控件
- sreach: true,
- restet: false,
- elinput: [
- {
- name: "材料名称", //提示语275
- key: "materialName", //字段名
- width: 275, //宽度
- },
- ],
- },
- savestatusBtn: false,
- }
- },
- methods: {
- clickNewTag(v) {
- this.$http({
- url: "/market/ZhqxProcess/getNeedNo",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: {},
- }).then((res) => {
- console.log(res);
- this.fromList = {
- dimensionalFlow: '无',
- needNo: res.data.body,
- proposer: JSON.parse(window.sessionStorage.getItem('userInfo')).loginName,
- proposerNo: JSON.parse(window.sessionStorage.getItem('userInfo')).loginNoStr,
- proposerTime: getNowdata({ a: '-', b: ' ', c: ':' }),
- }
- });
- this.lables.data = []
- this.startStatus = true;
- this.saveStatus = true;
- this.closeStatus = true;
- this.dialogStatus = true;
- this.isWorkflowStatus = true;
- this.dialoglablesStatus = true
- this.dialogTitle = "新建工单";
- this.disabled = false;
- },
- //是否最后一个人
- async getLastName() {
- console.log(this.fromList);
- let list = {
- procinstid: this.fromList.processId,
- taskid: this.fromList.taskId,
- // taskId:e.taskId
- };
- let _this = this;
- let obj = {
- url: this.$url.formList.getLastName, //流程追踪接口
- data: list,
- // status: "form",
- headers: {
- "Content-Type": "application/json",
- },
- };
- let res = await this.common.httpPost(obj, success);
- function success(data) {
- _this.isWorkflowStatus = data.lastMan == false ? false : true;
- _this.lastManList = data;
- // console.log(_this.isWorkflowStatus);
- }
- },
- //获取页码
- changeNum(e) {
- console.log(e)
- this.pageNo = e;
- if (this.clickTagName == 'first') {
- this.firstlabel.pageData.pageNum = e;
- this.getQueryList();
- }
- if (this.clickTagName == 'two') {
- this.twolabel.pageData.pageNum = e;
- this.getQueryDone();
- }
- if (this.clickTagName == 'three') {
- this.threelabel.pageData.pageNum = e;
- this.getMeLaunch()
- }
- },
- //获取页码
- changeSize(e) {
- console.log(11111);
- },
- //点击工单状态跳转需求流程显示页面
- clickDemand(e, res) {
- console.log(e);
- this.isWorkflowStatus = true
- console.log(res);
- if (e === "申请主题") {
- if (this.clickTagName === "three") {//发起
- console.log(res.taskName)
- this.dialogTitle = "查看";
- this.closeStatus = true;
- if (res.taskName == "申请人提出账号或权限申请") {
- this.disabled = false;
- this.startStatus = true;
- this.saveStatus = true;
- this.dialoglablesStatus = true
- } else {
- this.disabled = true;
- this.startStatus = false;
- this.saveStatus = false;
- this.dialoglablesStatus = true
- }
- }
- if (this.clickTagName === "first") {//代办
- this.dialogTitle = "处理";
- if (res.taskName == "申请人提出账号或权限申请") {
- this.savestatusBtn = false
- this.disabled = false;
- this.startStatus = true;
- this.saveStatus = true;
- this.closeStatus = true;
- this.dialoglablesStatus = true
- } else {
- this.savestatusBtn = true
- this.disabled = true;
- this.closeStatus = true;
- this.startStatus = true;
- this.saveStatus = false;
- this.dialoglablesStatus = true
- }
- }
- if (this.clickTagName === "two") {//已办
- this.dialogTitle = "查看";
- this.closeStatus = true;
- this.startStatus = false;
- this.saveStatus = false;
- this.disabled = true;
- this.dialoglablesStatus = true
- }
- this.dialogStatus = true
- this.fromList = res;
- this.clickForm(res);
- this.getFromQuery(res);
- }
- },
- //查询form表单数据
- getFromQuery(e) {
- this.$http({
- url: "/market/ZhqxProcess/query",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: { id: e.id },
- }).then((res) => {
- this.fromList = res.data;
- this.dialogStatus = true;
- this.fromList.taskId = e.taskId
- this.fromList.taskName = e.taskName
- this.fromList.createId = e.createId
- this.fromList.resourceId = e.resourceId
- });
- },
- async clickForm(e) {
- let list = {
- processInstanceId: e.process_id,
- // taskId:e.taskId
- };
- let _this = this;
- let obj = {
- url: this.$url.formList.getCommentsByProcessId, //流程追踪接口
- data: list,
- headers: {
- "Content-Type": "application/json",
- },
- };
- let res = await this.common.httpPost(obj, success);
- function success(data) {
- console.log('[ 接口返回值第一曾 ] >', data)
- let list = [];
- list = data.data.data;
- if (data.data.lastmandata.length != 0) {
- data.data.lastmandata.map((item, index) => {
- item.id = index + 22;
- });
- }
- list.map((item, index) => {
- item.startTime = _this.$util.datetimeFormat(item.startTime);
- item.endTime = _this.$util.datetimeFormat(item.endTime);
- item.id = index + 1;
- item.children = [];
- if (data.data.lastmandata.length != 0) {
- let indexs = data.data.lastmandata.findIndex((items) => {
- if (items.taskId == item.taskId) {
- item.children.push(items);
- }
- });
- }
- });
- console.log(list);
- _this.lables.data = list;
- console.log("[ _this.lables.data ] >", _this.lables.data);
- _this.abc = true;
- }
- },
- handleClose() {//关闭弹窗
- this.dialogStatus = false;
- this.fromList = {};
- },
- async clickSave() {
- this.$refs.form.validate((valid) => {
- if (valid) {
- console.log(this.$refs.form.model)
- this.savestatusBtn = true
- if (this.fromList.id) {
- this.request_form.title = '[IT工作台]-账号权限申请-' + this.fromList.needName;
- this.$http({
- url: "/market/ZhqxProcess/update",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: this.fromList,
- }).then((res) => {
- if (res.data.result === 0) {
- this.$message.success("表单更新成功");
- }
- });
- } else {
- this.getUserIds();
- }
- } else {
- this.$message.error("请完善表单信息");
- return false;
- }
- });
- },
- //获取自己idname
- getUserIds() {
- this.$http({
- url: "/market/api/user/info/queryNodePers?params=" + JSON.parse(window.sessionStorage.userInfo).loginNo,
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- }).then((res) => {
- this.request_form.userName = res.data[0].children[0].loginNameStr;
- this.request_form.userId = res.data[0].children[0].loginNoStr;
- this.setForm();
- console.log(this.request_form)
- });
- },
- setForm(e) {
- // console.log(this.$refs.form)
- this.request_form.title = '[IT工作台]-账号权限申请-' + this.fromList.needName;
- // this.request_form.title = this.$refs.form.needName;
- // this.$refs.form.taskId = e;
- this.$http({
- url: "/market/ZhqxProcess/add",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- // data: this.$refs.form,
- data: this.fromList,
- }).then((res) => {
- this.request_form.businessKey = res.data.body;
- this.fromList.id = res.data.body;
- this.formWorkId = res.data.body;
- this.clickHandle(res.data.body);
- });
- },
- async clickHandle(e) {
- let _this = this;
- let obj = {
- url: this.$url.formList.startWork, //开始工作流接口
- data: _this.request_form,
- status: "form",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded",
- },
- };
- let res = await this.common.httpPost(obj, success);
- function success(data) {
- // console.log(data);
- _this.fromList.taskId = data.data;
- _this.fromList.processId = data.data;
- // _this.fromList.resourceId = data.data;
- _this.taskId = data.data;
- // _this.fromList.taskId = data;
- // _this.taskId = data;
- let list = {
- id: e,
- // taskId:_this.formId,
- processId: _this.fromList.taskId,
- tableName: _this.request_form.processDefinitionKey,
- };
- _this.setUpdate(list);
- }
- },
- //更新工作流接口
- setUpdate(e) {
- this.$http({
- url: "/market/waf/updateBase",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: e,
- }).then((res) => {
- this.fromList.taskId = res.data.body[0].taskId;
- this.fromList.taskName = res.data.body[0].taskName;
- // if (res.data.body.taskName === "申请人提出账号或权限申请") {
- // this.isSync = res.data.body.isSync;
- // } else {
- // this.isSync = "1";
- // }
- if (res.data.result === 0) {
- this.$message.success("工作流更新成功");
- }
- });
- },
- //处理按钮,开始工作流接口
- clickHandles() {
- this.getNextPath(this.fromList.resourceId || "");
- console.log(this.fromList);
- this.request_form.title = '[IT工作台]-账号权限申请-' + this.fromList.needName;
- // if (this.fromList.taskId) {
- // this.destroy = true;
- // this.handleStatus = true;
- // } else {
- // this.$message.error("请先点击保存按钮");
- // }
- },
- getNextPath(e) {
- let list = {
- fresourceId: this.requestForm.fresourceId, // 本地环境
- processId: this.requestForm.processDefinitionKey,
- // processId: "request_form_process",
- // resourceId: e,
- };
- if (e) {
- // this.propsList = [];
- list.resourceId = e;
- }
- console.log(11111);
- console.log(list);
- console.log(11111);
- this.$http({
- url: "/market/waf/queryPath",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: list,
- }).then((res) => {
- console.log(res);
- console.log(this.fromList);
- console.log(res.data.body);
- console.log(res.data.body.nextShapes[0].multi);
- if (res.data.body.nextShapes[0].multi) {
- if (res.data.body.nextShapes[0].multi.multi === "true") {
- this.getLastName();
- }
- }
- if (this.fromList.taskId || this.fromList.processId) {
- this.destroy = true;
- this.handleStatus = true;
- this.getMetirialType();
- } else {
- this.$message.error("请先点击保存按钮");
- }
- });
- },
- //获取字典表常用意见
- getMetirialType(e) {
- this.$http({
- url: "/market/cfgDataDict/queryList",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: {
- dictCodePks: "approval",
- },
- }).then((res) => {
- this.commonlyList = res.data;
- });
- },
- //处理关闭
- handleCloses() {
- // this.treeList = [];
- // this.textarea = "";
- this.handleStatus = false;
- this.usernumber()
- },
- updateForm() {
- this.dialogStatus = false;
- this.handleCloses();
- this.usernumber()
- if (this.clickTagName == 'first') {
- this.lableTable = this.firstlabel
- this.getQueryList();
- }
- if (this.clickTagName == 'two') {
- this.lableTable = this.twolabel
- this.getQueryDone();
- }
- if (this.clickTagName == 'three') {
- this.lableTable = this.threelabel
- this.getMeLaunch()
- }
- },
- clickTabMains(e) {
- console.log(e);
- this.clickTagName = e
- this.pageNo = 1
- this.$refs.TableList.page = 1;
- if (this.clickTagName == 'first') {
- this.lableTable = this.firstlabel
- this.getQueryList();
- }
- if (this.clickTagName == 'two') {
- this.lableTable = this.twolabel
- this.getQueryDone();
- }
- if (this.clickTagName == 'three') {
- this.lableTable = this.threelabel
- this.getMeLaunch()
- }
- },
- adminhandleSizeChange(val) {
- console.log(`每页 ${val} 条`);
- },
- adminhandleCurrentChange(val) {
- console.log(`当前页: ${val}`);
- },
- //我的待办
- getQueryList(e, status) {
- this.loading = true;
- getTodoBase(this.pageNo, "", { tableName: this.tableName, }).then((res) => {
- if (status === 0) {
- this.clickDemand("申请主题", res.data.data[0]);
- }
- this.lableTable.data = res.data.data;
- this.lableTable.pageData.total = res.data.totalRecord;
- this.tabListMain[0].number = res.data.totalRecord
- this.loading = false;
- });
- },
- //我的已办
- getQueryDone() {
- this.loading = true;
- getDoneBase(this.pageNo, "", { tableName: this.tableName, }).then((res) => {
- this.lableTable.data = res.data.data;
- // this.lableTable.data.map((item) => {
- // item.status = "2";
- // });
- this.lableTable.pageData.total = res.data.totalRecord;
- this.tabListMain[1].number = res.data.totalRecord
- this.loading = false;
- });
- },
- //我发起的
- getMeLaunch() {
- this.loading = true;
- getInitiateBase(this.pageNo, "", { tableName: this.tableName, }).then((res) => {
- this.lableTable.data = res.data.data;
- // this.lableTable.data.map((item) => {
- // if (item.taskName === "申请人提出账号或权限申请") {
- // item.status = "1";
- // } else {
- // item.status = "2";
- // }
- // });
- this.lableTable.pageData.total = res.data.totalRecord;
- this.tabListMain[2].number = res.data.totalRecord
- this.loading = false;
- });
- },
- usernumber() {
- getInitiateBase(this.pageNo, "", { tableName: this.tableName, }).then((res) => {
- this.tabListMain[2].number = res.data.totalRecord
- });
- getDoneBase(this.pageNo, "", { tableName: this.tableName, }).then((res) => {
- this.tabListMain[1].number = res.data.totalRecord
- });
- getTodoBase(this.pageNo, "", { tableName: this.tableName, }).then((res) => {
- this.tabListMain[0].number = res.data.totalRecord
- });
- }
- },
- created() {
- let status = JSON.stringify(this.$route.query) == "{}";
- if (status) {
- this.lableTable = this.firstlabel
- this.getQueryList()
- this.usernumber()
- } else {
- let { id, type } = this.$route.query;
- let list = {
- taskId: id,
- tableName: this.tableName
- };
- this.usernumber()
- this.lableTable = this.firstlabel
- this.getQueryList(list, 0);//代办
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .copyClass {
- display: flex;
- }
- .flex-header-text-tree {
- width: 50%;
- text-align: center;
- }
- ::v-deep .el-form-item {
- width: 100%;
- }
- .active {
- background-color: #f3faff;
- }
- .flex-common {
- padding: 10px 5%;
- font-size: 18px;
- }
- .flex-buttons {
- background-color: #cde4f6;
- border-color: #cde4f6;
- color: #606266;
- }
- .flex-button {
- margin-top: 10px;
- margin-bottom: 10px;
- ::v-deep .el-button--primary {
- width: 222px;
- }
- }
- .flex-left-header-text {
- height: 40px;
- line-height: 40px;
- color: black;
- padding-left: 10px;
- background-color: #cde4f6;
- font-size: 18px;
- font-weight: bold;
- }
- .flex-right-text {
- margin-right: 20px;
- width: 50%;
- }
- .flex-handle {
- width: 100%;
- padding: 30px;
- display: flex;
- .flex-right {
- width: 50%;
- border: 1px solid #e1e1e1;
- margin-left: 20px;
- }
- .flex-left {
- width: 50%;
- display: flex;
- flex-direction: column;
- .flex-left-header {
- display: flex;
- justify-content: space-around;
- }
- }
- }
- .table-title {
- height: 50px;
- line-height: 50px;
- background-color: #f3faff;
- font-size: 18px;
- font-weight: bold;
- }
- ::v-deep .el-dialog {
- margin-top: 0 !important;
- }
- ::v-deep .el-table__fixed-body-wrapper {
- top: 50px !important;
- }
- .flex-box {
- display: flex;
- width: calc(100% - 40px);
- border-radius: 20px;
- background-color: #fff;
- margin: 0 auto;
- margin-top: 20px;
- position: relative;
- flex-direction: column;
- .flex-load {
- display: flex;
- width: 100%;
- position: relative;
- margin: 1%;
- border-bottom: 1px solid #e1e1e1;
- justify-content: space-between;
- }
- .flex-header {
- display: flex;
- // width: 100%;
- position: relative;
- // height: 60px;
- margin: 1%;
- border-bottom: 1px solid #e1e1e1;
- justify-content: space-between;
- // ::v-deep .el-form-item {
- // width: 30%;
- // margin-right: 5%;
- // }
- .el-button {
- width: 150px;
- float: right;
- height: 40px !important;
- margin-right: 30px;
- }
- }
- }
- //设置子组件样式
- ::v-deep .el-tabs__item {
- padding: 0;
- margin-right: 20px;
- width: 166px;
- text-align: center;
- background-color: #d8eaf6;
- color: black;
- }
- //设置子组件样式
- ::v-deep .el-form-item__label {
- text-align: center;
- }
- ::v-deep .is-active {
- color: #fff;
- background-color: #0583cd;
- }
- ::v-deep .el-select {
- width: 100%
- }
- ::v-deep .el-tabs__active-bar {
- display: none;
- }
- ::v-deep .el-tabs__nav-wrap::after {
- display: none !important;
- }
- .flex-form {
- margin-top: 50px;
- }
- .flex-footer-botton {
- display: flex;
- justify-content: space-evenly;
- }
- </style>
|