123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758 |
- <template>
- <div class="flex-box">
- <!-- 头部组件 -->
- <div :span="24" class="flex-header">
- <Tabs :tabList="tabList" @status="clickTabs">
- <!-- <UserIntegral slot="first" />
- <GrowthSystem slot="second" />
- <RuleConfiguration slot="third" /> -->
- </Tabs>
- <el-button
- type="primary"
- @click="clickNewTag"
- v-show="lable.name === 'first'"
- >+新建</el-button
- >
- </div>
- <div class="flex-count">
- <Table
- @clickDemand="clickDemand"
- :list="lable"
- ref="TableList"
- @num="getNum"
- @changeNum="changeNum"
- >
- <template v-slot:first>
- <Export
- :num="num"
- ref="export"
- :exportStatusList="exportStatus"
- @seachExportList="seachExportList"
- @export="batchExport"
- @clickApproval="clickApproval"
- ></Export>
- </template>
- <template v-slot:three>
- <Seach :list="filterData" @seachList="seachList"></Seach>
- </template>
- </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" v-if="buttonStatus">
- <el-button type="primary" v-if="startStatus" @click="clickHandles"
- >处理</el-button
- >
- <el-button type="primary" v-if="closeStatus" @click="handleClose"
- >关闭</el-button
- >
- <el-button
- type="primary"
- v-if="forwardStatus"
- @click="clickReassignment"
- >转需求管理平台</el-button
- >
- <el-button type="primary" v-if="exportBtnStatus" @click="clickExport"
- >导出</el-button
- >
- <el-button type="primary" v-if="saveStatus" @click="clickSave"
- >保存</el-button
- >
- </div>
- <FormTable
- :list="fromList"
- :disabled="disabled"
- class="flex-form"
- ref="formTable"
- />
- <div>
- <div class="table-title">流程追踪</div>
- <div v-if="abc == true">
- <Table :list="lables"></Table>
- </div>
- </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"
- @beforeClose="beforeClose"
- :requestForm="requestForm"
- />
- <WorkflowEntrance
- :list="fromList"
- v-else
- :lastManList="lastManList"
- @beforeClose="beforeClose"
- :requestForm="requestForm"
- />
- <!-- 后期维护 -->
- </el-dialog>
- </div>
- <!-- <el-dialog
- title="修改常用意见"
- :visible.sync="editStatus"
- width="100%"
- :before-close="editCloses"
- :modal="false"
- :destroy-on-close="true"
- >
- <div style="overflow-y: scroll; overflow-x: hidden; height: 240px">
- <div
- v-for="(item, index) in commonlyList"
- :key="index"
- ref="common"
- class="flex-common"
- >
- {{ item.dataName
- }}<i class="el-icon-circle-close" @click="deleStatus(item)"></i>
- </div>
- <div class="flex-common">
- <i class="el-icon-circle-plus-outline" @click="addStatus()"></i>
- </div>
- </div>
- </el-dialog> -->
- </div>
- </template>
- <script>
- import Workflow from "../../../../components/workflow";
- import WorkflowEntrance from "../../../../components/workflowEntrance";
- import FormTable from "../components/formTable.vue";
- import Seach from "../components/search.vue";
- import Export from "../components/export.vue";
- import Tabs from "../components/tabs.vue";
- import Table from "../components/form.vue";
- import deptTree from "../components/deptThree.vue";
- import Qs from "qs";
- export default {
- components: {
- Tabs,
- Table,
- Export,
- Seach,
- FormTable,
- deptTree,
- Workflow,
- WorkflowEntrance,
- },
- data() {
- return {
- isWorkflowStatus: true, //默认展示模式组件,为true时展示多人处理组件
- buttonStatus: true,
- copyStatus: false,
- dialogTitle: "",
- disabled: true,
- destroy: false,
- //分页数据
- totalPage: "1", //默认第一页
- currentPage: "1", //当前页数
- pageSize: "10", //每页显示十条
- currentPageList: ["1", "2"],
- startStatus: true,
- closeStatus: true, //关闭按钮状态
- forwardStatus: false, //转需求管理平台状态
- exportBtnStatus: false, //导出按钮状态
- saveStatus: false, //保存按钮状态
- fromList: {}, //表单数据
- rejectStatus: true,
- taskId: "", //工单taskID
- treeUser: {},
- formId: "",
- fileId: "", //工作流开启Id
- 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: "288",
- processDefinitionKey: "request_form_process",
- },
- requestForm: {
- // fresourceId: "0d94de8a-0281-11ed-a302-4ae7da54db39", // 本地环境
- fresourceId: "bf79721c-33f3-11ed-ba0b-00505687dcd3", //测试环境
- processDefinitionKey: "request_form_process",
- },
- treeList: [], //候选人列表
- treeCopyList: [], //抄送人列表
- editStatus: false,
- querryList: [], //已选人员名单
- commonlyList: [
- //常用意见列表页
- ],
- textarea: "未填写意见",
- num: 0,
- dialogStatus: false, //新建dialog显示
- handleStatus: false, //处理按钮状态
- tabList: [
- {
- index: "first",
- label: "我的待办",
- number: 1,
- name: "prosss_key",
- },
- {
- index: "two",
- label: "我的已办",
- number: 2,
- },
- {
- index: "three",
- label: "我发起的",
- number: 3,
- },
- {
- index: "four",
- label: "待阅",
- number: 4,
- },
- {
- index: "five",
- label: "已阅",
- number: 5,
- },
- ],
- filterData: {
- timeSelect: false, //是否显示日期控件
- sreach: true,
- restet: false,
- elinput: [
- {
- name: "需求名称", //提示语275
- key: "needName", //字段名
- width: 275, //宽度
- },
- ],
- elselect: [
- {
- name: "状态",
- key: "taskName",
- width: 300,
- option: [
- {
- key: 1,
- value: "起草",
- },
- {
- key: 2,
- value: "部门人员审核",
- },
- {
- key: 3,
- value: "部门领导审核",
- },
- {
- key: 4,
- value: "市场需求管理员审核",
- },
- {
- key: 5,
- value: "起草人发送",
- },
- {
- key: 6,
- value: "送信息技术中心办理",
- },
- {
- key: 7,
- value: "业支人员办理",
- },
- {
- key: 8,
- value: "结束",
- },
- ],
- },
- ],
- },
- firstTable: {
- name: "first",
- height: "650",
- titledata: [
- {
- label: "需求名称",
- prop: "needName",
- width: 300,
- color: "#0682CD",
- },
- {
- label: "需求类型",
- prop: "needType",
- width: 200,
- },
- {
- label: "发起部门",
- prop: "applyDept",
- width: 200,
- },
- {
- label: "发起科室",
- prop: "applyDepartment",
- width: 200,
- },
- {
- label: "发起人",
- prop: "proposer",
- width: 200,
- },
- {
- label: "发起时间",
- prop: "proposerTime",
- width: 250,
- },
- {
- label: "上一步处理人",
- prop: "predealman",
- width: 200,
- },
- {
- label: "状态",
- prop: "taskName",
- width: 200,
- },
- ], //表格头
- data: [], //内容数据
- loading: true,
- pageData: {
- total: 100, // 总条数
- pageSize: 10, // 每页数量
- pageNum: 1, // 页码
- },
- isSelection: true, // 表格有多选时设置
- isOperation: false, // 表格有操作列时设置
- isIndex: false, // 列表序号
- operation: {
- // 表格有操作列时设置
- label: "操作", // 列名
- width: "50", // 根据实际情况给宽度
- data: [
- {
- label: "操作", // 操作名称
- type: "", //按钮类型
- handleRow: (e, r, o) => {
- // this.disabled = true;
- // this.dialogTitle = "查看";
- // if (r.taskName === "起草") {
- // this.disabled = false;
- // } else {
- // this.disabled = true;
- // }
- // this.fromList = r;
- // this.clickForm(r);
- // this.getFromQuery(r);
- // this.dialogStatus = true;
- // setTimeout(() => {
- // this.getBtnStatus(r);
- // }, 500);
- // this.formWorkId = r.id;
- // this.formId = r.taskId;
- // this.taskName = r.taskName;
- // this.getQuery()
- }, // 自定义事件
- },
- ],
- },
- },
- twoTable: {
- name: "two",
- disabled: true,
- titledata: [
- {
- label: "需求名称",
- prop: "needName",
- width: 300,
- color: "#0682CD",
- },
- {
- label: "发起部门",
- prop: "applyDept",
- width: 200,
- },
- {
- label: "发起科室",
- prop: "applyDepartment",
- width: 200,
- },
- {
- label: "发起人",
- prop: "proposer",
- width: 200,
- },
- {
- label: "发起时间",
- prop: "proposerTime",
- width: 250,
- },
- {
- label: "处理时间",
- prop: "endtime",
- width: 250,
- },
- {
- label: "状态",
- prop: "taskName",
- width: 200,
- },
- ], //表格头
- data: [], //内容数据
- loading: true,
- pageData: {
- total: 100, // 总条数
- pageSize: 10, // 每页数量
- pageNum: 1, // 页码
- },
- isSelection: false, // 表格有多选时设置
- isOperation: false, // 表格有操作列时设置
- isIndex: false, // 列表序号
- operation: {
- // 表格有操作列时设置
- label: "操作", // 列名
- width: "50", // 根据实际情况给宽度
- data: [
- {
- label: "操作", // 操作名称
- type: "", //按钮类型
- handleRow: function () {}, // 自定义事件
- },
- ],
- },
- },
- threeTable: {
- name: "three",
- titledata: [
- {
- label: "需求名称",
- prop: "needName",
- width: 300,
- color: "#0682CD",
- },
- {
- label: "需求类型",
- prop: "needType",
- width: 200,
- },
- {
- label: "发起部门",
- prop: "applyDept",
- width: 200,
- },
- {
- label: "发起科室",
- prop: "applyDepartment",
- width: 200,
- },
- {
- label: "发起人",
- prop: "proposer",
- width: 200,
- },
- {
- label: "发起时间",
- prop: "proposerTime",
- width: 250,
- },
- {
- label: "工单状态",
- prop: "taskName",
- width: 200,
- },
- ], //表格头
- data: [], //内容数据
- loading: true,
- pageData: {
- total: 100, // 总条数
- pageSize: 10, // 每页数量
- pageNum: 1, // 页码
- },
- isSelection: false, // 表格有多选时设置
- isOperation: true, // 表格有操作列时设置
- isIndex: false, // 列表序号
- operation: {
- // 表格有操作列时设置
- label: "支撑状态", // 列名
- width: "100", // 根据实际情况给宽度
- data: [
- {
- label: "查看", // 操作名称
- type: "", //按钮类型
- handleRow: (e, r, o) => {
- if (r.needNo !== null) {
- this.$router.push({
- path: "/supportState",
- query: { id: r.needNo },
- });
- this.setabList(
- "支撑状态查看",
- "/supportState?id=" + r.needNo
- );
- } else {
- this.$message.error("暂无支撑状态可查看");
- }
- // this.getQuery()
- }, // 自定义事件
- },
- ],
- },
- },
- fourTable: {
- name: "four",
- titledata: [
- {
- label: "待阅需求",
- prop: "needName",
- width: 300,
- color: "#0682CD",
- },
- {
- label: "需求类型",
- prop: "needType",
- width: 200,
- },
- {
- label: "发起部门",
- prop: "applyDept",
- width: 200,
- },
- {
- label: "发起科室",
- prop: "applyDepartment",
- width: 200,
- },
- {
- label: "发起人",
- prop: "proposer",
- width: 200,
- },
- {
- label: "发起时间",
- prop: "proposerTime",
- width: 300,
- },
- {
- label: "状态",
- prop: "taskName",
- width: 200,
- },
- ], //表格头
- data: [], //内容数据
- loading: true,
- pageData: {
- total: 100, // 总条数
- pageSize: 10, // 每页数量
- pageNum: 1, // 页码
- },
- isSelection: false, // 表格有多选时设置
- isOperation: true, // 表格有操作列时设置
- isIndex: false, // 列表序号
- operation: {
- // 表格有操作列时设置
- label: "操作", // 列名
- width: "100", // 根据实际情况给宽度
- data: [
- {
- label: "查看", // 操作名称
- type: "", //按钮类型
- handleRow: (e, r, o) => {
- this.fromList = r;
- this.dialogStatus = true;
- this.disabled = true;
- this.buttonStatus = false;
- this.getReadList(r.copytaskid);
- }, // 自定义事件
- },
- ],
- },
- },
- fiveTable: {
- name: "five",
- titledata: [
- {
- label: "需求名称",
- prop: "needName",
- width: 300,
- color: "#0682CD",
- },
- {
- label: "需求类型",
- prop: "needType",
- width: 200,
- },
- {
- label: "发起部门",
- prop: "applyDept",
- width: 200,
- },
- {
- label: "发起科室",
- prop: "applyDepartment",
- width: 200,
- },
- {
- label: "发起人",
- prop: "proposer",
- width: 200,
- },
- {
- label: "发起时间",
- prop: "proposerTime",
- width: 300,
- },
- // {
- // label: "工单状态",
- // prop: "taskName",
- // width: 200,
- // },
- ], //表格头
- data: [], //内容数据
- loading: true,
- pageData: {
- total: 100, // 总条数
- pageSize: 10, // 每页数量
- pageNum: 1, // 页码
- },
- isSelection: false, // 表格有多选时设置
- isOperation: false, // 表格有操作列时设置
- isIndex: false, // 列表序号
- operation: {
- // 表格有操作列时设置
- label: "支撑状态", // 列名
- width: "100", // 根据实际情况给宽度
- data: [
- {
- label: "查看", // 操作名称
- type: "", //按钮类型
- handleRow: (e, r, o) => {
- this.getReadList(r.copytaskid);
- // if (r.needNo !== null) {
- // this.$router.push({
- // path: "/supportState",
- // query: { id: r.needNo },
- // });
- // } else {
- // this.$message.error("暂无支撑状态可查看");
- // }
- // this.getQuery()
- }, // 自定义事件
- },
- ],
- },
- },
- abc: false,
- lable: {},
- copyUser: "", //抄送人
- backThree: [],
- backCopyThree: [], //抄送人数组
- lables: {
- height: "400",
- titledata: [
- {
- id: 1,
- label: "环节名称",
- prop: "taskName",
- width: 300,
- },
- {
- id: 2,
- label: "处理人",
- prop: "assignee",
- width: 300,
- },
- {
- id: 3,
- label: "到达时间",
- prop: "startTime",
- width: 300,
- },
- {
- id: 4,
- label: "处理时间",
- prop: "endTime",
- width: 300,
- },
- {
- id: 5,
- label: "回复意见",
- prop: "content",
- width: 300,
- },
- ], //表格头
- data: [], //内容数据
- loading: true,
- pageData: {
- total: 10, // 总条数
- pageSize: 10, // 每页数量
- pageNum: 1, // 页码
- },
- isSelection: false, // 表格有多选时设置
- isOperation: false, // 表格有操作列时设置
- isIndex: true, // 列表序号
- operation: {
- // 表格有操作列时设置
- label: "操作", // 列名
- width: "50", // 根据实际情况给宽度
- data: [
- {
- label: "操作", // 操作名称
- type: "", //按钮类型
- handleRow: function () {}, // 自定义事件
- },
- ],
- },
- },
- formWorkId: "",
- taskName: "", //工单是否为起草阶段
- clicknextName: "", //点击选择流程节点
- firstStatus: false,
- selectUser: "", //选择人userName
- isSync: "1", //什么yes no起草状态判断
- createdId: "", //获取表单创始人Id
- batchList: ["fanyan"], //多选数组
- exportStatus: false, //批量导出按钮权限控制
- userList: [
- //选择路径列表页
- ],
- props: {
- lazy: true,
- lazyLoad: this.lazyLoad,
- },
- propsList: [],
- DepartmentName: "",
- seleIndex: 9,
- clickTagName: "first",
- value: "",
- nextPath: [],
- nextPaths: [],
- node: [],
- nodes: [],
- transferStatus: false,
- TransferStatus: false,
- CopyStatus: false,
- initialList: [],
- clickTaskName: "",
- seachLists: {},
- timeList: {},
- lastManList: [],
- };
- },
- created() {
- // const func = (name) => {
- // name = name || "fatfish";
- // console.log(name);
- // };
- const func = (name, age = "fatfish") => {
- console.log(name);
- };
- func("123123123");
- //oa跳转回来显示
- let status = JSON.stringify(this.$route.query) == "{}";
- if (status) {
- this.getQueryList();
- this.getMeDone();
- this.getMeLaunch();
- this.getToBeRead();
- this.getBeReadList();
- } else {
- let { id, copy } = this.$route.query;
- let list = {
- taskId: id,
- };
- //待做
- if (copy == 0) {
- this.getQueryList(list, 0);
- }
- //待阅
- if (copy == 1) {
- this.clickTagName = "four";
- this.getToBeRead(list, 1);
- }
- }
- this.lable = this.firstTable;
- },
- methods: {
- //是否最后一个人
- 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);
- }
- },
- //添加面包屑
- setabList(n, p) {
- let params = {
- children: "",
- name: n,
- rountPath: p,
- target: "_self",
- };
- for (let i = 0; i < this.$store.state.tabList.length; i++) {
- if (this.$store.state.tabList[i].name === params.name) {
- this.$store.state.tabList[i] = params;
- }
- }
- let set = new Set([...this.$store.state.tabList, params]);
- set.add(params);
- this.$store.commit("setDefaultActive", params.rountPath);
- this.$store.commit("setTabList", Array.from(set));
- },
- beforeClose() {
- this.dialogStatus = false;
- this.handleCloses();
- this.getQueryList();
- this.getMeDone();
- this.getMeLaunch();
- this.getToBeRead();
- this.getBeReadList();
- },
- clickGetTree(e, index) {
- this.CopyStatus = false;
- this.TransferStatus = false;
- this.clickTaskName = e.properties.name;
- this.clicknextName = e.properties.name;
- this.seleIndex = index;
- this.getNextPath(e.resourceId); //1 为点击后获取线
- },
- //常用意见添加
- addStatus() {
- let newData = Date.parse(new Date());
- this.$prompt("请输入常用意见", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- })
- .then(({ value }) => {
- let list = {
- dictCode: "approval",
- dataCode: newData,
- dataName: value,
- dictName: "审批意见",
- };
- this.geaddctType(list);
- this.$message({
- type: "success",
- message: "常用意见添加成功",
- });
- })
- .catch(() => {
- this.$message({
- type: "info",
- message: "取消输入",
- });
- });
- },
- //常用意见删除
- deleStatus(e) {
- this.$confirm("此操作将删除此常用意见, 是否继续?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- let list = {
- dataCode: e.dataCode,
- dictCode: "approval",
- };
- this.geDelectType(list);
- this.$message({
- type: "success",
- message: "删除成功!",
- });
- })
- .catch(() => {
- this.$message({
- type: "info",
- message: "已取消删除",
- });
- });
- },
- //转需求管理平台
- clickReassignment() {
- this.$http({
- url: "/market/waf/sync",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: this.$refs.formTable.form,
- }).then((res) => {
- if (res.code === 0) {
- this.$message.success("转需求管理平台成功!");
- } else {
- this.$message.error("转需求管理平台错误!");
- }
- });
- },
- //批量导出搜索
- seachExportList(e) {
- let timeList = {
- stime: e[0],
- etime: e[1],
- };
- this.timeList = timeList;
- this.getQueryList(this.timeList);
- },
- //点击工单状态跳转需求流程显示页面
- clickDemand(e, res) {
- if (e === "工单状态" || e === "需求名称") {
- if (this.clickTagName === "first") {
- this.disabled = true;
- this.dialogTitle = "查看";
- if (res.taskName === "起草") {
- this.disabled = false;
- } else {
- this.disabled = true;
- }
- // this.clickForm(res);
- // this.getFromQuery(res);
- setTimeout(() => {
- this.getBtnStatus(res);
- }, 500);
- }
- if (this.clickTagName === "two") {
- this.disabled = true;
- this.startStatus = false;
- this.saveStatus = false;
- }
- if (this.clickTagName === "three") {
- if (res.taskName === "起草") {
- console.log(res);
- this.startStatus = true;
- this.disabled = false;
- this.saveStatus = true;
- } else {
- this.startStatus = false;
- this.disabled = true;
- this.saveStatus = false;
- }
- }
- if (this.clickTagName === "four" || this.clickTagName === "five") {
- this.buttonStatus = false;
- }
- this.fromList = res;
- this.clickForm(res);
- this.getFromQuery(res);
- }
- },
- //批量导出
- batchExport() {
- this.downloadExcel(this.batchList);
- },
- clickExport() {
- let array = [];
- array.push(this.$refs.formTable.form);
- this.downloadExcel(array);
- },
- getNowTime() {
- let date = new Date();
- let year = date.getFullYear(); //获取当前年份
- let mon = date.getMonth() + 1; //获取当前月份
- let da = date.getDate(); //获取当前日
- let h = date.getHours(); //获取小时
- let m = date.getMinutes(); //获取分钟
- return year + "-" + mon + "-" + da + "-" + h + ":" + m;
- },
- //导出方法
- downloadExcel(e) {
- console.log(e.length);
- let res = this.getNowTime();
- this.$http({
- url: "/market/waf/exportAll",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- responseType: "blob",
- data: e,
- }).then((response) => {
- if (window.navigator && window.navigator.msSaveOrOpenBlob) {
- let blob = new Blob([response.data.size], {
- type: "application/vnd.ms-excel;",
- });
- if (e.length > 1) {
- window.navigator.msSaveOrOpenBlob(
- blob,
- this.fromList.needName + ".zip"
- );
- // window.navigator.msSaveOrOpenBlob(blob, res + "需求申请单" + ".zip");
- } else {
- window.navigator.msSaveOrOpenBlob(
- blob,
- this.fromList.needName + ".zip"
- );
- }
- //window.navigator.msSaveOrOpenBlob(blob, t his.form.needName);
- } else {
- /* 火狐谷歌的文件下载方式 */
- var blob = new Blob([response.data]);
- var downloadElement = document.createElement("a");
- var href = window.URL.createObjectURL(blob);
- downloadElement.href = href;
- if (e.length > 1) {
- downloadElement.download = res + "需求申请单" + ".zip";
- } else {
- console.log(e);
- downloadElement.download = e[0].needName + ".zip";
- }
- document.body.appendChild(downloadElement);
- downloadElement.click();
- document.body.removeChild(downloadElement);
- window.URL.revokeObjectURL(href);
- }
- });
- },
- //驳回方法
- clickReject(res) {
- let e = "no";
- this.submitWork(e, res);
- },
- //我发起的接口
- getMeLaunch(e) {
- this.$http({
- url: "/market/waf/queryInitiate",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- page: '{"pageNo":"' + this.totalPage + '","pageSize":"10"}',
- },
- data: e || {},
- }).then((res) => {
- // let size = this.isNaNStatus(res.data);
- this.tabList[2].number = res.data.totalRecord;
- this.threeTable.data = res.data.data;
- this.threeTable.pageData.total = res.data.totalRecord;
- });
- },
- //按钮权限方法
- getBtnStatus(e) {
- this.$refs.formTable.form = e;
- },
- //我的已办接口
- getMeDone() {
- this.$http({
- url: "/market/waf/queryDone",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- page: '{"pageNo":"' + this.totalPage + '","pageSize":"10"}',
- },
- data: {},
- }).then((res) => {
- this.tabList[1].number = res.data.totalRecord;
- this.twoTable.data = res.data.data;
- this.twoTable.pageData.total = res.data.totalRecord;
- // let size = this.isNaNStatus(res.data);
- // this.tabList[1].number = size;
- // this.twoTable.pageData.total = res.data.totalRecord;
- // this.twoTable.pageData.total = res.data.size;
- // this.twoTable.data = res.data.list;
- // this.twoTable.data = this.getCurrentPageList(this.twoTable.data);
- });
- },
- isNaNStatus(e) {
- if (e.size === 0) {
- return "0";
- } else {
- return e.size;
- }
- },
- //选择树的回调
- changeTree(e) {
- console.log(e);
- // if (e.length > 1) {
- // this.$message.error("只能选择一个人");
- // return;
- // } else {
- // this.backThree = e;
- // if (e[0]) {
- // this.selectUser = e[0].loginNameStr;
- // } else {
- // this.selectUser = "暂无选择";
- // }
- // }
- },
- changeTreeCopy(e) {
- console.log(e);
- // if (e.length > 1) {
- // this.$message.error("只能选择一个人");
- // return;
- // } else {
- // this.backCopyThree = e;
- // if (e[0]) {
- // this.copyUser = e[0].loginNameStr;
- // } else {
- // this.copyUser = "暂无选择";
- // }
- // }
- },
- //查询form表单数据
- getFromQuery(e) {
- this.$http({
- url: "/market/waf/query",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: { id: e.id },
- }).then((res) => {
- // this.fromList = res.data;
- this.dialogStatus = true;
- // this.fromList = e;
- // console.log(this.$refs.formTable);
- // this.$refs.formTable.fileInfo.fileList = res.data.mkFileShareAttachList;
- this.fromList.mkFileShareAttachList = res.data.mkFileShareAttachList;
- this.taskId = res.data.taskId;
- if (res.data.taskName == "起草") {
- this.saveStatus = true;
- } else if (res.data.taskName === "部门人员审核") {
- } else if (res.data.taskName === "部门领导审核") {
- } else if (res.data.taskName === "市场需求管理员审核") {
- this.exportBtnStatus = true;
- } else if (res.data.taskName === "起草人发送") {
- } else if (res.data.taskName === "送信息技术中心办理") {
- this.exportBtnStatus = true;
- } else if (res.data.taskName === "业支人员办理") {
- this.exportBtnStatus = true;
- this.forwardStatus = true;
- } else if (res.data.taskName === "送起草人结束") {
- }
- });
- },
- //我发起的搜索内容
- seachList(e) {
- console.log(e);
- this.seachLists = e;
- this.getMeLaunch(e);
- },
- //点击修改
- clickEdit() {
- this.editStatus = true;
- },
- //点击职位显示右侧列表
- //常用意见点击选择
- clickCommonly(e) {
- this.textarea = e.currentTarget.innerHTML;
- },
- //保存按钮
- //获取自己idname
- getUserIds() {
- this.$http({
- url: "/market/waf/queryRoleByName",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: {
- userCode: JSON.parse(window.sessionStorage.userInfo).loginNo,
- },
- }).then((res) => {
- this.request_form.userName = res.data.data.rows[0].name;
- this.request_form.userId = res.data.data.rows[0].userCode;
- });
- },
- async clickSave() {
- this.$refs.formTable.$refs.form.validate((valid) => {
- if (valid) {
- if (this.fromList.id) {
- this.setUpdate(this.$refs.formTable.form);
- } else {
- this.getUserIds();
- this.setForm();
- }
- } else {
- this.$message.error("请完善表单信息");
- return false;
- }
- });
- },
- //新建按钮
- async clickNewTag() {
- this.dialogTitle = "新建";
- this.lables.data = [];
- this.disabled = false;
- await this.getDepartmentName();
- },
- //获取用户部门名称
- getDepartmentName() {
- this.$http({
- url: "/market/waf/queryDept",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: {},
- }).then((res) => {
- let list = {
- applyDept: res.data,
- applyDepartment: JSON.parse(window.sessionStorage.userInfo).groupName,
- proposer: JSON.parse(window.sessionStorage.userInfo).loginName,
- };
- this.fromList = list;
- if (this.$refs.formTable) {
- this.$refs.formTable.form = list;
- }
- this.DepartmentName = res.data;
- this.dialogStatus = true;
- this.saveStatus = true;
- });
- },
- setForm(e) {
- this.request_form.title = this.$refs.formTable.form.needName;
- // this.$refs.formTable.form.taskId = e;
- this.$http({
- url: "/market/waf/add",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: this.$refs.formTable.form,
- }).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);
- });
- },
- getNextPath(e) {
- let list = {
- // fresourceId: "bf79721c-33f3-11ed-ba0b-00505687dcd3", //测试环境
- fresourceId: this.requestForm.fresourceId, // 本地环境
- processId: this.requestForm.processDefinitionKey,
- // fresourceId: "0d94de8a-0281-11ed-a302-4ae7da54db39", // 本地环境
- // processId: "request_form_process",
- // resourceId: e,
- };
- if (e) {
- // this.propsList = [];
- list.resourceId = e;
- }
- this.$http({
- url: "/market/waf/queryPath",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: list,
- }).then((res) => {
- if (res.data.body.nextShapes[0].multi) {
- if (res.data.body.nextShapes[0].multi.multi === "true") {
- this.getLastName();
- }
- }
- if (this.fromList.taskId) {
- this.destroy = true;
- this.handleStatus = true;
- this.getMetirialType();
- } else {
- this.$message.error("请先点击保存按钮");
- }
- });
- },
- //处理按钮,开始工作流接口
- clickHandles() {
- console.log(this.fromList);
- this.getNextPath(this.fromList.resourceId || "");
- },
- //批量审批
- clickApproval(e) {
- this.fromList.taskName = this.batchList[0].taskName;
- let array = [];
- if (this.batchList.length > 1) {
- this.batchList.map((item, index) => {
- array.push(item.taskName);
- });
- let newArray = new Set(array);
- if (newArray.size > 1) {
- this.$message.error("需求申请单流程节点不一致");
- } else {
- this.handleStatus = true;
- }
- }
- },
- async clickForm(e) {
- let list = {
- processInstanceId: e.processId,
- // 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;
- 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;
- // data.data.lastmandata.map((items, index) => {
- // if (item.taskId === items.taskId) {
- // newList.push(items)
- // item.children = newList
- // }
- // });
- if (item.taskId == data.data.lastmandata[0].taskId) {
- item.children = data.data.lastmandata;
- }
- });
- console.log(list);
- // list.map((item, index) => {
- // data.data.lastmandata.map((items, index) =>{
- // if(item.taskId === items.taskId){
- // newList.push(o)
- // item.children = newList
- // }
- // })
- // })
- // console.log(list);
- // console.log(newList);
- // list[1].children = data.data.lastmandata;
- _this.lables.data = list;
- _this.abc = true;
- }
- },
- 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) {
- _this.fromList.processId = data.data;
- _this.taskId = data.data;
- let list = {
- id: e,
- // taskId:_this.formId,
- processId: _this.fromList.processId,
- // resourceId: _this.nextPath.currentShape[0].resourceId,
- };
- _this.setUpdate(list);
- }
- },
- //更新工作流接口
- setUpdate(e) {
- this.$http({
- url: "/market/waf/update",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: e,
- }).then((res) => {
- this.fromList.taskId = res.data.body.taskId;
- this.fromList.taskName = res.data.body.taskName;
- this.fromList.processId = res.data.body.processId;
- if (res.data.body.taskName === "起草") {
- this.isSync = res.data.body.isSync;
- } else {
- this.isSync = "1";
- }
- // if (res.data.result === 0) {
- // this.$message.success("工作流更新成功");
- // }
- });
- },
- //添加字典表常用意见
- geaddctType(e) {
- this.$http({
- url: "/market/cfgDataDict/add",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: e,
- }).then((res) => {
- this.getMetirialType();
- });
- },
- //删除字典表常用意见
- geDelectType(e) {
- this.$http({
- url: "/market/cfgDataDicts/del",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: e,
- }).then((res) => {
- this.getMetirialType();
- });
- },
- //获取字典表常用意见
- getMetirialType(e) {
- this.$http({
- url: "/market/cfgDataDict/queryList",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: {
- dictCodePks: "approval",
- },
- }).then((res) => {
- this.commonlyList = res.data;
- });
- },
- //获取待阅接口
- getToBeRead(e, status) {
- this.$http({
- url: "/market/waf/queryReadList",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- page: '{"pageNo":"' + this.totalPage + '","pageSize":"10"}',
- },
- data: e || {},
- }).then((res) => {
- if (status === 1) {
- this.clickDemand("需求名称", res.data.data[0]);
- this.getReadList(res.data.data[0].copytaskid);
- }
- // let size = this.isNaNStatus(res.data);
- this.tabList[3].number = res.data.totalRecord;
- // this.fourTable.pageData.total = res.data.totalRecord;
- this.fourTable.pageData.total = res.data.totalRecord;
- this.fourTable.data = res.data.data;
- // this.lable.data = this.getCurrentPageList(this.fourTable.data);
- });
- },
- //获取已阅接口列表
- getBeReadList(e) {
- this.$http({
- url: "/market/waf/queryReadDone",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- page: '{"pageNo":"' + this.totalPage + '","pageSize":"10"}',
- },
- data: e || {},
- }).then((res) => {
- // let size = this.isNaNStatus(res.data);
- this.tabList[4].number = res.data.totalRecord;
- // this.fourTable.pageData.total = res.data.totalRecord;
- this.fiveTable.pageData.total = res.data.totalRecord;
- this.fiveTable.data = res.data.data;
- // this.lable.data = this.getCurrentPageList(this.fiveTable.data);
- });
- },
- //点击查阅接口
- async getReadList(e) {
- let _this = this;
- let obj = {
- url: this.$url.formList.getReadList, //开始工作流接口
- data: { copytaskid: e },
- status: "form",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded",
- },
- };
- let res = await this.common.httpPost(obj, success);
- function success(data) {
- console.log(data);
- }
- },
- //获取我的代办列表List
- getQueryList(e, status) {
- this.$http({
- url: "/market/waf/queryList",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- page: '{"pageNo":"' + this.totalPage + '","pageSize":"10"}',
- },
- data: e || {},
- }).then((res) => {
- if (status === 0) {
- this.clickDemand("需求名称", res.data.data[0]);
- } else {
- this.tabList[0].number = res.data.totalRecord;
- // this.firstTable.data = res.data.data;
- }
- this.firstTable.data = res.data.data;
- this.firstTable.pageData.total = res.data.totalRecord;
- this.lable = this.firstTable;
- });
- },
- getCurrentPageList(e) {
- this.totalPage = Math.ceil(e.length / this.pageSize);
- this.totalPage = this.totalPage == 0 ? 1 : this.totalPage;
- let begin = (this.currentPage - 1) * this.pageSize;
- let end = this.currentPage * this.pageSize;
- this.currentPageList = e.slice(begin, end);
- return this.currentPageList;
- },
- getNum(e) {
- //多选数组
- this.batchList = e;
- if (e.length > 0) {
- this.exportStatus = true;
- } else {
- this.exportStatus = false;
- }
- this.num = e.length;
- },
- //获取页码
- changeNum(e) {
- this.totalPage = e;
- if (this.clickTagName === "first") {
- if (this.timeList) {
- this.getQueryList(this.timeList);
- } else {
- this.getQueryList();
- }
- } else if (this.clickTagName === "two") {
- this.getMeDone();
- } else if (this.clickTagName === "three") {
- console.log(this.seachLists);
- if (this.seachLists) {
- this.getMeLaunch(this.seachLists);
- } else {
- this.getMeLaunch();
- }
- } else if (this.clickTagName === "four") {
- this.getToBeRead();
- // this.fourTable.data = this.getCurrentPageList(this.fourTable.data);
- } else {
- this.getBeReadList();
- }
- },
- clickTabs(e) {
- this.buttonStatus = true;
- this.clickTagName = e;
- this.$refs.TableList.page = 1;
- this.totalPage = "1";
- // console.log(this.$refs.table);
- //重新网络请求
- if (this.firstTable.name == e) {
- this.lable = this.firstTable;
- this.getQueryList();
- } else if (this.twoTable.name == e) {
- this.lable = this.twoTable;
- this.getMeDone();
- } else if (this.threeTable.name === e) {
- this.lable = this.threeTable;
- this.getMeLaunch();
- } else if (this.fourTable.name === e) {
- this.lable = this.fourTable;
- this.getToBeRead();
- } else {
- this.lable = this.fiveTable;
- this.getBeReadList();
- }
- // console.log(this.lable);
- },
- handleClose() {
- this.dialogStatus = false;
- this.forwardStatus = false;
- this.exportBtnStatus = false;
- this.saveStatus = false;
- this.startStatus = true;
- this.closeStatus = true;
- this.abc = false;
- // this.fromList = {};
- },
- handleCloses() {
- this.treeList = [];
- this.textarea = "";
- this.handleStatus = false;
- },
- editCloses() {
- this.editStatus = false;
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- .copyClass {
- display: flex;
- }
- .flex-header-text-tree {
- width: 50%;
- text-align: center;
- }
- .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-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;
- }
- }
- }
- //设置子组件样式
- ::v-deep .el-tabs__item {
- padding: 0;
- margin-right: 20px;
- width: 166px;
- text-align: center;
- background-color: #d8eaf6;
- color: black;
- }
- ::v-deep .is-active {
- color: #fff;
- background-color: #0583cd;
- }
- ::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>
|