riskManagement.vue 50 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287
  1. <template>
  2. <div class="flex-box1">
  3. <div :span="24" class="flex-header">
  4. <Tabs :tabList="tabListTop" @status="clickTabTops">
  5. </Tabs>
  6. <el-button type="primary" @click="clickNewTag(clickTagNameTop)">+新建</el-button>
  7. </div>
  8. <div class="flex-count" v-if="this.clickTagNameTop == 'First'">
  9. <Table @clickDemand="clickDemand" :list="lableTable" ref="TableList" @changeNum="changeNum"
  10. @changeSize="changeSize">
  11. <!-- <template v-slot:first>
  12. <Export :num="num" ref="export" :exportStatusList="exportStatus" @seachExportList="seachExportList"
  13. @export="batchExport" @clickApproval="clickApproval"></Export>
  14. </template> -->
  15. <template v-slot:first>
  16. <Seach :list="filterData" @seachList="seachList1"></Seach>
  17. </template>
  18. </Table>
  19. </div>
  20. <div class="flex-count" v-if="this.clickTagNameTop == 'Two'">
  21. <Seach :list="filterDataTwo" @seachList="seachList2"></Seach>
  22. <!-- <el-table :data="tableData" style="width: 100%" @expand-change="expandChange" ref="refTable" height="600px" max-height="600px"> -->
  23. <el-table :data="tableData" style="width: 100%" ref="refTable" height="400px" max-height="400px">
  24. <el-table-column type="expand">
  25. <template slot-scope="props">
  26. <!-- <el-table v-loading="loading2" :data="props.row.fxfkProcessList" size="mini" style="width: 95%;margin-left: 5%;"> -->
  27. <el-table :data="props.row.fxfkProcessList" size="mini" style="width: 95%;margin-left: 5%;"
  28. @cell-click="getRowList">
  29. <el-table-column label="序号" type="index" width="50">
  30. </el-table-column>
  31. <el-table-column label="待办事项名称" prop="needName"></el-table-column>
  32. <el-table-column label="待办事项类型" prop="backlogType"></el-table-column>
  33. <el-table-column label="回复部门" prop="replyDepartment"></el-table-column>
  34. <el-table-column label="办理人" prop="transactor">
  35. <template slot-scope="scope">
  36. <span style="color:blue;cursor: pointer;">{{ scope.row.transactor }}</span>
  37. </template>
  38. </el-table-column>
  39. <el-table-column label="状志" prop="taskname"></el-table-column>
  40. <el-table-column label="回复内客" prop="replyContent"></el-table-column>
  41. </el-table>
  42. </template>
  43. </el-table-column>
  44. <el-table-column label="待办事项名称" prop="needName">
  45. </el-table-column>
  46. <el-table-column label="待办事项类型" prop="backlogType">
  47. </el-table-column>
  48. <el-table-column label="结束时间" prop="finishTime">
  49. </el-table-column>
  50. <el-table-column label="发起人" prop="proposer">
  51. </el-table-column>
  52. <el-table-column label="状态" prop="status">
  53. </el-table-column>
  54. <el-table-column label="当前进度" prop="progressBar">
  55. <template slot-scope="props">
  56. <el-progress :percentage="props.row.progressBar"></el-progress>
  57. </template>
  58. </el-table-column>
  59. <el-table-column label="操作" align="center">
  60. <template slot-scope="scope">
  61. <el-button size="mini" type="text" @click="getRiskadminform(scope.row)">
  62. 导出</el-button>
  63. </template>
  64. </el-table-column>
  65. </el-table>
  66. <el-pagination style="display: flex; flex-direction: row-reverse" v-if="adminpageData.total > 0"
  67. :current-page.sync="adminpageData.pageNum" :page-sizes="
  68. adminpageData.pageSizes ? adminpageData.pageSizes : [5, 10, 15, 20]
  69. " :page-size="adminpageData.pageSize" layout="total, sizes, prev, pager, next, jumper"
  70. :total="adminpageData.total" @size-change="adminhandleSizeChange"
  71. @current-change="adminhandleCurrentChange" />
  72. </div>
  73. <el-dialog title="添加" :visible.sync="dialogStatus" width="60%" :before-close="handleClose" :modal="false"
  74. v-if="dialogStatus" :destroy-on-close="true">
  75. <!-- 后期维护 -->
  76. <el-form ref="form" :model="fromList" :rules="rule" label-width="130px" style="margin-top: 30px">
  77. <div class="flex-header" v-if="this.clickTagNameTop == 'First'">
  78. <el-form-item label="材料名称:" prop="materialName">
  79. <el-input v-model="fromList.materialName"></el-input>
  80. </el-form-item>
  81. </div>
  82. <div class="flex-header" v-if="this.clickTagNameTop == 'Two'">
  83. <el-form-item label="待办事项名称:" prop="needName">
  84. <el-input v-model="fromList.needName"></el-input>
  85. </el-form-item>
  86. </div>
  87. <div class="flex-header" v-if="this.clickTagNameTop == 'Two'">
  88. <el-form-item label="待办事项类型:" label-width="130px" prop="backlogType">
  89. <el-select v-model="fromList.backlogType" placeholder="请选择待办事项类型" size="medium">
  90. <el-option v-for="item in backlogTypeoptions" :key="item.code" :label="item.name"
  91. :value="item.code" />
  92. </el-select>
  93. </el-form-item>
  94. <el-form-item label="结束时间:" label-width="130px" prop="finishTime">
  95. <el-date-picker type="date" placeholder="选择日期" v-model="fromList.finishTime"
  96. value-format="yyyy-MM-dd" style="width: 100%" :picker-options="pickerOptions">
  97. </el-date-picker>
  98. </el-form-item>
  99. </div>
  100. <div class="flex-header" v-if="this.clickTagNameTop == 'Two'">
  101. <el-form-item label="待办事项说明:" prop="backlogExplain">
  102. <el-input type="textarea" v-model="fromList.backlogExplain"></el-input>
  103. </el-form-item>
  104. </div>
  105. <div class="flex-load" style="display: flex; flex-direction: column">
  106. <el-form-item label="附件:" prop="mkFileShareAttachList">
  107. <my-upload @uploadBack="uploadBack" @delloadBack="delloadBack" @clickDownload="download"
  108. :fileInfo="fileInfo" :fileList="fromList.mkFileShareAttachList"
  109. style="width: 30% !important"></my-upload>
  110. </el-form-item>
  111. </div>
  112. </el-form>
  113. <div slot="footer" class="dialog-footer">
  114. <el-button @click="handleClose">取消</el-button>
  115. <el-button type="primary" @click="clickSave(1)">确定</el-button>
  116. </div>
  117. </el-dialog>
  118. <el-dialog title="人员" :visible.sync="dialogTreeStatus" width="100%" style="height: 100%" :fullscreen="true"
  119. :before-close="handleClose2" :modal="false" v-if="dialogTreeStatus" :destroy-on-close="true">
  120. <div style="height: 100%">
  121. <deptTreeOnly @treeCheck="treeCheckonly" :defaultList="defaultList" :type="depttype"
  122. :closeList="closeList">
  123. </deptTreeOnly>
  124. <div style="text-align: center; margin-top: 30px">
  125. <el-button type="primary" @click="clickSave(2)">确 定</el-button>
  126. <el-button @click="dialogTreeStatus = false;">取 消</el-button>
  127. </div>
  128. </div>
  129. </el-dialog>
  130. <el-dialog title="查看" :visible.sync="dialogadminStatus" width="100%" :before-close="handleAdminClose"
  131. :modal="false" v-if="dialogadminStatus" :destroy-on-close="true">
  132. <!-- 后期维护 -->
  133. <div style="position: fixed; z-index: 10000">
  134. <el-button type="primary" @click="handleAdminClose">关闭</el-button>
  135. </div>
  136. <el-form ref="form" :model="formAdmin" label-width="130px" style="margin-top: 30px">
  137. <div class="flex-header">
  138. <el-form-item label="待办事项名称:">
  139. <el-input v-model="formAdmin.needName" disabled="true"></el-input>
  140. </el-form-item>
  141. </div>
  142. <div class="flex-header">
  143. <el-form-item label="待办事项类型:" label-width="130px">
  144. <el-select v-model="formAdmin.backlogType" placeholder="请选择待办事项类型" disabled="true"
  145. size="medium">
  146. <el-option v-for="item in backlogTypeoptions" :key="item.code" :label="item.name"
  147. :value="item.code" />
  148. </el-select>
  149. </el-form-item>
  150. <el-form-item label="结束时间:" label-width="130px">
  151. <el-date-picker type="date" placeholder="选择日期" disabled="true" v-model="formAdmin.finishTime"
  152. value-format="yyyy-MM-dd" style="width: 100%"></el-date-picker>
  153. </el-form-item>
  154. </div>
  155. <div class="flex-header">
  156. <el-form-item label="待办事项说明:" prop="backlogExplain">
  157. <el-input type="textarea" v-model="formAdmin.backlogExplain" disabled="true"></el-input>
  158. </el-form-item>
  159. </div>
  160. <div class="flex-load" style="display: flex; flex-direction: column">
  161. <el-form-item label="附件:">
  162. <div v-for="(item, index) in formAdmin.adminAccessoryList" :key="index">
  163. <span style="color: blue;cursor: pointer;" @click="downloadOne(item)">{{ item.fileName
  164. }}</span>
  165. </div>
  166. </el-form-item>
  167. </div>
  168. <div class="flex-input-tare flex-header">
  169. <el-form-item label="回复内容" label-width="120px" prop="replyContent">
  170. <el-input type="textarea" v-model="formAdmin.replyContent" disabled="true"></el-input>
  171. </el-form-item>
  172. </div>
  173. <div class="flex-load" style="display: flex; flex-direction: column">
  174. <el-form-item label="回复附件:" disabled="true" prop="mkFileShareAttachList">
  175. <div v-for="(item, index) in formAdmin.processAccessoryList" :key="index">
  176. <span style="color: blue;cursor: pointer;" @click="downloadOne(item)">{{ item.fileName
  177. }}</span>
  178. </div>
  179. </el-form-item>
  180. </div>
  181. </el-form>
  182. <div>
  183. <div class="table-title">流程追踪</div>
  184. <Table :list="lables"></Table>
  185. </div>
  186. </el-dialog>
  187. </div>
  188. </template>
  189. <script>
  190. import Tabs from "../../../../components/el-tabs";
  191. import Table from "../../../../components/el-form";
  192. import Seach from "../../../../components/el-search";
  193. import myUpload from "../../../../components/workflowUpload";
  194. import deptTreeOnly from "../../../../components/newTree.vue";
  195. import { updateBase } from "../../../../http/api.js";
  196. import {
  197. getTodoBase,
  198. getDoneBase,
  199. getInitiateBase,
  200. } from "../../../../http/api.js";//../../../http/api.js
  201. import getConfig from '../../../../config/dev.js'
  202. import { log } from "console";
  203. export default {
  204. components: {
  205. Table,
  206. myUpload,
  207. deptTreeOnly,
  208. Tabs,
  209. Seach
  210. },
  211. data() {
  212. let _self = this
  213. return {
  214. pickerOptions: {
  215. //设置禁用状态,参数为当前日期
  216. disabledDate(time) {
  217. // return time.getTime() < Date.now(); //当天不可选
  218. return time.getTime() < new Date().getTime() - 86400000; // - 86400000是否包括当天
  219. },
  220. },
  221. pageNo: 1,//页码
  222. //用到的人
  223. treeListonly: {},
  224. defaultList: [],
  225. closeList: false,
  226. depttype: 0,
  227. request_form: {
  228. userId: "",
  229. userName: "",
  230. // path: this.$router.currentRoute.name,
  231. path: 'riskMaterials',
  232. userCode: JSON.parse(window.sessionStorage.userInfo).loginNo,
  233. title: "",
  234. businessKey: "288",
  235. processDefinitionKey: "fxfk_process",//流程key
  236. },
  237. requestForm: {
  238. // fresourceId: "0d94de8a-0281-11ed-a302-4ae7da54db39", // 本地环境
  239. // fresourceId: "canvas", // 生产环境
  240. // fresourceId: "bf79721c-33f3-11ed-ba0b-00505687dcd3", //测试环境
  241. fresourceId: getConfig().riskMaterialsfresourceId,
  242. processDefinitionKey: "fxfk_process",
  243. },
  244. rule: {
  245. materialName: [
  246. { required: true, message: "请添加材料名称", trigger: "blur" },
  247. ],
  248. needName: [
  249. { required: true, message: "请添加待办事项名称", trigger: "blur" },
  250. ],
  251. finishTime: [
  252. { required: true, message: "请选择结束时间", trigger: "blur" },
  253. ],
  254. backlogType: [
  255. { required: true, message: "请选择待办事项类型", trigger: "blur" },
  256. ],
  257. backlogExplain: [
  258. { required: true, message: "请添加待办事项说明", trigger: "blur" },
  259. ],
  260. mkFileShareAttachList: [
  261. { required: true, message: "请添加附件", trigger: "blur" },
  262. ],
  263. },
  264. fileInfo: {
  265. type: "bt1n",
  266. typename: "上传文件",
  267. // limit: 5,
  268. url: "/market/FxfkProcessMaterial/upload",
  269. fileList: [],
  270. },
  271. formAdmin: {},
  272. fromList: {
  273. // needName: '147258369'
  274. }, //表单数据
  275. backlogTypeoptions: [{
  276. name: '风控问题反馈',
  277. code: '风控问题反馈'
  278. },
  279. {
  280. name: '自查评估材料收集',
  281. code: '自查评估材料收集'
  282. }],
  283. dialogStatus: false,
  284. dialogTreeStatus: false,
  285. clickTagNameTop: 'First',//头部tab
  286. tabListTop: [
  287. {
  288. index: "First",
  289. label: "风控材料学习",
  290. name: "prosss_key",
  291. },
  292. {
  293. index: "Two",
  294. label: "风险点自查评估及问题反馈",
  295. },
  296. ],
  297. lableTable: {},//传给子组件table
  298. FirstlabelAdmin: {
  299. name: "first",
  300. height: "400",
  301. titledata: [
  302. {
  303. label: "材料名称",
  304. prop: "materialName",
  305. width: 300,
  306. },
  307. {
  308. label: "发布人",
  309. prop: "proposer",
  310. width: 300,
  311. },
  312. {
  313. label: "发布时间",
  314. prop: "proposerTime",
  315. width: 300,
  316. },
  317. ], //表格头
  318. data: [], //内容数据
  319. loading: true,
  320. loading2: false,
  321. pageData: {
  322. total: 15, // 总条数
  323. pageSizes: 10, // 每页数量
  324. pageNum: 1, // 页码
  325. },
  326. isSelection: false, // 表格有多选时设置
  327. isOperation: true, // 表格有操作列时设置
  328. isIndex: false, // 列表序号
  329. operation: {
  330. // 表格有操作列时设置
  331. label: "操作", // 列名
  332. width: "100", // 根据实际情况给宽度
  333. data: [
  334. {
  335. label: "下载", // 操作名称
  336. type: "", //按钮类型
  337. handleRow: function (e, r, o) {
  338. console.log(e);
  339. console.log(r);
  340. console.log(o);
  341. _self.getRiskform(r)
  342. }, // 自定义事件
  343. },
  344. {
  345. label: "删除", // 操作名称
  346. type: "", //按钮类型
  347. handleRow: function (e, r, o) {
  348. console.log(e);
  349. console.log(r);
  350. console.log(o);
  351. _self.$confirm("即将删除此条数据, 是否删除?", "提示", {
  352. confirmButtonText: "确定",
  353. cancelButtonText: "取消",
  354. type: "warning",
  355. })
  356. .then(() => {
  357. _self.delRiskform(r)
  358. })
  359. .catch(() => { });
  360. }, // 自定义事件
  361. },
  362. ],
  363. },
  364. },//风控材料学习
  365. searchBox: {},
  366. attList: [],
  367. filterData: {
  368. timeSelect: false, //是否显示日期控件
  369. sreach: true,
  370. restet: false,
  371. elinput: [
  372. {
  373. name: "材料名称", //提示语275
  374. key: "materialName", //字段名
  375. width: 275, //宽度
  376. },
  377. ],
  378. },
  379. filterDataTwo: {
  380. timeSelect: false, //是否显示日期控件
  381. sreach: true,
  382. restet: false,
  383. elinput: [
  384. {
  385. name: "待办事项名称", //提示语275
  386. key: "needName", //字段名
  387. width: 275, //宽度
  388. },
  389. ],
  390. },
  391. tableData: [],
  392. breBroodsList: [],
  393. adminpage: 1,
  394. adminpageData: {
  395. total: 15, // 总条数
  396. pageSizes: 10, // 每页数量
  397. pageNum: 1, // 页码
  398. },
  399. lables: {
  400. height: "400",
  401. titledata: [
  402. {
  403. label: "环节名称",
  404. prop: "taskName",
  405. width: 300,
  406. },
  407. {
  408. label: "处理人",
  409. prop: "assignee",
  410. width: 300,
  411. },
  412. {
  413. label: "到达时间",
  414. prop: "startTime",
  415. width: 300,
  416. },
  417. {
  418. label: "处理时间",
  419. prop: "endTime",
  420. width: 300,
  421. },
  422. {
  423. label: "回复意见",
  424. prop: "content",
  425. width: 300,
  426. },
  427. ], //表格头
  428. data: [], //内容数据
  429. loading: true,
  430. pageData: {
  431. total: 10, // 总条数
  432. pageSizes: 10, // 每页数量
  433. pageNum: 1, // 页码
  434. },
  435. isSelection: false, // 表格有多选时设置
  436. isOperation: false, // 表格有操作列时设置
  437. isIndex: true, // 列表序号
  438. operation: {
  439. // 表格有操作列时设置
  440. label: "操作", // 列名
  441. width: "50", // 根据实际情况给宽度
  442. data: [
  443. {
  444. label: "操作", // 操作名称
  445. type: "", //按钮类型
  446. handleRow: function () { }, // 自定义事件
  447. },
  448. ],
  449. },
  450. },
  451. dialogadminStatus: false,
  452. }
  453. },
  454. methods: {
  455. downloadOne(e) {
  456. let list = {
  457. id: e.fileCode,
  458. fileName: e.fileName,
  459. };
  460. this.$http({
  461. url: "/market/waf/downFile",
  462. method: "post",
  463. headers: {
  464. "Content-Type": "application/json",
  465. },
  466. responseType: "blob",
  467. data: list,
  468. }).then((response) => {
  469. console.log(response);
  470. if (window.navigator && window.navigator.msSaveOrOpenBlob) {
  471. let blob = new Blob([response.data], {
  472. type: "application/vnd.ms-excel",
  473. });
  474. //window.navigator.msSaveOrOpenBlob(blob, this.form.needName);
  475. window.navigator.msSaveOrOpenBlob(
  476. blob,
  477. list.fileName
  478. );
  479. } else {
  480. /* 火狐谷歌的文件下载方式 */
  481. var blob = new Blob([response.data]);
  482. var downloadElement = document.createElement("a");
  483. var href = window.URL.createObjectURL(blob);
  484. downloadElement.href = href;
  485. downloadElement.download =
  486. list.fileName;
  487. document.body.appendChild(downloadElement);
  488. downloadElement.click();
  489. document.body.removeChild(downloadElement);
  490. window.URL.revokeObjectURL(href);
  491. }
  492. });
  493. },
  494. handleAdminClose() {
  495. this.dialogadminStatus = false
  496. },
  497. getRowList(row, column, event, cell) {
  498. if (column.label == "办理人") {
  499. console.log(row);
  500. console.log(row.id);
  501. this.clickForm(row);
  502. this.getFromQuery(row);
  503. this.dialogadminStatus = true
  504. }
  505. },
  506. //查询form表单数据
  507. getFromQuery(e) {
  508. this.$http({
  509. url: "/market/fxfkProcess/query",
  510. method: "post",
  511. headers: {
  512. "Content-Type": "application/json",
  513. },
  514. data: { id: e.id },
  515. }).then((res) => {
  516. this.formAdmin = res.data;
  517. // this.dialogStatus = true;
  518. // console.log(this.$refs.formTable);
  519. // this.fileInfo.fileList = res.data.mkFileShareAttachList;
  520. this.formAdmin.mkFileShareAttachList = res.data.mkFileShareAttachList;
  521. this.formAdmin.resourceId = e.resourceId
  522. this.formAdmin.createId = e.transactor
  523. // this.taskId = res.data.taskId;
  524. });
  525. },
  526. async clickForm(e) {
  527. let list = {
  528. processInstanceId: e.processId,
  529. // taskId:e.taskId
  530. };
  531. let _this = this;
  532. let obj = {
  533. url: this.$url.formList.getCommentsByProcessId, //流程追踪接口
  534. data: list,
  535. headers: {
  536. "Content-Type": "application/json",
  537. },
  538. };
  539. let res = await this.common.httpPost(obj, success);
  540. function success(data) {
  541. data.data.data.map((item) => {
  542. item.startTime = _this.$util.datetimeFormat(item.startTime);
  543. item.endTime = _this.$util.datetimeFormat(item.endTime);
  544. });
  545. _this.lables.data = data.data.data;
  546. }
  547. },
  548. treeCheckonly(v) {
  549. this.treeListonly = v;
  550. },
  551. //风控材料学习
  552. getRiskList(e) {
  553. this.$http({
  554. url: "/market/FxfkProcessMaterial/queryPage",
  555. method: "post",
  556. headers: {
  557. "Content-Type": "application/json",
  558. page: '{"pageNo":"' + this.pageNo + '","pageSize":"10"}',
  559. },
  560. data: this.searchBox,
  561. }).then((res) => {
  562. this.lableTable.data = res.data.data;
  563. this.lableTable.pageData.total = res.data.totalRecord;
  564. this.loading = false;
  565. });
  566. },
  567. getRiskadminList(e) {
  568. this.loading2 = true;
  569. this.$http({
  570. url: "/market/fxfkProcess/queryFxfkProcessCollectPage",
  571. method: "post",
  572. headers: {
  573. "Content-Type": "application/json",
  574. page: '{"pageNo":"' + this.pageNo + '","pageSize":"10"}',
  575. },
  576. data: this.searchBox,
  577. }).then((res) => {
  578. this.tableData = res.data.data;
  579. this.adminpageData.total = res.data.totalRecord;
  580. this.loading2 = false;
  581. });
  582. },
  583. //风控材料学习
  584. getRiskform(row) {
  585. this.$http({
  586. url: "/market/FxfkProcessMaterial/query",
  587. method: "post",
  588. headers: {
  589. "Content-Type": "application/json",
  590. },
  591. data: { id: row.id },
  592. }).then((res) => {
  593. // console.log(res.data.wfFileShareAttachList)
  594. this.fromList.materialName = res.data.materialName
  595. this.fromList.mkFileShareAttachList = res.data.wfFileShareAttachList
  596. this.download()
  597. });
  598. },
  599. getRiskadminform(row) {
  600. this.$http({
  601. url: "/market/fxfkProcess/export",
  602. method: "post",
  603. headers: {
  604. "Content-Type": "application/json",
  605. },
  606. responseType: "blob",
  607. data: row.id,
  608. }).then((response) => {
  609. // console.log(response);
  610. if (window.navigator && window.navigator.msSaveOrOpenBlob) {
  611. let blob = new Blob([response.data], {
  612. type: "application/vnd.ms-excel",
  613. });
  614. //window.navigator.msSaveOrOpenBlob(blob, this.form.needName);
  615. window.navigator.msSaveOrOpenBlob(blob, row.needName + row.backlogType + ".rar");
  616. } else {
  617. /* 火狐谷歌的文件下载方式 */
  618. var blob = new Blob([response.data]);
  619. var downloadElement = document.createElement("a");
  620. var href = window.URL.createObjectURL(blob);
  621. downloadElement.href = href;
  622. downloadElement.download = row.needName + row.backlogType + ".rar";
  623. document.body.appendChild(downloadElement);
  624. downloadElement.click();
  625. document.body.removeChild(downloadElement);
  626. window.URL.revokeObjectURL(href);
  627. }
  628. });
  629. },
  630. //风控材料学习
  631. delRiskform(row) {
  632. this.$http({
  633. url: "/market/FxfkProcessMaterial/del",
  634. method: "post",
  635. headers: {
  636. "Content-Type": "application/json",
  637. },
  638. data: { id: row.id },
  639. }).then((res) => {
  640. if (res.data.desc === '删除成功') {
  641. this.$notify({
  642. title: "成功",
  643. message: res.data.desc,
  644. type: "success",
  645. });
  646. } else {
  647. this.$notify({
  648. title: "失败",
  649. message: res.data.desc,
  650. type: "error",
  651. });
  652. }
  653. this.getRiskList()
  654. });
  655. },
  656. download() {
  657. if (this.fromList.mkFileShareAttachList.length > 1) {
  658. this.$http({
  659. url: "/market/CMKFile/downAllFile",
  660. method: "post",
  661. headers: {
  662. "Content-Type": "application/json",
  663. },
  664. responseType: "blob",
  665. data: { mkFileShareAttachList: this.fromList.mkFileShareAttachList },
  666. }).then((response) => {
  667. if (window.navigator && window.navigator.msSaveOrOpenBlob) {
  668. let blob = new Blob([response.data], {
  669. type: "application/vnd.ms-excel",
  670. });
  671. window.navigator.msSaveOrOpenBlob(
  672. blob,
  673. this.fromList.materialName + ".zip"
  674. );
  675. } else {
  676. /* 火狐谷歌的文件下载方式 */
  677. var blob = new Blob([response.data]);
  678. var downloadElement = document.createElement("a");
  679. var href = window.URL.createObjectURL(blob);
  680. downloadElement.href = href;
  681. downloadElement.download = this.fromList.materialName + ".zip";
  682. document.body.appendChild(downloadElement);
  683. downloadElement.click();
  684. document.body.removeChild(downloadElement);
  685. window.URL.revokeObjectURL(href);
  686. }
  687. if (this.infolist.authType === "3") {
  688. this.dialogCli(10);
  689. }
  690. });
  691. } else {
  692. let list = {
  693. id: this.fromList.mkFileShareAttachList[0].fileCode,
  694. fileName: this.fromList.mkFileShareAttachList[0].fileName,
  695. };
  696. this.$http({
  697. url: "/market/waf/downFile",
  698. method: "post",
  699. headers: {
  700. "Content-Type": "application/json",
  701. },
  702. responseType: "blob",
  703. data: list,
  704. }).then((response) => {
  705. console.log(response);
  706. if (window.navigator && window.navigator.msSaveOrOpenBlob) {
  707. let blob = new Blob([response.data], {
  708. type: "application/vnd.ms-excel",
  709. });
  710. //window.navigator.msSaveOrOpenBlob(blob, this.form.needName);
  711. window.navigator.msSaveOrOpenBlob(
  712. blob,
  713. this.fromList.mkFileShareAttachList[0].fileName
  714. );
  715. } else {
  716. /* 火狐谷歌的文件下载方式 */
  717. var blob = new Blob([response.data]);
  718. var downloadElement = document.createElement("a");
  719. var href = window.URL.createObjectURL(blob);
  720. downloadElement.href = href;
  721. downloadElement.download =
  722. this.fromList.mkFileShareAttachList[0].fileName;
  723. document.body.appendChild(downloadElement);
  724. downloadElement.click();
  725. document.body.removeChild(downloadElement);
  726. window.URL.revokeObjectURL(href);
  727. }
  728. });
  729. }
  730. },
  731. //上传文件钩子函数
  732. clickUpload(file) { },
  733. //下载文件
  734. downExcel() {
  735. this.$http({
  736. url: "/market/waf/downLoadTemp",
  737. method: "post",
  738. headers: {
  739. "Content-Type": "application/json",
  740. },
  741. responseType: "blob",
  742. data: {},
  743. }).then((response) => {
  744. if (window.navigator && window.navigator.msSaveOrOpenBlob) {
  745. let blob = new Blob([response.data], {
  746. type: "application/vnd.ms-excel",
  747. });
  748. window.navigator.msSaveOrOpenBlob(
  749. blob,
  750. new Date().getTime().toString() + ".zip"
  751. );
  752. } else {
  753. /* 火狐谷歌的文件下载方式 */
  754. var blob = new Blob([response.data]);
  755. var downloadElement = document.createElement("a");
  756. var href = window.URL.createObjectURL(blob);
  757. downloadElement.href = href;
  758. downloadElement.download = this.form.needName + ".zip";
  759. document.body.appendChild(downloadElement);
  760. downloadElement.click();
  761. document.body.removeChild(downloadElement);
  762. window.URL.revokeObjectURL(href);
  763. }
  764. });
  765. },
  766. uploadBack(v) {//子组件判断没进去
  767. console.log(v);
  768. if (this.fromList.mkFileShareAttachList) {
  769. this.fromList.mkFileShareAttachList = [];
  770. this.fromList.mkFileShareAttachList = v;
  771. // this.attList=v
  772. } else {
  773. let mkFileShareAttachList = [];
  774. mkFileShareAttachList = v;
  775. this.$set(this.fromList, "mkFileShareAttachList", mkFileShareAttachList);
  776. }
  777. },
  778. delloadBack(v) {
  779. this.fromList.mkFileShareAttachList = v;
  780. // this.$http({
  781. // url: "/market/waf/update",
  782. // method: "post",
  783. // headers: {
  784. // "Content-Type": "application/json",
  785. // },
  786. // data: this.fromList,
  787. // }).then((res) => {
  788. // console.log(res);
  789. // // if (res.data.result === 0) {
  790. // // this.$message.success("工作流更新成功");
  791. // // }
  792. // });
  793. },
  794. clickNewTag(v) {
  795. console.log(v)
  796. let mkFileShareAttachList = [];
  797. mkFileShareAttachList = v;
  798. this.$set(this.fromList, "mkFileShareAttachList", mkFileShareAttachList);
  799. this.fromList = {}
  800. this.treeListonly = []
  801. this.dialogStatus = true
  802. this.attList=[]
  803. },
  804. async clickSave(v) {
  805. if (v == 1) {
  806. this.$refs.form.validate((valid) => {
  807. if (valid) {
  808. if (this.fromList.mkFileShareAttachList) {
  809. for (let i = 0; i < this.fromList.mkFileShareAttachList.length; i++) {
  810. this.attList.push(this.fromList.mkFileShareAttachList[i].id);
  811. }
  812. }
  813. if (this.clickTagNameTop == 'Two') {
  814. this.dialogTreeStatus = true
  815. if (this.fromList.mkFileShareAttachList) {
  816. this.fromList.adminAccessoryIdList = this.attList;
  817. }
  818. // this.getUserIds();
  819. } else {//材料学习
  820. if (this.fromList.mkFileShareAttachList) {
  821. this.fromList.accessoryIdList = this.attList;
  822. }
  823. this.$http({
  824. url: "/market/FxfkProcessMaterial/add",
  825. method: "post",
  826. headers: {
  827. "Content-Type": "application/json",
  828. },
  829. data: this.fromList,
  830. }).then((res) => {
  831. if (res.data.desc === '添加成功') {
  832. this.$notify({
  833. title: "成功",
  834. message: res.data.desc,
  835. type: "success",
  836. });
  837. } else {
  838. this.$notify({
  839. title: "失败",
  840. message: res.data.desc,
  841. type: "error",
  842. });
  843. }
  844. this.dialogStatus = false
  845. this.getRiskList()
  846. });
  847. }
  848. } else {
  849. this.$message.error("请完善表单信息");
  850. return false;
  851. }
  852. });
  853. } else if (v == 2) {//新增候选人提交
  854. if (this.treeListonly.length > 0) {
  855. console.log(this.treeListonly)
  856. if (this.fromList.mkFileShareAttachList) {
  857. let attList = [];
  858. for (let i = 0; i < this.fromList.mkFileShareAttachList.length; i++) {
  859. attList.push(this.fromList.mkFileShareAttachList[i].id);
  860. }
  861. this.fromList.adminAccessoryIdList = attList;
  862. }
  863. this.fromList.treeListonly = this.treeListonly
  864. console.log(this.fromList)
  865. this.getUserIds();
  866. } else {
  867. this.$message.error("请选择人员");
  868. }
  869. }
  870. },
  871. //获取自己idname
  872. getUserIds() {
  873. // this.$http({
  874. // url: "/market/waf/queryRoleByName",
  875. // method: "post",
  876. // headers: {
  877. // "Content-Type": "application/json",
  878. // },
  879. // data: {
  880. // userCode: JSON.parse(window.sessionStorage.userInfo).loginNo,
  881. // },
  882. // }).then((res) => {
  883. // this.request_form.userName = res.data.data.rows[0].name;
  884. // this.request_form.userId = res.data.data.rows[0].userCode;
  885. // console.log(this.request_form)
  886. this.setForm();
  887. // });
  888. },
  889. setForm(e) {
  890. this.request_form.title = '[市场经营管理平台]-风险点防控-'+this.fromList.needName;
  891. this.fromList.transactorList = []
  892. this.treeListonly.map((item) => {
  893. this.fromList.transactorList.push(item.key)
  894. })
  895. delete this.fromList.treeListonly
  896. this.$http({
  897. url: "/market/fxfkProcess/add",
  898. method: "post",
  899. headers: {
  900. "Content-Type": "application/json",
  901. },
  902. data: this.fromList,
  903. }).then((res) => {
  904. this.request_form.businessKey = res.data.body;
  905. // this.fromList.id = res.data.body;
  906. // this.formWorkId = res.data.body;
  907. this.clickHandle(res.data.body);
  908. });
  909. },
  910. async clickHandle(e) {
  911. let startArr = []
  912. this.treeListonly.map((item, index) => {
  913. startArr.push({
  914. userId: item.key,
  915. userCode: item.key,
  916. userName: item.label,
  917. // path: this.$router.currentRoute.name,
  918. path: 'riskMaterials',
  919. title: this.request_form.title,
  920. businessKey: this.request_form.businessKey[index],
  921. processDefinitionKey: "fxfk_process",//流程key
  922. })
  923. })
  924. console.log(startArr);
  925. let _this = this;
  926. let obj = {
  927. url: this.$url.formList.startWorkList, //开始工作流接口 List
  928. data: startArr,
  929. // status: "form",
  930. headers: {
  931. // "Content-Type": "application/x-www-form-urlencoded",
  932. "Content-Type": "application/json",
  933. },
  934. };
  935. let res = await this.common.httpPost(obj, success);
  936. function success(data) {
  937. console.log(data)
  938. _this.fromList.taskId = data.data;
  939. // _this.taskId = data.data;
  940. let listarr = []
  941. e.map((item, index) => {
  942. listarr.push({
  943. id: e[index],
  944. processId: _this.fromList.taskId[index],
  945. tableName: _this.request_form.processDefinitionKey,
  946. })
  947. })
  948. // let list = {
  949. // id: e,
  950. // // taskId:_this.formId,
  951. // processId: _this.fromList.taskId,
  952. // tableName: _this.request_form.processDefinitionKey,
  953. // // resourceId: _this.nextPath.currentShape[0].resourceId,
  954. // };
  955. _this.setUpdate(listarr);
  956. }
  957. },
  958. //更新工作流接口
  959. setUpdate(e) {
  960. // updateBase(e).then((res) => {
  961. // this.infolist = res.data.body[0];
  962. // });
  963. this.$http({
  964. url: "/market/waf/batchUpdateBase",
  965. method: "post",
  966. headers: {
  967. "Content-Type": "application/json",
  968. },
  969. data: e,
  970. }).then((res) => {
  971. // this.fromList.taskId = res.data.body.taskId;
  972. // this.fromList.taskName = res.data.body.taskName;
  973. // if (res.data.body.taskName === "起草") {
  974. // this.isSync = res.data.body.isSync;
  975. // } else {
  976. // this.isSync = "1";
  977. // }
  978. if (res.data.result === 0) {
  979. // this.$message.success("工作流更新成功");
  980. this.handleClose()
  981. this.getRiskadminList()
  982. }
  983. });
  984. },
  985. handleClose() {//关闭弹窗
  986. this.dialogStatus = false;
  987. this.dialogTreeStatus = false;
  988. this.fromList = {};
  989. },
  990. handleClose2() {//关闭弹窗
  991. this.dialogTreeStatus = false;
  992. },
  993. //获取页码
  994. changeNum(e) {
  995. console.log(e)
  996. this.pageNo = e;
  997. this.lableTable.pageData.pageNum = e;
  998. this.getRiskList()
  999. },
  1000. //获取页码
  1001. changeSize(e) {
  1002. console.log(e);
  1003. },
  1004. //点击工单状态跳转需求流程显示页面
  1005. clickDemand(e, res) {
  1006. if (e == '待办事项名称') {
  1007. console.log(e);
  1008. console.log(res);
  1009. }
  1010. },
  1011. //风控材料搜索内容
  1012. seachList1(e) {
  1013. this.pageNo = 1
  1014. this.lableTable.pageData.pageNum = 1;
  1015. this.searchBox = e
  1016. this.getRiskList(e)
  1017. },
  1018. //风控材料搜索内容
  1019. seachList2(e) {
  1020. this.pageNo = 1
  1021. this.adminpageData.pageNum = 1;
  1022. console.log(e);
  1023. this.searchBox = e
  1024. this.getRiskadminList(e)
  1025. },
  1026. clickTabTops(e) {
  1027. console.log(e);
  1028. this.clickTagNameTop = e
  1029. this.pageNo = 1
  1030. this.$refs.TableList.page = 1;
  1031. if (this.clickTagNameTop == 'First') {
  1032. this.lableTable = this.FirstlabelAdmin
  1033. this.getRiskList()
  1034. this.rule = {
  1035. materialName: [
  1036. { required: true, message: "请添加材料名称", trigger: "blur" },
  1037. ],
  1038. needName: [
  1039. { required: true, message: "请添加待办事项名称", trigger: "blur" },
  1040. ],
  1041. finishTime: [
  1042. { required: true, message: "请选择结束时间", trigger: "blur" },
  1043. ],
  1044. backlogType: [
  1045. { required: true, message: "请选择待办事项类型", trigger: "blur" },
  1046. ],
  1047. backlogExplain: [
  1048. { required: true, message: "请添加待办事项说明", trigger: "blur" },
  1049. ],
  1050. mkFileShareAttachList: [
  1051. { required: true, message: "请添加附件", trigger: "blur" },
  1052. ],
  1053. }
  1054. } else {
  1055. this.getRiskadminList()
  1056. this.rule = {
  1057. materialName: [
  1058. { required: true, message: "请添加材料名称", trigger: "blur" },
  1059. ],
  1060. needName: [
  1061. { required: true, message: "请添加待办事项名称", trigger: "blur" },
  1062. ],
  1063. finishTime: [
  1064. { required: true, message: "请选择结束时间", trigger: "blur" },
  1065. ],
  1066. backlogType: [
  1067. { required: true, message: "请选择待办事项类型", trigger: "blur" },
  1068. ],
  1069. backlogExplain: [
  1070. { required: true, message: "请添加待办事项说明", trigger: "blur" },
  1071. ],
  1072. }
  1073. }
  1074. },
  1075. adminhandleSizeChange(val) {
  1076. console.log(`每页 ${val} 条`);
  1077. },
  1078. adminhandleCurrentChange(val) {
  1079. // console.log(e)
  1080. this.pageNo = val;
  1081. this.getRiskadminList()
  1082. console.log(`当前页: ${val}`);
  1083. },
  1084. },
  1085. created() {
  1086. this.lableTable = this.FirstlabelAdmin
  1087. this.getRiskList()
  1088. }
  1089. }
  1090. </script>
  1091. <style lang="scss" scoped>
  1092. .copyClass {
  1093. display: flex;
  1094. }
  1095. .flex-header-text-tree {
  1096. width: 50%;
  1097. text-align: center;
  1098. }
  1099. .active {
  1100. background-color: #f3faff;
  1101. }
  1102. .flex-common {
  1103. padding: 10px 5%;
  1104. font-size: 18px;
  1105. }
  1106. .flex-buttons {
  1107. background-color: #cde4f6;
  1108. border-color: #cde4f6;
  1109. color: #606266;
  1110. }
  1111. .flex-button {
  1112. margin-top: 10px;
  1113. margin-bottom: 10px;
  1114. ::v-deep .el-button--primary {
  1115. width: 222px;
  1116. }
  1117. }
  1118. .flex-left-header-text {
  1119. height: 40px;
  1120. line-height: 40px;
  1121. color: black;
  1122. padding-left: 10px;
  1123. background-color: #cde4f6;
  1124. font-size: 18px;
  1125. font-weight: bold;
  1126. }
  1127. .flex-right-text {
  1128. margin-right: 20px;
  1129. width: 50%;
  1130. }
  1131. .flex-handle {
  1132. width: 100%;
  1133. padding: 30px;
  1134. display: flex;
  1135. .flex-right {
  1136. width: 50%;
  1137. border: 1px solid #e1e1e1;
  1138. margin-left: 20px;
  1139. }
  1140. .flex-left {
  1141. width: 50%;
  1142. display: flex;
  1143. flex-direction: column;
  1144. .flex-left-header {
  1145. display: flex;
  1146. justify-content: space-around;
  1147. }
  1148. }
  1149. }
  1150. .table-title {
  1151. height: 50px;
  1152. line-height: 50px;
  1153. background-color: #f3faff;
  1154. font-size: 18px;
  1155. font-weight: bold;
  1156. }
  1157. ::v-deep .el-table__fixed-body-wrapper {
  1158. top: 50px !important;
  1159. }
  1160. ::v-deep .el-form-item {
  1161. width: 100%;
  1162. }
  1163. .flex-box1 {
  1164. display: flex;
  1165. width: calc(100% - 40px);
  1166. border-radius: 20px;
  1167. background-color: #fff;
  1168. margin: 0 auto;
  1169. margin-top: 20px;
  1170. position: relative;
  1171. flex-direction: column;
  1172. .flex-header {
  1173. display: flex;
  1174. width: 100%;
  1175. position: relative;
  1176. height: 60px;
  1177. margin: 1%;
  1178. border-bottom: 1px solid #e1e1e1;
  1179. justify-content: space-between;
  1180. .el-button {
  1181. width: 150px;
  1182. float: right;
  1183. height: 40px !important;
  1184. margin-right: 30px;
  1185. }
  1186. }
  1187. .flex-load {
  1188. display: flex;
  1189. width: 80%;
  1190. position: relative;
  1191. margin: 1%;
  1192. border-bottom: 1px solid #e1e1e1;
  1193. justify-content: space-between;
  1194. // height: 354px!important;
  1195. }
  1196. }
  1197. //设置子组件样式
  1198. ::v-deep .el-tabs__item {
  1199. padding: 0;
  1200. margin-right: 20px;
  1201. width: 166px;
  1202. text-align: center;
  1203. background-color: #d8eaf6;
  1204. color: black;
  1205. }
  1206. ::v-deep .is-active {
  1207. color: #fff;
  1208. background-color: #0583cd;
  1209. }
  1210. ::v-deep .el-tabs__active-bar {
  1211. display: none;
  1212. }
  1213. ::v-deep .el-tabs__nav-wrap::after {
  1214. display: none !important;
  1215. }
  1216. .flex-form {
  1217. margin-top: 50px;
  1218. }
  1219. .flex-footer-botton {
  1220. display: flex;
  1221. justify-content: space-evenly;
  1222. }
  1223. ::v-deep .el-dialog__body {
  1224. // max-height: calc(100vh) !important;
  1225. // min-height: 100px;
  1226. height: 100%;
  1227. // overflow-y: hidden;
  1228. }
  1229. </style>