12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598 |
- <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>
- <Table :list="lables"></Table>
- </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"
- @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 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,
- },
- data() {
- return {
- buttonStatus: true,
- copyStatus: false,
- dialogTitle: "",
- disabled: false,
- 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: "canvas", // 生产环境
- // 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()
- }, // 自定义事件
- },
- ],
- },
- },
- lable: {},
- copyUser: "", //抄送人
- backThree: [],
- backCopyThree: [], //抄送人数组
- 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: 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: {},
- };
- },
- created() {
- //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: {
- //添加面包屑
- 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) {
- 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) {
- 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;
- // 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);
- });
- },
- //处理按钮,开始工作流接口
- clickHandles() {
- if (this.fromList.taskId) {
- this.destroy = true;
- this.handleStatus = true;
- } else {
- this.$message.error("请先点击保存按钮");
- }
- this.getMetirialType();
- },
- //批量审批
- 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) {
- data.data.map((item) => {
- item.startTime = _this.$util.datetimeFormat(item.startTime);
- item.endTime = _this.$util.datetimeFormat(item.endTime);
- });
- _this.lables.data = data.data;
- }
- },
- 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.taskId = data.data;
- _this.taskId = data.data;
- let list = {
- id: e,
- // taskId:_this.formId,
- processId: _this.fromList.taskId,
- // 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;
- if (res.data.body.taskName === "起草") {
- this.isSync = res.data.body.isSync;
- } else {
- this.isSync = "1";
- }
- // if (res.data.result === 0) {
- // this.$message.success("工作流更新成功");
- // }
- });
- },
- //获取待阅接口
- 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.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>
|