index.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908
  1. <template>
  2. <fullscreen :fullscreen.sync="fullscreen" class="container">
  3. <div class="container-box">
  4. <toolList @iconCli='iconCli' :tooltit='tooltit'></toolList>
  5. <div style="overflow: hidden;">
  6. <el-button style="float: right;margin-top: 10px;" type="primary" @click="dialogCheck(3)">添加</el-button>
  7. <el-button style="float: right;margin-top: 10px;margin-right: 20px;" type="primary"
  8. @click="getStanding">台账</el-button>
  9. </div>
  10. <div class="tabbox">
  11. <el-table height="calc(100% - 40px)" class="com-table" ref="multipleTable" :data="tableData"
  12. tooltip-effect="dark" size="small" border style="width: 100%" v-loading="loading">
  13. <el-table-column prop="woTitle" label="业务名称">
  14. </el-table-column>
  15. <el-table-column prop="opName" label="申请姓名">
  16. </el-table-column>
  17. <el-table-column prop="createTime" label="申请时间">
  18. </el-table-column>
  19. <el-table-column prop="stsDesc" label="状态">
  20. </el-table-column>
  21. <el-table-column label="操作" width="120px" align="center">
  22. <template slot-scope="scope">
  23. <el-button size="mini" type="primary" @click="dialogCheck(1,scope.row)">查看</el-button>
  24. <el-button size="mini" type="danger" v-if="scope.row.sts != 1"
  25. @click="dialogCheck(2,scope.row)">处理</el-button>
  26. <!-- <el-button size="mini" type="danger" @click="delLine(scope.row)">删除</el-button> -->
  27. </template>
  28. </el-table-column>
  29. </el-table>
  30. <el-pagination class="pageBox" @current-change="currchange" layout="prev, pager, next" background
  31. :total="total">
  32. </el-pagination>
  33. </div>
  34. </div>
  35. <el-dialog :title="titname" :visible.sync="dialogStatus" width="50%" :destroy-on-close="true"
  36. :modal-append-to-body="false" :close-on-click-modal="false" :before-close="closedia" :fullscreen="true">
  37. <div v-loading="loadinged">
  38. <el-form :model="infolist" ref="infolist" :rules="rules"
  39. style="height: calc(100vh - 180px);overflow-y: scroll;">
  40. <div class="info-line">
  41. <el-form-item prop="woName">
  42. <span>工单名称</span>
  43. <el-input v-model="infolist.woName" placeholder="工单名称" :disabled="disableStatus">
  44. </el-input>
  45. </el-form-item>
  46. <el-form-item prop="terminal">
  47. <span>申请流程</span>
  48. <el-select clearable v-model="terminal" placeholder="申请流程" :disabled="disableStatus">
  49. <el-option v-for="items in options" :key="items.procId" :label="items.procName"
  50. :value="items.procId">
  51. </el-option>
  52. </el-select>
  53. </el-form-item>
  54. </div>
  55. <el-form-item class="info-line online">
  56. <span>正文内容</span>
  57. <el-input v-model="infolist.textContent" placeholder="正文内容" type="textarea" :autosize="{ minRows: 4, maxRows: 10}"
  58. :disabled="disableStatus">
  59. </el-input>
  60. </el-form-item>
  61. <div style="padding:0 20px 0 120px;margin-bottom: 20px;" v-if="disableStatus">
  62. <uploadDown :datalist="datalist" :dialogStatus="uploadstatus"></uploadDown>
  63. </div>
  64. <div style="padding-left: 100px" v-if="!disableStatus">
  65. <myUpload @uploadBack="uploadBack" :fileInfo="fileInfo" :fileList="fileInfo.fileList">
  66. </myUpload>
  67. </div>
  68. <div style="margin: 20px 0;padding: 0 20px;">
  69. <el-table class="com-table" ref="multipleTable" :data="infodatas" tooltip-effect="dark"
  70. size="small" border style="width: 100%">
  71. <el-table-column prop="infoName" label="合作伙伴名称">
  72. <template slot-scope="scope">
  73. <el-input v-model="scope.row.factoryName" :disabled="titname != '添加'&&vision != '流程发起'"></el-input>
  74. </template>
  75. </el-table-column>
  76. <el-table-column prop="infoCode" label="评估时间">
  77. <template slot-scope="scope">
  78. <el-date-picker :disabled="titname != '添加'&&vision != '流程发起'" v-model="scope.row.assessTime" type="date">
  79. </el-date-picker>
  80. </template>
  81. </el-table-column>
  82. <el-table-column prop="infoResult" label="评估打分">
  83. <template slot-scope="scope">
  84. <el-input v-model="scope.row.assessScore" :disabled="titname != '添加'&&vision != '流程发起'"></el-input>
  85. </template>
  86. </el-table-column>
  87. <el-table-column prop="infoIf" label="后续管理动作">
  88. <template slot-scope="scope">
  89. <el-input v-model="scope.row.followAction" :disabled="titname != '添加'&&vision != '流程发起'"></el-input>
  90. </template>
  91. </el-table-column>
  92. <el-table-column prop="infoTime" label="管理动作落地执行情况">
  93. <template slot-scope="scope">
  94. <el-input v-model="scope.row.exeCon" :disabled="vision != '填报信息'||titname == '查看'"></el-input>
  95. </template>
  96. </el-table-column>
  97. <el-table-column label="操作" width="120px" align="center" v-if="titname == '添加'">
  98. <template slot-scope="scope">
  99. <el-button size="mini" type="primary" @click="choline(1,scope)">添加</el-button>
  100. <el-button size="mini" type="danger" @click="choline(2,scope)">删除</el-button>
  101. </template>
  102. </el-table-column>
  103. </el-table>
  104. </div>
  105. <el-form-item class="info-line online" v-if="vision == '审批'">
  106. <span>审批说明</span>
  107. <el-input v-model="remark" placeholder="审批说明" type="textarea" :autosize="{ minRows: 4, maxRows: 10}"
  108. :disabled="titname == '查看'">
  109. </el-input>
  110. </el-form-item>
  111. <div style="margin-bottom: 20px;padding: 0 20px;" v-if="titname != '添加'">
  112. <el-table class="com-table" ref="multipleTable" :data="rovaList" tooltip-effect="dark"
  113. size="small" border style="width: 100%">
  114. <el-table-column prop="taskId" label="编号">
  115. </el-table-column>
  116. <el-table-column prop="taskName" label="环节">
  117. </el-table-column>
  118. <el-table-column prop="assigneeName" label="处理人">
  119. </el-table-column>
  120. <el-table-column prop="assigneeNo" label="处理人工号">
  121. </el-table-column>
  122. <el-table-column prop="opTime" label="处理时间">
  123. </el-table-column>
  124. <el-table-column prop="remark" label="备注">
  125. </el-table-column>
  126. </el-table>
  127. </div>
  128. </el-form>
  129. <div slot="footer" class="dialog-footer myfooter">
  130. <el-button v-if="titname != '查看' && vision == '流程发起'" type="primary" @click="checkexa = true">确 定
  131. </el-button>
  132. <el-button v-if="titname != '查看' && vision == '填报信息'" type="primary" @click="dialogCli(2)">确 定
  133. </el-button>
  134. <el-button v-if="titname != '查看' && vision == '审批'" type="primary" @click="checkexa = true">通 过
  135. </el-button>
  136. <el-button v-if="titname != '查看' && vision == '审批'" type="primary" @click="dialogCli(1)">打 回
  137. </el-button>
  138. <el-button v-if="titname == '添加'" type="primary" @click="temp">保 存</el-button>
  139. <el-button v-if="titname == '添加'" type="primary" @click="checkexa = true">确 定</el-button>
  140. <el-button v-if="titname == '查看'" @click="dialogCli(3)">确 定</el-button>
  141. <el-button @click="dialogCli(3)">取 消</el-button>
  142. </div>
  143. </div>
  144. </el-dialog>
  145. <el-dialog title="选择审批人" :visible.sync="checkexa" width="50%" :destroy-on-close="true"
  146. :modal-append-to-body="false" :close-on-click-modal="false">
  147. <div>
  148. <el-form :model="infolist" ref="infolist" :rules="rules">
  149. <el-form-item prop="visiblec" class="info-line online">
  150. <span>审批人员</span>
  151. <deptTreeOnly class="tree" @treeCheck="treeCheckonly" :defaultList="defaultList"
  152. :type="depttype" :closeList="closeList"></deptTreeOnly>
  153. <div class="tree treeUser">
  154. <p>{{treeListonly.leaderAuditName}}
  155. <i v-if="treeListonly.leaderAuditName" @click="deletes()"
  156. class="el-icon-error"></i>
  157. </p>
  158. </div>
  159. </el-form-item>
  160. </el-form>
  161. <div slot="footer" style="text-align: right;padding-bottom: 20px;">
  162. <el-button type="primary" @click="dialogCliadd" v-if="!visionchonly">确 定</el-button>
  163. <el-button type="primary" @click="dialogCli(2)" v-if="visionchonly">确 定</el-button>
  164. <el-button @click="checkexa = false">取 消</el-button>
  165. </div>
  166. </div>
  167. </el-dialog>
  168. <myMessage :messTit='messTit' @closeMessage="closeMessage" :centerDialogVisible="centerDialogVisible"
  169. v-if="centerDialogVisible"></myMessage>
  170. </fullscreen>
  171. </template>
  172. <script>
  173. import mySearch from "../../../components/search.vue";
  174. import myMessage from "../../../components/myMessage.vue"
  175. import toolList from '../../../components/toolList'
  176. import myUpload from '../../../components/upload'
  177. import uploadDown from '../../../components/uploadDown.vue'
  178. import deptTreeOnly from "../../../components/deptTreeOnly.vue"
  179. export default {
  180. components: {
  181. mySearch,
  182. myMessage,
  183. toolList,
  184. myUpload,
  185. uploadDown,
  186. deptTreeOnly
  187. },
  188. data() {
  189. const woName = (rule, value, callback) => {
  190. if (!this.infolist.woName) {
  191. callback(new Error('不能为空'))
  192. } else {
  193. callback()
  194. }
  195. }
  196. const terminal = (rule, value, callback) => {
  197. if (!this.terminal) {
  198. callback(new Error('不能为空'))
  199. } else {
  200. callback()
  201. }
  202. }
  203. return {
  204. rules: {
  205. woName: [{
  206. required: true,
  207. trigger: 'blur',
  208. validator: woName
  209. }],
  210. terminal: [{
  211. required: true,
  212. trigger: 'change',
  213. validator: terminal
  214. }],
  215. },
  216. tooltit: '线上渠道合作运营',
  217. fullscreen: false,
  218. total: 0,
  219. pageSize: 1,
  220. tableData: [{}],
  221. dialogStatus: false,
  222. disableStatus: false,
  223. titname: '',
  224. infolist: {
  225. },
  226. userInfo: {},
  227. params: {},
  228. centerDialogVisible: false,
  229. messTit: '',
  230. delid: '',
  231. loading: false,
  232. loadinged: false,
  233. fileInfo: {
  234. limit: 5,
  235. url: '/bpm/api/upload',
  236. fileList: []
  237. },
  238. rovaList: [],
  239. vision: '',
  240. datalist: {
  241. url: '/bpm/api/download',
  242. type: 1
  243. },
  244. uploadstatus: false,
  245. rovaList: [],
  246. mydisable: 1,
  247. opname: '',
  248. opno: '',
  249. attList: [],
  250. options: [],
  251. terminal: '',
  252. remark: '',
  253. visionsts: '1',
  254. ifopt: [{
  255. id: 1,
  256. name: '是'
  257. }, {
  258. id: 0,
  259. name: '否'
  260. }],
  261. infodatas: [{}, {}, {}, {}, {}],
  262. checkexa: false,
  263. treeListonly: {},
  264. defaultList: [],
  265. closeList: false,
  266. visionchonly: false,
  267. depttype: 0,
  268. tempSave: false,
  269. }
  270. },
  271. watch:{
  272. tempSave (value) {
  273. if (value) {
  274. // 监听编辑状态,每20秒请求一次,注意函数不加()
  275. this.timer = window.setInterval(this.temp, 20000)
  276. } else {
  277. // 停止监听
  278. clearInterval(this.timer)
  279. }
  280. }
  281. },
  282. methods: {
  283. temp() {
  284. if (JSON.stringify(this.infolist)=='{}') {
  285. return;
  286. }
  287. let params = {};
  288. params.infolist = this.infolist
  289. params.fileList = [];
  290. params.attList = [];
  291. this.attList.forEach(item => {
  292. let file = {
  293. id: item.fileCode,
  294. fileCode: item.fileCode,
  295. fileName: item.fileName,
  296. name: item.fileName
  297. };
  298. params.fileList.push(file);
  299. params.attList.push(file);
  300. });
  301. this.$http({
  302. url: "/market/bpmTemp/temp",
  303. method: "post",
  304. headers: {
  305. "Content-Type": "application/json",
  306. },
  307. data: {
  308. bpmType: "5",
  309. content: JSON.stringify(params),
  310. },
  311. }).then((res) => {
  312. //console.log(res)
  313. });
  314. },
  315. deletes() {
  316. this.treeListonly = {};
  317. this.closeList = !this.closeList;
  318. },
  319. treeCheckonly(v) {
  320. this.treeListonly = v;
  321. },
  322. choline(v, n) {
  323. if (v == 1) {
  324. this.infodatas.push({})
  325. } else {
  326. this.infodatas.splice(n.$index, 1)
  327. }
  328. },
  329. closedia() {
  330. this.infolist = {};
  331. this.attList = [];
  332. this.fileInfo.fileList = [];
  333. this.dialogStatus = false;
  334. this.checkexa = false;
  335. },
  336. //获取列表
  337. getList(v, n) {
  338. this.pageSize = n;
  339. let _this = this;
  340. this.loading = true;
  341. v.procName = "合作运营流程";
  342. this.$http({
  343. url: "/bpm/api/queryToDoAndFinishTaskList",
  344. method: "post",
  345. headers: {
  346. "Content-Type": "application/json",
  347. "page": '{"pageNo":"' + n + '","pageSize":"10"}'
  348. },
  349. data: v,
  350. }).then((res) => {
  351. this.tableData = res.data.data;
  352. this.total = res.data.totalRecord;
  353. this.loading = false;
  354. });
  355. },
  356. // 分页
  357. currchange(v) {
  358. this.pageSize = v;
  359. this.getList(this.params, this.pageSize);
  360. },
  361. //申请
  362. dialogCheck(v, n) {
  363. this.dialogStatus = true;
  364. let infolist = Object.assign({}, n);
  365. this.vision = '';
  366. this.visionsts = '';
  367. this.infodatas = [{}, {}, {}, {}, {}];
  368. if (v === 1) {
  369. this.titname = '查看';
  370. this.disableStatus = true;
  371. } else if (v === 2) {
  372. this.titname = '审批';
  373. this.disableStatus = true;
  374. } else if (v === 3) {
  375. // this.$http({
  376. // url: '/market/bpmTemp/query',
  377. // method: "post",
  378. // headers: {"Content-Type": "application/json",},
  379. // data: {bpmType: "5"},
  380. // }).then((res) => {
  381. // if (res.data) {
  382. // let content = JSON.parse(res.data.content);
  383. // this.infolist = content.infolist;
  384. // this.attList = content.attList;
  385. // this.fileInfo.fileList = content.fileList;
  386. // }
  387. // this.tempSave = true;
  388. // this.titname = '添加';
  389. // this.disableStatus = false;
  390. // });
  391. //todo 查询历史数据会导致节点id为空的bug(添加失败)临时解决方案此处流程待梳理
  392. this.infolist = {};
  393. this.tempSave = true;
  394. this.titname = '添加';
  395. this.disableStatus = false;
  396. return
  397. }
  398. this.$http({
  399. url: '/bpm/api/taskInit',
  400. method: "post",
  401. headers: {
  402. "Content-Type": "application/json",
  403. },
  404. data: {
  405. woNo: n.woNo
  406. },
  407. }).then((res) => {
  408. // this.infolist = Object.assign({}, res.data);
  409. this.terminal = infolist.procId;
  410. this.opname = res.data.opName;
  411. this.opno = res.data.opNo;
  412. this.infolist = JSON.parse(res.data.params.terminalRes);
  413. this.infodatas = JSON.parse(res.data.params.factoryList);
  414. this.infolist.procId = infolist.procId;
  415. this.infolist.procVersion = infolist.procVersion;
  416. this.remark = infolist.remark;
  417. this.infolist.stepId = infolist.stepId;
  418. this.infolist.taskId = infolist.taskId;
  419. this.infolist.taskName = infolist.taskName;
  420. this.infolist.opName = infolist.opName;
  421. this.infolist.opNo = infolist.opNo;
  422. this.infolist.opTime = infolist.opTime;
  423. this.infolist.woNo = infolist.woNo;
  424. this.visionchonly = false;
  425. if (res.data.taskList[res.data.taskList.length - 1].taskName == '流程发起') {
  426. this.vision = '流程发起';
  427. if(this.titname == '审批'){
  428. this.disableStatus = false;
  429. }
  430. this.visionchonly = true;
  431. } else if (res.data.taskList[res.data.taskList.length - 1].taskName == '科室主任审批') {
  432. this.vision = '审批';
  433. this.visionchonly = true;
  434. } else if (res.data.taskList[res.data.taskList.length - 1].taskName == '主管副总审批') {
  435. this.vision = '审批';
  436. this.visionsts = '2';
  437. this.visionchonly = true;
  438. } else if (res.data.taskList[res.data.taskList.length - 1].taskName == '填报信息') {
  439. this.vision = '填报信息';
  440. }
  441. this.datalist.attList = JSON.parse(res.data.params.attList);
  442. this.attList = [];
  443. this.fileInfo.fileList = [];
  444. this.datalist.attList.forEach(item => {
  445. item.id = item.attchFileId;
  446. this.fileInfo.fileList.push({
  447. name: item.fileName,
  448. url: '',
  449. id: item.id,
  450. attchFileId: item.attchFileId,
  451. fileName: item.fileName
  452. });
  453. this.attList.push({
  454. name: item.fileName,
  455. url: '',
  456. id: item.id,
  457. attchFileId: item.attchFileId,
  458. fileName: item.fileName
  459. });
  460. })
  461. this.rovaList = res.data.taskList;
  462. this.uploadstatus = true;
  463. });
  464. },
  465. //审批
  466. dialogCli(v) {
  467. this.dialogStatus = false;
  468. if (v === 3) {
  469. this.infolist = {};
  470. this.attList = [];
  471. this.fileInfo.fileList = [];
  472. this.checkexa = false;
  473. return
  474. }
  475. let _this = this;
  476. this.infolist.opTime = _this.$formatDate(new Date(), "YYYY-MM-DD")
  477. if (v === 1) {
  478. let params = {
  479. dealType: '1',
  480. dealTypeDesc: '打回',
  481. procId: this.infolist.procId,
  482. procVersion: this.infolist.procVersion,
  483. remark: this.remark,
  484. stepId: this.infolist.stepId,
  485. taskId: this.infolist.taskId,
  486. taskName: this.infolist.taskName,
  487. opName: this.infolist.opName,
  488. opNo: this.opno,
  489. opTime: this.infolist.opTime,
  490. params: {
  491. procExeCondiVal: '不同意',
  492. terminalRes: JSON.stringify(this.infolist),
  493. factoryList: JSON.stringify(this.infodatas),
  494. assigneeNo: this.opno,
  495. assigneeName: this.opname,
  496. },
  497. woNo: this.infolist.woNo,
  498. }
  499. this.submitInfo("/bpm/api/submitTask", params);
  500. } else if (v === 2) {
  501. let param = {
  502. dealType: '0',
  503. dealTypeDesc: '提交',
  504. procId: this.infolist.procId,
  505. procVersion: this.infolist.procVersion,
  506. remark: this.remark,
  507. stepId: this.infolist.stepId,
  508. taskId: this.infolist.taskId,
  509. taskName: this.infolist.taskName,
  510. opName: this.infolist.opName,
  511. opNo: this.opno,
  512. opTime: this.infolist.opTime,
  513. params: {
  514. woType: this.infolist.woType,
  515. terminalRes: JSON.stringify(this.infolist),
  516. factoryList: JSON.stringify(this.infodatas)
  517. },
  518. woNo: this.infolist.woNo,
  519. }
  520. // if(this.vision == '审批'&&this.visionsts == '2'){
  521. // param.params.assigneeNo=this.opno;
  522. // param.params.assigneeName=this.opname;
  523. // }
  524. param.params.assigneeNo = this.treeListonly.leaderAuditNo;
  525. param.params.assigneeName = this.treeListonly.leaderAuditName;
  526. if (this.vision == '流程发起') {
  527. let attList = [];
  528. for (let i = 0; i < this.attList.length; i++) {
  529. attList.push({
  530. id: this.attList[i].id,
  531. fileCode: this.attList[i].fileCode,
  532. fileName: this.attList[i].fileName,
  533. opName: this.attList[i].opName,
  534. opNo: this.attList[i].opNo,
  535. opTime: this.attList[i].opTime,
  536. woNo: this.infolist.woNo,
  537. attchFileId: this.attList[i].attchFileId,
  538. });
  539. }
  540. param.params.attList = JSON.stringify(attList)
  541. this.$http({
  542. url: "/market/bpmTemp/del",
  543. method: "post",
  544. headers: {
  545. "Content-Type": "application/json",
  546. },
  547. data: {
  548. bpmType: "5",
  549. },
  550. }).then((res) => {
  551. //console.log(res)
  552. });
  553. }
  554. this.submitInfo("/bpm/api/submitTask", param);
  555. }
  556. },
  557. //添加
  558. dialogCliadd(v) {
  559. let _this = this;
  560. let info = {};
  561. info.opTime = _this.$formatDate(new Date(), "YYYY-MM-DD");
  562. info.opNo = this.userInfo.loginNo;
  563. info.opName = this.userInfo.loginName;
  564. info.woTitle = this.infolist.woName;
  565. info.params = {};
  566. info.params.terminalRes = this.infolist;
  567. let infodatas = [];
  568. for (let i = 0; i < this.infodatas.length; i++) {
  569. if (this.infodatas[i].factoryName || this.infodatas[i].assessTime || this.infodatas[i].assessScore || this.infodatas[i].followAction) {
  570. this.infodatas[i].assessTime = this.infodatas[i].assessTime?this.$formatDate(this.infodatas[i].assessTime, "YYYY-MM-DD"):'';
  571. infodatas.push(this.infodatas[i])
  572. }
  573. }
  574. info.params.factoryList = infodatas;
  575. info.procId = this.terminal;
  576. for (let i = 0; i < this.options.length; i++) {
  577. if (this.terminal == this.options[i].procId) {
  578. info.procName = this.options[i].procName;
  579. info.procVersion = this.options[i].procVersion;
  580. }
  581. }
  582. let attList = [];
  583. for (let i = 0; i < this.attList.length; i++) {
  584. attList.push({
  585. id: this.attList[i].id,
  586. fileCode: this.attList[i].fileCode,
  587. fileName: this.attList[i].fileName,
  588. opName: this.attList[i].opName,
  589. opNo: this.attList[i].opNo,
  590. opTime: this.attList[i].opTime,
  591. woNo: this.infolist.woNo,
  592. attchFileId: this.attList[i].attchFileId,
  593. });
  594. }
  595. info.params.assigneeNo = this.treeListonly.leaderAuditNo;
  596. info.params.assigneeName = this.treeListonly.leaderAuditName;
  597. info.params.attList = JSON.stringify(attList)
  598. info.params.terminalRes = JSON.stringify(info.params.terminalRes);
  599. info.params.factoryList = JSON.stringify(info.params.factoryList);
  600. this.submitInfo("/bpm/api/startProc", info);
  601. },
  602. submitInfo(u, v) {
  603. let _this = this;
  604. this.$refs.infolist.validate(valid => {
  605. if (valid) {
  606. this.$http({
  607. url: u,
  608. method: "post",
  609. headers: {
  610. "Content-Type": "application/json",
  611. },
  612. data: v,
  613. }).then((res) => {
  614. if (res.data.result === 1) {
  615. _this.$message({
  616. message: res.data.desc,
  617. type: 'error'
  618. });
  619. } else {
  620. _this.$message({
  621. message: '成功',
  622. type: 'success'
  623. });
  624. _this.closedia();
  625. _this.infolist = {};
  626. _this.attList = [];
  627. _this.fileInfo.fileList = [];
  628. _this.checkexa = false;
  629. _this.getList(this.params, this.pageSize);
  630. }
  631. });
  632. }
  633. })
  634. },
  635. getStanding() {
  636. this.$router.push({
  637. path: '/yStanding',
  638. });
  639. this.setabList('运营流程台账', '/yStanding');
  640. },
  641. setabList(n, p) {
  642. let params = {
  643. children: "",
  644. name: n,
  645. rountPath: p,
  646. target: "_self",
  647. };
  648. for (let i = 0; i < this.$store.state.tabList.length; i++) {
  649. if (this.$store.state.tabList[i].name === params.name) {
  650. this.$store.state.tabList[i] = params;
  651. }
  652. }
  653. let set = new Set([...this.$store.state.tabList, params]);
  654. set.add(params);
  655. this.$store.commit("setDefaultActive", params.rountPath);
  656. this.$store.commit("setTabList", Array.from(set));
  657. },
  658. //流程
  659. getTermianl() {
  660. this.$http({
  661. url: "/bpm/api/queryBpmProcList",
  662. method: "post",
  663. headers: {
  664. "Content-Type": "application/json",
  665. "page": '{"pageNo":"' + 1 + '","pageSize":"100"}'
  666. },
  667. data: {},
  668. }).then((res) => {
  669. this.options = res.data.data;
  670. });
  671. },
  672. closeMessage(v) {
  673. this.centerDialogVisible = false;
  674. let _this = this;
  675. if (v === 1) {
  676. _this.$http({
  677. url: "/bpm/api/deleteBpmPrePlugin",
  678. method: "post",
  679. headers: {
  680. "Content-Type": "application/json",
  681. },
  682. data: {
  683. id: this.delid
  684. },
  685. }).then((res) => {
  686. if (res.data.result === 1) {
  687. _this.$message({
  688. message: res.data.desc,
  689. type: 'error'
  690. });
  691. } else {
  692. _this.$message({
  693. message: '删除成功',
  694. type: 'success'
  695. });
  696. _this.getList(this.params, this.pageSize);
  697. }
  698. });
  699. }
  700. },
  701. //删除
  702. delLine(v) {
  703. this.centerDialogVisible = true;
  704. this.messTit = '即将删除此条数据, 是否删除?';
  705. this.delid = v.id;
  706. },
  707. //文件返回值
  708. uploadBack(v) {
  709. this.attList = v;
  710. },
  711. //功能栏
  712. iconCli(v) {
  713. if (v === 1) {
  714. this.getList(this.params, this.pageSize);
  715. }
  716. if (v === 2) {
  717. this.fullscreen = !this.fullscreen
  718. }
  719. },
  720. getUser() {
  721. this.userInfo = JSON.parse(window.sessionStorage.userInfo);
  722. }
  723. },
  724. mounted() {
  725. this.getList({}, 1);
  726. this.getUser();
  727. this.getTermianl();
  728. },
  729. created() {
  730. }
  731. }
  732. </script>
  733. <style scoped lang="scss">
  734. .onetab {
  735. margin-bottom: 20px;
  736. padding: 0 20px;
  737. }
  738. .titbox {
  739. div {
  740. float: right;
  741. i {
  742. font-size: 22px;
  743. margin-left: 20px;
  744. cursor: pointer;
  745. }
  746. }
  747. }
  748. .tabbox {
  749. margin-top: 15px;
  750. }
  751. .pageBox {
  752. text-align: right;
  753. margin-top: 10px;
  754. }
  755. .info-line {
  756. width: 100%;
  757. display: block;
  758. padding-left: 20px;
  759. div {
  760. width: 50%;
  761. display: inline-block;
  762. }
  763. span {
  764. width: 100px;
  765. display: inline-block;
  766. text-align: left;
  767. i {
  768. color: red;
  769. display: inline-block;
  770. padding-right: 5px;
  771. }
  772. }
  773. .el-select,
  774. .el-input {
  775. width: calc(100% - 120px);
  776. }
  777. }
  778. .online {
  779. width: 100%;
  780. .el-select {
  781. width: calc(100% - 100px);
  782. }
  783. span {
  784. vertical-align: top;
  785. }
  786. .el-textarea {
  787. width: calc(100% - 120px);
  788. }
  789. .tree {
  790. width: calc(50% - 60px);
  791. display: inline-block;
  792. margin-right: 20px;
  793. height: 300px;
  794. overflow-y: scroll;
  795. .el-icon-error {
  796. float: right;
  797. font-size: 20px;
  798. margin-top: 9px;
  799. cursor: pointer;
  800. }
  801. }
  802. .treeUser {
  803. margin: 0;
  804. border: 1px solid #ddd;
  805. p {
  806. background: #f4f4f4;
  807. padding: 0 20px;
  808. margin-bottom: 5px;
  809. }
  810. }
  811. .treeUserb {
  812. width: calc(100% - 100px);
  813. border: 1px solid #ddd;
  814. background: #f4f4f4;
  815. border-radius: 3px;
  816. height: auto;
  817. overflow: hidden;
  818. p {
  819. display: inline-block;
  820. padding: 0 20px;
  821. margin-bottom: 5px;
  822. }
  823. }
  824. }
  825. .adv-type {
  826. margin-top: 20px;
  827. display: flex;
  828. justify-content: space-between;
  829. flex-wrap: wrap;
  830. // border: 1px solid #ddd;
  831. border-radius: 5px;
  832. padding: 20px;
  833. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
  834. div {
  835. width: 33%;
  836. text-align: center;
  837. height: 80px;
  838. overflow: hidden;
  839. min-width: 100px;
  840. cursor: pointer;
  841. padding-top: 10px;
  842. margin: 10px 0;
  843. }
  844. div:hover {
  845. background: #CFE8FC;
  846. border-radius: 5px;
  847. }
  848. span {
  849. width: 100%;
  850. display: inline-block;
  851. height: 40px;
  852. // line-height: 40px;
  853. i {
  854. color: #0074D9;
  855. font-size: 36px;
  856. }
  857. }
  858. }
  859. </style>