advchecks.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650
  1. <template>
  2. <fullscreen :fullscreen.sync="fullscreen" class="container">
  3. <div class="container-box">
  4. <toolList @iconCli="iconCli" :tooltit="tooltit"></toolList>
  5. <div class="search">
  6. <el-select v-model="advstatus" @change="advchange">
  7. <el-option v-for="items in advopt" :key="items.id" :label="items.name" :value="items.id">
  8. </el-option>
  9. </el-select>
  10. </div>
  11. <div class="tabbox">
  12. <el-table height="calc(100% - 40px)" class="com-table" ref="multipleTable" :data="tableData"
  13. tooltip-effect="dark" size="small" border style="width: 100%" v-loading="loading">
  14. <el-table-column prop="process_id" label="工单编号">
  15. </el-table-column>
  16. <el-table-column prop="need_name" label="工单标题"> </el-table-column>
  17. <el-table-column prop="createId" label="发起人"> </el-table-column>
  18. <el-table-column prop="proposer" label="发起人姓名">
  19. </el-table-column>
  20. <el-table-column prop="proposer_time" label="发起时间">
  21. </el-table-column>
  22. <el-table-column prop="taskName" label="状态"> </el-table-column>
  23. <el-table-column label="操作" width="120px" align="center">
  24. <template slot-scope="scope">
  25. <el-button size="mini" type="primary" @click="dialogCheck(scope.row, 1)">查看</el-button>
  26. <!--<el-button size="mini" type="danger" v-if="scope.row.sts==3"-->
  27. <el-button size="mini" v-if="scope.row.status === '1'" type="danger" @click="dialogCheck(scope.row, 2)">审核
  28. </el-button>
  29. <!-- <el-button
  30. v-if="
  31. userInfo.loginName == scope.row.opName && scope.row.sts == '3'
  32. "
  33. size="mini"
  34. type="primary"
  35. @click="advSure(scope.row)"
  36. >归档
  37. </el-button> -->
  38. </template>
  39. </el-table-column>
  40. </el-table>
  41. <el-pagination class="pageBox" @current-change="currchange" layout="prev, pager, next" background
  42. :total="total">
  43. </el-pagination>
  44. </div>
  45. <el-dialog title="广告管理" v-if="dialogStatus" :visible.sync="dialogStatus" width="80%" :destroy-on-close="true"
  46. :modal-append-to-body="false" :close-on-click-modal="false">
  47. <div>
  48. <advert
  49. v-if="typestatsu === 2"
  50. @closeEdio="closeEdio"
  51. :draftStatus="draftStatus"
  52. :componentInfo="componentInfo"
  53. :componentStatus="componentStatus"
  54. :changeinfo="changeinfo"
  55. ></advert>
  56. </div>
  57. </el-dialog>
  58. <el-dialog title="定稿素材" :visible.sync="dialogStatusc" width="50%" :destroy-on-close="true"
  59. :modal-append-to-body="false" :close-on-click-modal="false">
  60. <!-- <el-form>
  61. <el-form-item class="info-line online">
  62. <span>素材类型</span>
  63. <el-select :popper-append-to-body="false" v-model="advtype" placeholder="素材类型">
  64. <el-option v-for="item in typeList" :key="item.dataCode" :label="item.dataName"
  65. :value="item.dataCode">
  66. </el-option>
  67. </el-select>
  68. </el-form-item>
  69. </el-form> -->
  70. <div slot="footer" class="dialog-footer">
  71. <el-button @click="dialogCli(1)" type="primary">确 定</el-button>
  72. <el-button @click="dialogCli(2)">取 消</el-button>
  73. </div>
  74. </el-dialog>
  75. </div>
  76. </fullscreen>
  77. </template>
  78. <script>
  79. import {
  80. getTodoBase,
  81. getDoneBase,
  82. getInitiateBase,
  83. } from "../../../http/api.js";
  84. import mySearch from "../../../components/search.vue";
  85. import toolList from "../../../components/toolList.vue";
  86. import advert from "./components/adverts.vue";
  87. export default {
  88. components: {
  89. mySearch,
  90. toolList,
  91. advert,
  92. },
  93. data() {
  94. return {
  95. draftStatus:true,
  96. clickStatus:"",
  97. tooltit: "广告管理",
  98. auditStatus: false,
  99. fullscreen: false,
  100. total: 0,
  101. pageSize: 1,
  102. tableData: [{}],
  103. dialogStatus: false,
  104. disableStatus: false,
  105. infolist: {},
  106. userInfo: {},
  107. params: {},
  108. typestatsu: 1,
  109. options: [],
  110. typeopt: [],
  111. componentInfo: {},
  112. componentStatus: false,
  113. dialogStatusc: false,
  114. loading: false,
  115. changeinfo: false,
  116. saveStatus: false,
  117. advstatus: "",
  118. advopt: [
  119. {
  120. id: "0",
  121. name: "待审批",
  122. },
  123. {
  124. id: "1",
  125. name: "已审批",
  126. },
  127. {
  128. id: "2",
  129. name: "我发起的",
  130. },
  131. {
  132. id: "3",
  133. name: "定稿 ",
  134. },
  135. ],
  136. btnctrlStatus: false,
  137. typeList: [],
  138. advtype: "",
  139. dgid: "",
  140. singleTable: {},
  141. shParam: {},
  142. // isBtnShow: false,
  143. isGDClick: false,
  144. tableName: "ggsj_process",
  145. };
  146. },
  147. methods: {
  148. //我的待办
  149. getQueryList() {
  150. let list = {
  151. tableName: this.tableName,
  152. };
  153. getTodoBase(this.pageSize, "", list).then((res) => {
  154. this.tableData = res.data.data;
  155. this.tableData.map((item) => {
  156. item.status = "1";
  157. });
  158. this.total = res.data.totalRecord;
  159. this.loading = false;
  160. });
  161. // console.log(this.$utilflow);
  162. // let res = this.$utilflow.getQueryList()
  163. // console.log(res);
  164. // this.$http({
  165. // url: "/market/waf/queryTodoBase",
  166. // method: "post",
  167. // headers: {
  168. // "Content-Type": "application/json",
  169. // page: '{"pageNo":"' + this.pageSize + '","pageSize":"10"}',
  170. // },
  171. // data: { tableName: this.tableName },
  172. // }).then((res) => {
  173. // // console.log(res);
  174. // this.tableData = res.data.data;
  175. // // let data = res.data.list;
  176. // this.tableData.map((item) => {
  177. // // status === 1 需要审核
  178. // item.status = "1";
  179. // });
  180. // console.log(this.tableData);
  181. // this.total = res.data.totalRecord;
  182. // this.loading = false;
  183. // // this.isGDClick = false;
  184. // // if(this.advstatus==0){
  185. // // data.forEach(item => {
  186. // // item.isBtnShow = false;
  187. // // this.getSts(item)
  188. // // });
  189. // // }
  190. // // this.tableData = data;
  191. // });
  192. },
  193. //我的已办
  194. getQueryDone() {
  195. let list = {
  196. tableName: this.tableName,
  197. };
  198. getDoneBase(this.pageSize, "", list).then((res) => {
  199. this.tableData = res.data.data;
  200. this.tableData.map((item) => {
  201. item.status = "2";
  202. });
  203. this.total = res.data.totalRecord;
  204. this.loading = false;
  205. });
  206. // this.$http({
  207. // url: "/market/waf/queryDoneBase",
  208. // method: "post",
  209. // headers: {
  210. // "Content-Type": "application/json",
  211. // page: '{"pageNo":"' + this.pageSize + '","pageSize":"10"}',
  212. // },
  213. // data: { tableName: this.tableName },
  214. // }).then((res) => {
  215. // console.log(res);
  216. // this.tableData = res.data.data;
  217. // // let data = res.data.list;
  218. // this.tableData.map((item) => {
  219. // // status === 2 不需要审核
  220. // item.status = "2";
  221. // });
  222. // this.total = res.data.totalRecord;
  223. // this.loading = false;
  224. // // this.isGDClick = false;
  225. // // if(this.advstatus==0){
  226. // // data.forEach(item => {
  227. // // item.isBtnShow = false;
  228. // // this.getSts(item)
  229. // // });
  230. // // }
  231. // // this.tableData = data;
  232. // });
  233. },
  234. //我发起的
  235. getMeLaunch() {
  236. let list = {
  237. tableName: this.tableName,
  238. };
  239. getInitiateBase(this.pageSize, "", list).then((res) => {
  240. this.tableData = res.data.data;
  241. this.tableData.map((item) => {
  242. if (item.taskName === "起草") {
  243. item.status = "1";
  244. } else {
  245. item.status = "2";
  246. }
  247. });
  248. this.total = res.data.totalRecord;
  249. this.loading = false;
  250. });
  251. // this.$http({
  252. // url: "/market/waf/queryInitiateBase",
  253. // method: "post",
  254. // headers: {
  255. // "Content-Type": "application/json",
  256. // page: '{"pageNo":"' + this.pageSize + '","pageSize":"10"}',
  257. // },
  258. // data: { tableName: this.tableName },
  259. // }).then((res) => {
  260. // // let size = this.isNaNStatus(res.data);
  261. // this.tableData = res.data.data;
  262. // this.tableData.map((item) => {
  263. // if (item.taskName === "起草") {
  264. // item.status = "1";
  265. // } else {
  266. // item.status = "2";
  267. // }
  268. // });
  269. // // let data = res.data.list;
  270. // this.total = res.data.totalRecord;
  271. // this.loading = false;
  272. // });
  273. },
  274. //定稿
  275. getFinalized() {
  276. this.$http({
  277. url: "/market/ggsj/queryDone",
  278. method: "post",
  279. headers: {
  280. "Content-Type": "application/json",
  281. page: '{"pageNo":"' + this.pageSize + '","pageSize":"10"}',
  282. },
  283. data: {},
  284. }).then((res) => {
  285. console.log(res);
  286. // let size = this.isNaNStatus(res.data);
  287. this.tableData = res.data.data;
  288. this.tableData.map((item) => {
  289. item.status = "2";
  290. });
  291. // let data = res.data.list;
  292. this.total = res.data.totalRecord;
  293. this.loading = false;
  294. });
  295. },
  296. //获取列表
  297. getList(e) {
  298. console.log(e);
  299. switch (e) {
  300. //我的待办
  301. case "0":
  302. this.auditStatus = true;
  303. this.getQueryList();
  304. break;
  305. //我的已办
  306. case "1":
  307. this.getQueryDone();
  308. break;
  309. //我发起的
  310. case "2":
  311. this.getMeLaunch();
  312. break;
  313. //定稿
  314. case "3":
  315. this.getFinalized();
  316. break;
  317. }
  318. // this.pageSize = n;
  319. // let _this = this;
  320. // this.tableData = [];
  321. // this.loading = true;
  322. // let param = {
  323. // tableName: "ggsj_process",
  324. // };
  325. // this.$http({
  326. // url: "/market/waf/queryTodoBase",
  327. // method: "post",
  328. // headers: {
  329. // "Content-Type": "application/json",
  330. // page: '{"pageNo":"' + n + '","pageSize":"10"}',
  331. // },
  332. // data: param,
  333. // }).then((res) => {
  334. // console.log(res);
  335. // this.tableData = res.data.data;
  336. // // let data = res.data.list;
  337. // this.total = res.data.totalRecord;
  338. // this.loading = false;
  339. // // this.isGDClick = false;
  340. // // if(this.advstatus==0){
  341. // // data.forEach(item => {
  342. // // item.isBtnShow = false;
  343. // // this.getSts(item)
  344. // // });
  345. // // }
  346. // // this.tableData = data;
  347. // });
  348. // this.$http({
  349. // url: "/market/waf/queryDoneBase",
  350. // method: "post",
  351. // headers: {
  352. // "Content-Type": "application/json",
  353. // page: '{"pageNo":"' + n + '","pageSize":"10"}',
  354. // },
  355. // data: param,
  356. // }).then((res) => {
  357. // // console.log(res);
  358. // // this.tableData = res.data.data;
  359. // // // let data = res.data.list;
  360. // // this.total = res.data.totalRecord;
  361. // // this.loading = false;
  362. // // this.isGDClick = false;
  363. // // if(this.advstatus==0){
  364. // // data.forEach(item => {
  365. // // item.isBtnShow = false;
  366. // // this.getSts(item)
  367. // // });
  368. // // }
  369. // // this.tableData = data;
  370. // });
  371. },
  372. async getSts(v) {
  373. await this.$http({
  374. url: "/bpm/api/taskInit",
  375. method: "post",
  376. headers: {
  377. "Content-Type": "application/json",
  378. },
  379. data: {
  380. taskId: v.taskId,
  381. woNo: v.id,
  382. },
  383. }).then((res) => {
  384. this.shParam = res.data;
  385. // this.dialogCli(1);
  386. // callback&&callback()
  387. if (this.isGDClick) {
  388. this.dialogCli(1);
  389. return;
  390. }
  391. if (res.data.taskName == "需求部门") {
  392. v.sts = "3";
  393. return;
  394. }
  395. if (res.data.assigneeNo == this.userInfo.loginNo) {
  396. v.sts = "0";
  397. v.isBtnShow = true;
  398. return;
  399. }
  400. });
  401. },
  402. // 分页
  403. currchange(v) {
  404. console.log(123);
  405. console.log(v);
  406. this.pageSize = v;
  407. console.log(this.clickStatus);
  408. this.getList(this.clickStatus);
  409. },
  410. advchange(e) {
  411. this.total = 0
  412. this.pageSize = 1
  413. this.clickStatus = e
  414. this.getList(this.clickStatus);
  415. },
  416. //处理申请
  417. dialogCheck(n, v) {
  418. if (v == 1) {
  419. this.changeinfo = false;
  420. this.saveStatus = false
  421. } else {
  422. if(n.taskName == "科室经理审批"){
  423. this.draftStatus = false;
  424. }
  425. this.changeinfo = true;
  426. }
  427. this.typestatsu = 2;
  428. this.dialogStatus = true;
  429. let params = {
  430. woNo: n.id,
  431. taskId: n.taskId,
  432. };
  433. this.componentInfo = n;
  434. this.componentStatus = true;
  435. },
  436. // 归档
  437. advSure(v) {
  438. let _this = this;
  439. // this.dialogStatusc = true;
  440. this.isGDClick = true;
  441. this.dgid = v.id;
  442. this.getSts(v);
  443. },
  444. dialogCli(v) {
  445. let _this = this;
  446. if (v == 1) {
  447. // let advTypeName = '';
  448. // for (let i = 0; i < this.typeList.length; i++) {
  449. // if (this.typeList[i].dataCode == this.advtype) {
  450. // advTypeName = this.typeList[i].dataName;
  451. // }
  452. // }
  453. // let param = {
  454. // woNo: this.dgid,
  455. // advTypeName: advTypeName,
  456. // advType: this.advtype
  457. // }
  458. let gdParam = {
  459. woNo: this.dgid,
  460. // advTypeName: advTypeName,
  461. // advType: this.advtype
  462. };
  463. this.shParam.params.terminalRes = JSON.stringify(
  464. Object.assign(JSON.parse(this.shParam.params.terminalRes), gdParam)
  465. );
  466. let param = this.shParam;
  467. this.$http({
  468. // url: "/market/cadv/mkConfirmAdv",
  469. url: "/bpm/api/submitTask",
  470. method: "post",
  471. headers: {
  472. "Content-Type": "application/json",
  473. },
  474. data: param,
  475. }).then((res) => {
  476. if (res.data.result === 1) {
  477. _this.$message({
  478. message: res.data.desc,
  479. type: "error",
  480. });
  481. } else {
  482. _this.$message({
  483. message: "成功",
  484. type: "success",
  485. });
  486. _this.getList(_this.params, _this.pageSize);
  487. }
  488. });
  489. }
  490. // this.dialogStatusc = false;
  491. // this.advtype = '';
  492. return;
  493. },
  494. closeEdio() {
  495. this.getList(this.params, this.pageSize);
  496. this.typestatsu = 1;
  497. this.dialogStatus = false;
  498. this.draftStatus = true;
  499. this.componentStatus = false;
  500. },
  501. gettype() {
  502. this.$http({
  503. url: "/sysmgr/cfgDataDicts/queryMap",
  504. method: "post",
  505. headers: {
  506. "Content-Type": "application/json",
  507. },
  508. data: {
  509. dictCodePks: "materType",
  510. },
  511. }).then((res) => {
  512. this.typeList = res.data.body.materType;
  513. });
  514. },
  515. //功能栏
  516. iconCli(v) {
  517. if (v === 1) {
  518. this.getList(this.params, this.pageSize);
  519. }
  520. if (v === 2) {
  521. this.fullscreen = !this.fullscreen;
  522. }
  523. },
  524. ctrlbtn() {
  525. let v = JSON.parse(window.sessionStorage.childrenMenus);
  526. for (let i = 0; i < v.length; i++) {
  527. if (v[i].jspUrl == this.$route.path && v[i].systemflag == "1") {
  528. this.btnctrlStatus = true;
  529. return;
  530. }
  531. }
  532. },
  533. },
  534. mounted() {
  535. this.userInfo = JSON.parse(window.sessionStorage.userInfo);
  536. this.advstatus = String(this.$route.query.type);
  537. this.clickStatus = this.$route.query.type;
  538. this.getList(this.advstatus);
  539. this.ctrlbtn();
  540. this.gettype();
  541. },
  542. created() { },
  543. };
  544. </script>
  545. <style scoped lang="scss">
  546. .approval {
  547. .roval-box {
  548. padding: 0 20px;
  549. margin-top: 20px;
  550. margin-bottom: 10px;
  551. .el-input {
  552. width: calc(100% - 200px);
  553. display: inline-block;
  554. }
  555. span {
  556. display: inline-block;
  557. width: 80px;
  558. font-size: 14px;
  559. margin-right: 20px;
  560. .el-input {
  561. width: 100%;
  562. display: inline-block;
  563. }
  564. }
  565. }
  566. }
  567. .onetab {
  568. margin-bottom: 20px;
  569. padding: 0 20px;
  570. }
  571. .titbox {
  572. div {
  573. float: right;
  574. i {
  575. font-size: 22px;
  576. margin-left: 20px;
  577. cursor: pointer;
  578. }
  579. }
  580. }
  581. .tabbox {
  582. margin-top: 15px;
  583. }
  584. .pageBox {
  585. text-align: right;
  586. margin-top: 10px;
  587. }
  588. .info-line {
  589. width: 100%;
  590. display: block;
  591. padding-left: 20px;
  592. div {
  593. width: 50%;
  594. display: inline-block;
  595. }
  596. span {
  597. width: 80px;
  598. display: inline-block;
  599. text-align: left;
  600. i {
  601. color: red;
  602. display: inline-block;
  603. padding-right: 5px;
  604. }
  605. }
  606. .el-select,
  607. .el-input {
  608. width: calc(100% - 100px);
  609. }
  610. }
  611. .online {
  612. width: 100%;
  613. .el-select {
  614. width: calc(100% - 100px);
  615. }
  616. span {
  617. vertical-align: top;
  618. }
  619. .el-textarea {
  620. width: calc(100% - 100px);
  621. }
  622. }
  623. </style>