sjkdbList.vue 60 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566
  1. <template>
  2. <div class="flex-box">
  3. <div :span="24" class="flex-header">
  4. <Tabs :tabList="tabListMain" @status="clickTabMains">
  5. </Tabs>
  6. <el-button v-if="clickTagName == 'first'" type="primary" @click="clickNewTag()">+新建</el-button>
  7. </div>
  8. <div class="flex-count">
  9. <Table v-loading="loading" @clickDemand="clickDemand" :list="lableTable" ref="TableList" @changeNum="changeNum"
  10. @changeSize="changeSize">
  11. </Table>
  12. </div>
  13. <el-dialog :title="dialogTitle" :visible.sync="dialogStatus" width="100%" :before-close="handleClose" :modal="false"
  14. v-if="dialogStatus" :destroy-on-close="true">
  15. <!-- 后期维护 -->
  16. <div style="">
  17. <el-button type="primary" v-if="saveStatus" @click="clickSave">保存</el-button>
  18. <el-button type="primary" v-if="startStatus" @click="clickHandles">处理</el-button>
  19. <el-button type="primary" v-if="closeStatus" @click="handleClose">关闭</el-button>
  20. </div>
  21. <el-form ref="form" :model="fromList" :rules="rule" label-width="140px" style="margin-top: 30px">
  22. <div style="text-align: center; font-size: 24px;">数据库导表流程</div>
  23. <div class="flex-header">
  24. <el-form-item label="工单流水号:">
  25. <el-input v-model="fromList.needNo" disabled></el-input>
  26. </el-form-item>
  27. <el-form-item label="标题:" prop="needName">
  28. <el-input v-model="fromList.needName" :disabled="disabled"></el-input>
  29. </el-form-item>
  30. </div>
  31. <div class="flex-header">
  32. <el-form-item label="发起人:">
  33. <el-input v-model="fromList.proposer" disabled></el-input>
  34. </el-form-item>
  35. <el-form-item label="发起时间:">
  36. <el-input v-model="fromList.proposerTime" disabled></el-input>
  37. </el-form-item>
  38. </div>
  39. <div class="flex-header" style="margin: 1%;border-bottom: 1px solid #e1e1e1;">
  40. <el-form-item label="源数据库:" prop="sourceDatabase">
  41. <el-input type="textarea" v-model="fromList.sourceDatabase" maxlength="500" show-word-limit
  42. :disabled="disabled"></el-input>
  43. </el-form-item>
  44. <el-form-item label="目标数据库:" prop="targetDatabase">
  45. <el-input type="textarea" v-model="fromList.targetDatabase" maxlength="500" show-word-limit
  46. :disabled="disabled"></el-input>
  47. </el-form-item>
  48. </div>
  49. <div class="" style="margin: 1%;border-bottom: 1px solid #e1e1e1;">
  50. <el-form-item label="数据迁移用途:" prop="useDataMigration">
  51. <el-input type="textarea" v-model="fromList.useDataMigration" maxlength="500" show-word-limit
  52. :disabled="disabled"></el-input>
  53. </el-form-item>
  54. </div>
  55. <div class="flex-header">
  56. <el-form-item label="导入方式:" prop="importMode">
  57. <el-select v-model="fromList.importMode" placeholder="请选择导入方式" size="medium" :disabled="disabled">
  58. <el-option v-for="item in importModeoptions" :key="item.code" :label="item.name"
  59. :value="item.code" />
  60. </el-select>
  61. </el-form-item>
  62. <el-form-item label="是否涉及敏感数据:" prop="isSensitive">
  63. <el-select v-model="fromList.isSensitive" placeholder="请选择是否涉及敏感数据" size="medium"
  64. :disabled="disabled">
  65. <el-option v-for="item in isSensitiveoption" :key="item.code" :label="item.name"
  66. :value="item.code" />
  67. </el-select>
  68. </el-form-item>
  69. </div>
  70. <div class="flex-header" v-if="fromList.importMode == '属主'">
  71. <el-form-item label="属主:">
  72. <el-button type="primary" style="float:left"
  73. v-if="fromList.taskName == '发起人填写' || dialogTitle == '新建工单'"
  74. @click="clickNewSjkdbOwner()">+新建</el-button>
  75. <el-button type="danger" style="float:left"
  76. v-if="fromList.taskName == '发起人填写' || dialogTitle == '新建工单'"
  77. @click="delSjkdbOwner()">删除</el-button>
  78. <el-table height="400px" class="com-table" ref="multipleTable" :data="SjkdbProcessOwners"
  79. @row-click="getRowDataSjkdbOwner" tooltip-effect="dark" size="small" border style="width: 100%"
  80. v-loading="loadingSjkdbOwner" @selection-change="handleSelectionChangeSjkdbOwner">
  81. <el-table-column type="selection" width="55">
  82. </el-table-column>
  83. <el-table-column prop="index" label="序号" width="50" align="center"></el-table-column>
  84. <el-table-column prop="owner" label="属主" align="center">
  85. </el-table-column>
  86. <el-table-column prop="targetDatabaseOwner" label="目标库属主" align="center">
  87. </el-table-column>
  88. </el-table>
  89. <el-pagination class="pageBox" @current-change="currchangeSjkdbOwner"
  90. layout="prev, pager, next, jumper" background :total="totalSjkdbOwner">
  91. </el-pagination>
  92. </el-form-item>
  93. </div>
  94. <div class="flex-header" v-if="fromList.importMode == '属主+表名'">
  95. <el-form-item label="属主+表名:">
  96. <el-button type="primary" style="float:left"
  97. v-if="fromList.taskName == '发起人填写' || dialogTitle == '新建工单'"
  98. @click="clickNewSjkdbTableName()">+新建</el-button>
  99. <el-button type="danger" style="float:left"
  100. v-if="fromList.taskName == '发起人填写' || dialogTitle == '新建工单'"
  101. @click="delSjkdbTableName()">删除</el-button>
  102. <el-table height="400px" class="com-table" ref="multipleTable" :data="SjkdbProcessOwnerTableNames"
  103. @row-click="getRowDataSjkdbTableName" tooltip-effect="dark" size="small" border
  104. style="width: 100%" v-loading="loadingSjkdbTableName"
  105. @selection-change="handleSelectionChangeSjkdbTableName">
  106. <el-table-column type="selection" width="55">
  107. </el-table-column>
  108. <el-table-column prop="index" label="序号" width="50" align="center"></el-table-column>
  109. <el-table-column prop="owner" label="属主" align="center">
  110. </el-table-column>
  111. <el-table-column prop="targetDatabaseOwner" label="目标库属主" align="center">
  112. </el-table-column>
  113. <el-table-column prop="databaseName" label="表名" align="center">
  114. </el-table-column>
  115. </el-table>
  116. <el-pagination class="pageBox" @current-change="currchangeSjkdbTableName"
  117. layout="prev, pager, next, jumper" background :total="totalSjkdbTableName">
  118. </el-pagination>
  119. </el-form-item>
  120. </div>
  121. <div class="flex-load" style="display: flex; flex-direction: column">
  122. <el-form-item label="上传附件:" :disabled="disabled" prop="accessoryList">
  123. <my-upload v-if="!disabled" @uploadBack="uploadBack" @delloadBack="delloadBack"
  124. @clickDownload="download" :fileInfo="fileInfo" :fileList="fromList.accessoryList"
  125. style="width: 30% !important"></my-upload>
  126. <div v-if="fromList.taskName != '发起人填写'">
  127. <div v-for="(item, index) in fromList.accessoryList" :key="index">
  128. <span style="color: blue;cursor: pointer;" @click="downloadOne(item)">{{
  129. item.fileName
  130. }}</span>
  131. </div>
  132. </div>
  133. </el-form-item>
  134. </div>
  135. </el-form>
  136. <div v-if="dialoglablesStatus">
  137. <div class="table-title">流程追踪</div>
  138. <TableId :list="lables"></TableId>
  139. </div>
  140. </el-dialog>
  141. <div v-if="destroy">
  142. <el-dialog title="处理操作" width="100%" :visible.sync="handleStatus" :before-close="handleCloses" :modal="false"
  143. v-if="handleStatus" :destroy-on-close="true">
  144. <Workflow :list="fromList" v-if="isWorkflowStatus == true" @updateForm="updateForm"
  145. :requestForm="requestForm" :request_formTitle="request_form.title"/>
  146. <WorkflowEntrance :list="fromList" v-else :lastManList="lastManList" @beforeClose="updateForm"
  147. :requestForm="requestForm" :request_formTitle="request_form.title"/>
  148. <!-- 后期维护 -->
  149. </el-dialog>
  150. </div>
  151. <el-dialog :title="SjkdbTableNameTitle" width="60%" :visible.sync="handleSjkdbTableNameStatus"
  152. :before-close="handleSjkdbTableNameCloses" :modal="false" :destroy-on-close="true" style="margin-top: 5%;">
  153. <div class="flex-box">
  154. <el-form :model="SjkdbProcessOwnerTableNamesForm" ref="addInfoList" label-width="210px">
  155. <div class="flex-header">
  156. <el-form-item label="属主:" prop="owner">
  157. <el-input v-model="SjkdbProcessOwnerTableNamesForm.owner" :disabled="disabled"></el-input>
  158. </el-form-item>
  159. </div>
  160. <div class="flex-header">
  161. <el-form-item label="目标库属主:" prop="targetDatabaseOwner">
  162. <el-input v-model="SjkdbProcessOwnerTableNamesForm.targetDatabaseOwner"
  163. :disabled="disabled"></el-input>
  164. </el-form-item>
  165. </div>
  166. <div class="flex-header">
  167. <el-form-item label="表名:" prop="databaseName">
  168. <el-input v-model="SjkdbProcessOwnerTableNamesForm.databaseName"
  169. :disabled="disabled"></el-input>
  170. </el-form-item>
  171. </div>
  172. </el-form>
  173. </div>
  174. <div slot="footer" class="dialog-footer myfooter">
  175. <el-button v-if="fromList.taskName == '发起人填写' || dialogTitle == '新建工单'"
  176. @click="processNewIssued(SjkdbTableNameTitle)" type="primary">确定</el-button>
  177. <el-button @click="() => {
  178. handleSjkdbTableNameStatus = false
  179. }" type="primary">关闭</el-button>
  180. </div>
  181. </el-dialog>
  182. <el-dialog :title="SjkdbOwnerTitle" width="60%" :visible.sync="handleSjkdbOwnerStatus"
  183. :before-close="handleSjkdbOwnerCloses" :modal="false" :destroy-on-close="true" style="margin-top: 5%;">
  184. <div class="flex-box">
  185. <el-form :model="SjkdbProcessOwnersForm" ref="addInfoList" label-width="210px">
  186. <div class="flex-header">
  187. <el-form-item label="属主:" prop="owner">
  188. <el-input v-model="SjkdbProcessOwnersForm.owner" :disabled="disabled"></el-input>
  189. </el-form-item>
  190. </div>
  191. <div class="flex-header">
  192. <el-form-item label="目标库属主:" prop="targetDatabaseOwner">
  193. <el-input v-model="SjkdbProcessOwnersForm.targetDatabaseOwner" :disabled="disabled"></el-input>
  194. </el-form-item>
  195. </div>
  196. </el-form>
  197. </div>
  198. <div slot="footer" class="dialog-footer myfooter">
  199. <el-button v-if="fromList.taskName == '发起人填写' || dialogTitle == '新建工单'"
  200. @click="processNewIssued(SjkdbOwnerTitle)" type="primary">确定</el-button>
  201. <el-button @click="() => {
  202. handleSjkdbOwnerStatus = false
  203. }" type="primary">关闭</el-button>
  204. </div>
  205. </el-dialog>
  206. </div>
  207. </template>
  208. <script>
  209. import Tabs from "../../../components/el-tabs";
  210. import Table from "../../../components/el-form";
  211. import TableId from "../../../components/el-formid";
  212. import Seach from "../../../components/el-search";
  213. import myUpload from "../../../components/workflowUpload";
  214. import Workflow from "../../../components/workflowBase";
  215. import WorkflowEntrance from "../../../components/workflowEntrance";
  216. import getConfig from '../../../config/dev.js'
  217. import {
  218. getTodoBase,
  219. getDoneBase,
  220. getInitiateBase,
  221. getNowdata,
  222. } from "../../../http/api.js";//../../../http/api.js
  223. import { log } from "console";
  224. export default {
  225. components: {
  226. Table,
  227. TableId,
  228. Tabs,
  229. myUpload,
  230. Workflow,
  231. Seach,
  232. WorkflowEntrance
  233. },
  234. data() {
  235. let _self = this
  236. return {
  237. loading: false,
  238. loadingSjkdbOwner: false,
  239. loadingSjkdbTableName: false,
  240. totalSjkdbTableName: 0,
  241. pageSizSjkdbTableName: 1,
  242. totalSjkdbOwner: 0,
  243. pageSizeSjkdbOwner: 1,
  244. SjkdbOwnerTitle: '',
  245. SjkdbTableNameTitle: '',
  246. paramsSjkdbOwner: {},
  247. paramsSjkdbTableName: {},
  248. isWorkflowStatus: true, //默认展示模式组件,为true时展示多人处理组件
  249. lastManList: [],
  250. SjkdbProcessOwners: [],//属主 Table
  251. SjkdbProcessOwnerTableNames: [],//申请属主+表名信息 Table
  252. SjkdbProcessOwnerTableNamesForm: {},
  253. SjkdbProcessOwnersForm: {},
  254. SjkdbOwnerdelId: [],
  255. SjkdbTableNamedelId: [],
  256. rule: {
  257. sourceDatabase: [
  258. { required: true, message: "请添加源数据库", trigger: "blur" },
  259. ],
  260. targetDatabase: [
  261. { required: true, message: "请添加目标数据库", trigger: "blur" },
  262. ],
  263. useDataMigration: [
  264. { required: true, message: "请添加数据迁移用途", trigger: "blur" },
  265. ],
  266. importMode: [
  267. { required: true, message: "请选择导入方式", trigger: "change" },
  268. ],
  269. isSensitive: [
  270. { required: true, message: "请选择是否涉及敏感数据", trigger: "change" },
  271. ],
  272. needName: [
  273. { required: true, message: "请添加标题", trigger: "blur" },
  274. ],
  275. },
  276. form: {}, //表单数据
  277. fromList: {}, //表单数据
  278. fileInfo: {
  279. type: "bt1n",
  280. typename: "上传文件",
  281. // limit: 5,
  282. url: "/market/waf/uploadByMinio",
  283. fileList: [],
  284. },
  285. list: {},
  286. importModeoptions: [
  287. {
  288. name: '属主',
  289. code: '属主'
  290. },
  291. {
  292. name: '属主+表名',
  293. code: '属主+表名'
  294. },
  295. ],
  296. isSensitiveoption: [
  297. {
  298. name: '是',
  299. code: '是'
  300. },
  301. {
  302. name: '否',
  303. code: '否'
  304. },
  305. ],
  306. disabled: false,
  307. pageNo: 1,//页码
  308. destroy: false,//处理
  309. handleStatus: false,//处理
  310. handleSjkdbOwnerStatus: false,//新增
  311. handleSjkdbTableNameStatus: false,//新增
  312. tableName: "SJKDB_process",
  313. request_form: {
  314. userId: "",
  315. userName: "",
  316. path: this.$router.currentRoute.name,
  317. userCode: JSON.parse(window.sessionStorage.userInfo).loginNo,
  318. // path:this.$roter.options.routers,
  319. // nextDealMan:'',
  320. title: "title",
  321. businessKey: "1",
  322. processDefinitionKey: "SJKDB_process",//流程key
  323. },
  324. requestForm: {
  325. // fresourceId: "78e1edce-b319-11ed-886f-d6cd97160e00", // 本地环境
  326. // fresourceId: "canvas", // 生产环境
  327. // fresourceId: "d36c60c0-b33f-11ed-be6b-00505687dcd3", //测试91环境
  328. fresourceId: getConfig().sjkdbList,
  329. processDefinitionKey: "SJKDB_process",
  330. },
  331. dialogStatus: false, //dialog显示
  332. dialoglablesStatus: true, //dialogL流程追踪显示
  333. clickTagNameTop: 'First',//头部tab
  334. clickTagName: 'first',
  335. dialogTitle: '',//dialogtit
  336. startStatus: false,//处理状态按钮
  337. closeStatus: false, //关闭按钮状态
  338. saveStatus: false, //保存按钮状态
  339. lables: {
  340. height: "400",
  341. titledata: [
  342. {
  343. label: "环节名称",
  344. prop: "taskName",
  345. width: 300,
  346. },
  347. {
  348. label: "处理人",
  349. prop: "assignee",
  350. width: 300,
  351. },
  352. {
  353. label: "到达时间",
  354. prop: "startTime",
  355. width: 300,
  356. },
  357. {
  358. label: "处理时间",
  359. prop: "endTime",
  360. width: 300,
  361. },
  362. {
  363. label: "回复意见",
  364. prop: "content",
  365. width: 300,
  366. },
  367. ], //表格头
  368. data: [], //内容数据
  369. loading: true,
  370. pageData: {
  371. total: 0, // 总条数
  372. pageSizes: 10, // 每页数量
  373. pageNum: 1, // 页码
  374. },
  375. isSelection: false, // 表格有多选时设置
  376. isOperation: false, // 表格有操作列时设置
  377. isIndex: true, // 列表序号
  378. operation: {
  379. // 表格有操作列时设置
  380. label: "操作", // 列名
  381. width: "50", // 根据实际情况给宽度
  382. data: [
  383. {
  384. label: "操作", // 操作名称
  385. type: "", //按钮类型
  386. handleRow: function () { }, // 自定义事件
  387. },
  388. ],
  389. },
  390. },
  391. tabListMain: [
  392. {
  393. index: "first",
  394. label: "我的待办",
  395. number: 1,
  396. name: "prosss_key",
  397. },
  398. {
  399. index: "two",
  400. label: "我的已办",
  401. number: 2,
  402. },
  403. {
  404. index: "three",
  405. label: "我发起的",
  406. number: 3,
  407. },
  408. ],
  409. lableTable: {},//传给子组件table
  410. firstlabel: {
  411. height: "400",
  412. titledata: [
  413. {
  414. label: "任务主题",
  415. prop: "need_name",
  416. width: 350,
  417. },
  418. {
  419. label: "发起人",
  420. prop: "proposer",
  421. width: 350,
  422. },
  423. {
  424. label: "发起时间",
  425. prop: "proposer_time",
  426. width: 350,
  427. },
  428. {
  429. label: "当前环节",
  430. prop: "taskName",
  431. width: 350,
  432. },
  433. ], //表格头
  434. data: [], //内容数据
  435. loading: true,
  436. pageData: {
  437. total: 10, // 总条数
  438. pageSizes: 10, // 每页数量
  439. pageNum: 1, // 页码
  440. },
  441. isSelection: false, // 表格有多选时设置
  442. isOperation: false, // 表格有操作列时设置
  443. isIndex: false, // 列表序号
  444. operation: {
  445. // 表格有操作列时设置
  446. label: "操作", // 列名
  447. width: "50", // 根据实际情况给宽度
  448. data: [
  449. {
  450. label: "操作", // 操作名称
  451. type: "", //按钮类型
  452. handleRow: function () { }, // 自定义事件
  453. },
  454. ],
  455. },
  456. },
  457. twolabel: {
  458. height: "400",
  459. titledata: [
  460. {
  461. label: "任务主题",
  462. prop: "need_name",
  463. width: 350,
  464. },
  465. {
  466. label: "发起人",
  467. prop: "proposer",
  468. width: 350,
  469. },
  470. {
  471. label: "发起时间",
  472. prop: "proposer_time",
  473. width: 350,
  474. },
  475. {
  476. label: "当前环节",
  477. prop: "taskName",
  478. width: 350,
  479. },
  480. ], //表格头
  481. data: [], //内容数据
  482. loading: true,
  483. pageData: {
  484. total: 10, // 总条数
  485. pageSizes: 10, // 每页数量
  486. pageNum: 1, // 页码
  487. },
  488. isSelection: false, // 表格有多选时设置
  489. isOperation: false, // 表格有操作列时设置
  490. isIndex: false, // 列表序号
  491. operation: {
  492. // 表格有操作列时设置
  493. label: "操作", // 列名
  494. width: "50", // 根据实际情况给宽度
  495. data: [
  496. {
  497. label: "操作", // 操作名称
  498. type: "", //按钮类型
  499. handleRow: function () { }, // 自定义事件
  500. },
  501. ],
  502. },
  503. },
  504. threelabel: {
  505. height: "400",
  506. titledata: [
  507. {
  508. label: "任务主题",
  509. prop: "need_name",
  510. width: 350,
  511. },
  512. {
  513. label: "发起人",
  514. prop: "proposer",
  515. width: 350,
  516. },
  517. {
  518. label: "发起时间",
  519. prop: "proposer_time",
  520. width: 350,
  521. },
  522. {
  523. label: "当前环节",
  524. prop: "taskName",
  525. width: 350,
  526. },
  527. {
  528. label: "当前处理人",
  529. prop: "currentMan",
  530. width: 350,
  531. },
  532. ], //表格头
  533. data: [], //内容数据
  534. loading: true,
  535. pageData: {
  536. total: 10, // 总条数
  537. pageSizes: 10, // 每页数量
  538. pageNum: 1, // 页码
  539. },
  540. isSelection: false, // 表格有多选时设置
  541. isOperation: false, // 表格有操作列时设置
  542. isIndex: false, // 列表序号
  543. operation: {
  544. // 表格有操作列时设置
  545. label: "操作", // 列名
  546. width: "50", // 根据实际情况给宽度
  547. data: [
  548. {
  549. label: "操作", // 操作名称
  550. type: "", //按钮类型
  551. handleRow: function () { }, // 自定义事件
  552. },
  553. ],
  554. },
  555. },
  556. savestatusBtn: false,
  557. pickWrite: {
  558. disabledDate(time) {
  559. return time.getTime() < new Date().getTime() - 8.64e6;
  560. },
  561. },
  562. }
  563. },
  564. methods: {
  565. clickNewTag(v) {
  566. this.$http({
  567. url: "/market/SjkdbProcess/getNeedNo",
  568. method: "post",
  569. headers: {
  570. "Content-Type": "application/json",
  571. },
  572. data: {},
  573. }).then((res) => {
  574. console.log(res);
  575. this.fromList = {
  576. needNo: res.data.body,
  577. proposer: JSON.parse(window.sessionStorage.getItem('userInfo')).loginName,
  578. proposerNo: JSON.parse(window.sessionStorage.getItem('userInfo')).loginNoStr,
  579. proposerTime: getNowdata({ a: '-', b: ' ', c: ':' }),
  580. }
  581. let accessoryList = [];
  582. accessoryList = v;
  583. this.$set(this.fromList, "accessoryList", accessoryList);
  584. });
  585. this.lables.data = []
  586. this.SjkdbProcessOwnerTableNames = []
  587. this.SjkdbProcessOwners = []
  588. this.startStatus = true;
  589. this.saveStatus = true;
  590. this.closeStatus = true;
  591. this.dialogStatus = true;
  592. this.isWorkflowStatus = true;
  593. this.dialoglablesStatus = true
  594. this.dialogTitle = "新建工单";
  595. this.disabled = false;
  596. this.fromList.proposer = JSON.parse(window.sessionStorage.getItem('userInfo')).loginName
  597. this.fromList.proposerTime = getNowdata({ a: '-', b: ' ', c: ':' })
  598. this.fromList.fileno = 'ZHQX_' + getNowdata({ a: '', b: '', c: '' })
  599. },
  600. clickNewSjkdbOwner(v) {
  601. this.SjkdbOwnerTitle = '新增属主'
  602. this.SjkdbProcessOwnersForm = {}
  603. this.handleSjkdbOwnerStatus = true
  604. },
  605. clickNewSjkdbTableName(v) {
  606. this.SjkdbTableNameTitle = '新增属主+表名'
  607. this.SjkdbProcessOwnerTableNamesForm = {}
  608. this.handleSjkdbTableNameStatus = true
  609. },
  610. delSjkdbTableName() {
  611. if (this.SjkdbTableNamedelId.length > 0) {
  612. this.$confirm("即将删除数据, 是否删除?", "提示", {
  613. confirmButtonText: "确定",
  614. cancelButtonText: "取消",
  615. type: "warning",
  616. })
  617. .then(() => {
  618. this.$http({
  619. url: "/market/SjkdbProcessOwnerTableName/delBatch",//SjkdbProcessOwnerTableName
  620. method: "post",
  621. headers: {
  622. "Content-Type": "application/json",
  623. },
  624. data: { delId: this.SjkdbTableNamedelId },
  625. }).then((res) => {
  626. this.getSjkdbTableNameTable({}, 1)
  627. this.pageSizSjkdbTableName = 1;
  628. this.handleSjkdbTableNameStatus = false
  629. })
  630. })
  631. .catch(() => { });
  632. }
  633. },
  634. delSjkdbOwner() {
  635. if (this.SjkdbOwnerdelId.length > 0) {
  636. this.$confirm("即将删除数据, 是否删除?", "提示", {
  637. confirmButtonText: "确定",
  638. cancelButtonText: "取消",
  639. type: "warning",
  640. })
  641. .then(() => {
  642. this.$http({
  643. url: "/market/SjkdbProcessOwner/delBatch",//SjkdbProcessOwner
  644. method: "post",
  645. headers: {
  646. "Content-Type": "application/json",
  647. },
  648. data: { delId: this.SjkdbOwnerdelId },
  649. }).then((res) => {
  650. this.getSjkdbOwnerTable({}, 1)
  651. this.pageSizeSjkdbOwner = 1;
  652. this.handleSjkdbOwnerStatus = false
  653. })
  654. })
  655. .catch(() => { });
  656. }
  657. },
  658. handleSelectionChangeSjkdbOwner(val) {
  659. this.SjkdbOwnerdelId = []
  660. val.map((item) => {
  661. this.SjkdbOwnerdelId.push(item.id)
  662. })
  663. },
  664. handleSelectionChangeSjkdbTableName(val) {
  665. this.SjkdbTableNamedelId = []
  666. val.map((item) => {
  667. this.SjkdbTableNamedelId.push(item.id)
  668. })
  669. },
  670. // 点击行即可选中
  671. getRowDataSjkdbOwner(row) {
  672. this.SjkdbOwnerTitle = '修改属主'
  673. this.SjkdbProcessOwnersForm = row
  674. this.handleSjkdbOwnerStatus = true
  675. },
  676. getRowDataSjkdbTableName(row) {
  677. this.SjkdbTableNameTitle = '修改属主+表名'
  678. this.SjkdbProcessOwnerTableNamesForm = row
  679. this.handleSjkdbTableNameStatus = true
  680. },
  681. processNewIssued(Title) {
  682. if (Title == '新增属主') {
  683. this.SjkdbProcessOwnersForm.needNo = this.fromList.needNo
  684. this.$http({
  685. url: "/market/SjkdbProcessOwner/add",
  686. method: "post",
  687. headers: {
  688. "Content-Type": "application/json",
  689. },
  690. data: this.SjkdbProcessOwnersForm,
  691. }).then((res) => {
  692. this.getSjkdbOwnerTable({}, this.pageSizeSjkdbOwner)
  693. this.handleSjkdbOwnerStatus = false
  694. })
  695. }
  696. else if (Title == '修改属主') {
  697. this.$http({
  698. url: "/market/SjkdbProcessOwner/update",
  699. method: "post",
  700. headers: {
  701. "Content-Type": "application/json",
  702. },
  703. data: this.SjkdbProcessOwnersForm,
  704. }).then((res) => {
  705. this.getSjkdbOwnerTable({}, this.pageSizeSjkdbOwner)
  706. this.handleSjkdbOwnerStatus = false
  707. })
  708. } else if (Title == '新增属主+表名') {
  709. this.SjkdbProcessOwnerTableNamesForm.needNo = this.fromList.needNo
  710. this.$http({
  711. url: "/market/SjkdbProcessOwnerTableName/add",
  712. method: "post",
  713. headers: {
  714. "Content-Type": "application/json",
  715. },
  716. data: this.SjkdbProcessOwnerTableNamesForm,
  717. }).then((res) => {
  718. this.getSjkdbTableNameTable({}, this.pageSizSjkdbTableName)
  719. this.handleSjkdbTableNameStatus = false
  720. })
  721. }
  722. else if (Title == '修改属主+表名') {
  723. this.$http({
  724. url: "/market/SjkdbProcessOwnerTableName/update",
  725. method: "post",
  726. headers: {
  727. "Content-Type": "application/json",
  728. },
  729. data: this.SjkdbProcessOwnerTableNamesForm,
  730. }).then((res) => {
  731. this.getSjkdbTableNameTable({}, this.pageSizSjkdbTableName)
  732. this.handleSjkdbTableNameStatus = false
  733. })
  734. }
  735. },
  736. getSjkdbOwnerTable(e, page) {
  737. this.loadingSjkdbOwner = true;
  738. this.$http({
  739. url: "/market/SjkdbProcessOwner/queryPage",
  740. method: "post",
  741. headers: {
  742. "Content-Type": "application/json",
  743. page: '{"pageNo":"' + page + '","pageSize":"10"}',
  744. },
  745. data: {
  746. needNo: this.fromList.needNo//needNo
  747. },
  748. }).then((res) => {
  749. this.SjkdbProcessOwners = res.data.data;
  750. this.SjkdbProcessOwners.map((item, index) => {
  751. item.index = (index + 1) + (res.data.pageNo - 1) * res.data.pageSize
  752. })
  753. this.totalSjkdbOwner = res.data.totalRecord;
  754. this.loadingSjkdbOwner = false;
  755. });
  756. },
  757. getSjkdbTableNameTable(e, page) {
  758. this.loadingSjkdbTableName = true;
  759. this.$http({
  760. url: "/market/SjkdbProcessOwnerTableName/queryPage",
  761. method: "post",
  762. headers: {
  763. "Content-Type": "application/json",
  764. page: '{"pageNo":"' + page + '","pageSize":"10"}',
  765. },
  766. data: {
  767. needNo: this.fromList.needNo//needNo
  768. },
  769. }).then((res) => {
  770. this.SjkdbProcessOwnerTableNames = res.data.data;
  771. this.SjkdbProcessOwnerTableNames.map((item, index) => {
  772. item.index = (index + 1) + (res.data.pageNo - 1) * res.data.pageSize
  773. })
  774. this.totalSjkdbTableName = res.data.totalRecord;
  775. this.loadingSjkdbTableName = false;
  776. });
  777. },
  778. downloadOne(e) {
  779. let list = {
  780. id: e.fileCode,
  781. fileName: e.fileName,
  782. };
  783. this.$http({
  784. url: "/market/waf/downFileByMinio",
  785. method: "post",
  786. headers: {
  787. "Content-Type": "application/json",
  788. },
  789. responseType: "blob",
  790. data: list,
  791. }).then((response) => {
  792. console.log(response);
  793. if (window.navigator && window.navigator.msSaveOrOpenBlob) {
  794. let blob = new Blob([response.data], {
  795. type: "application/vnd.ms-excel",
  796. });
  797. window.navigator.msSaveOrOpenBlob(
  798. blob,
  799. list.fileName
  800. );
  801. } else {
  802. /* 火狐谷歌的文件下载方式 */
  803. var blob = new Blob([response.data]);
  804. var downloadElement = document.createElement("a");
  805. var href = window.URL.createObjectURL(blob);
  806. downloadElement.href = href;
  807. downloadElement.download =
  808. list.fileName;
  809. document.body.appendChild(downloadElement);
  810. downloadElement.click();
  811. document.body.removeChild(downloadElement);
  812. window.URL.revokeObjectURL(href);
  813. }
  814. });
  815. },
  816. download(e) {
  817. let list = {
  818. id: e.fileCode,
  819. fileName: e.name,
  820. };
  821. this.$http({
  822. url: "/market/waf/downFileByMinio",
  823. method: "post",
  824. headers: {
  825. "Content-Type": "application/json",
  826. },
  827. responseType: "blob",
  828. data: list,
  829. }).then((response) => {
  830. console.log(response);
  831. if (window.navigator && window.navigator.msSaveOrOpenBlob) {
  832. let blob = new Blob([response.data], {
  833. type: "application/vnd.ms-excel",
  834. });
  835. window.navigator.msSaveOrOpenBlob(
  836. blob,
  837. list.fileName
  838. );
  839. } else {
  840. /* 火狐谷歌的文件下载方式 */
  841. var blob = new Blob([response.data]);
  842. var downloadElement = document.createElement("a");
  843. var href = window.URL.createObjectURL(blob);
  844. downloadElement.href = href;
  845. downloadElement.download =
  846. list.fileName;
  847. document.body.appendChild(downloadElement);
  848. downloadElement.click();
  849. document.body.removeChild(downloadElement);
  850. window.URL.revokeObjectURL(href);
  851. }
  852. });
  853. },
  854. //上传文件钩子函数
  855. clickUpload(file) { },
  856. uploadBack(v) {
  857. if (this.fromList.accessoryList) {
  858. this.fromList.accessoryList = [];
  859. this.fromList.accessoryList = v;
  860. } else {
  861. let accessoryList = [];
  862. accessoryList = v;
  863. this.$set(this.fromList, "accessoryList", accessoryList);
  864. }
  865. },
  866. delloadBack(v) {
  867. this.fromList.accessoryList = v;
  868. // this.$http({
  869. // url: "/market/waf/update",
  870. // method: "post",
  871. // headers: {
  872. // "Content-Type": "application/json",
  873. // },
  874. // data: this.fromList,
  875. // }).then((res) => {
  876. // console.log(res);
  877. // // if (res.data.result === 0) {
  878. // // this.$message.success("工作流更新成功");
  879. // // }
  880. // });
  881. },
  882. //是否最后一个人
  883. async getLastName() {
  884. console.log(this.fromList);
  885. let list = {
  886. procinstid: this.fromList.processId,
  887. taskid: this.fromList.taskId,
  888. // taskId:e.taskId
  889. };
  890. let _this = this;
  891. let obj = {
  892. url: this.$url.formList.getLastName, //流程追踪接口
  893. data: list,
  894. // status: "form",
  895. headers: {
  896. "Content-Type": "application/json",
  897. },
  898. };
  899. let res = await this.common.httpPost(obj, success);
  900. function success(data) {
  901. _this.isWorkflowStatus = data.lastMan == false ? false : true;
  902. _this.lastManList = data;
  903. // console.log(_this.isWorkflowStatus);
  904. }
  905. },
  906. //获取页码
  907. changeNum(e) {
  908. console.log(e)
  909. this.pageNo = e;
  910. if (this.clickTagName == 'first') {
  911. this.firstlabel.pageData.pageNum = e;
  912. this.getQueryList();
  913. }
  914. if (this.clickTagName == 'two') {
  915. this.twolabel.pageData.pageNum = e;
  916. this.getQueryDone();
  917. }
  918. if (this.clickTagName == 'three') {
  919. this.threelabel.pageData.pageNum = e;
  920. this.getMeLaunch()
  921. }
  922. },
  923. //获取页码
  924. changeSize(e) {
  925. console.log(11111);
  926. },
  927. //点击工单状态跳转需求流程显示页面
  928. clickDemand(e, res) {
  929. console.log(e);
  930. this.isWorkflowStatus = true
  931. console.log(res);
  932. if (e === "任务主题") {
  933. if (this.clickTagName === "three") {//发起
  934. console.log(res.taskName)
  935. this.dialogTitle = "查看";
  936. this.closeStatus = true;
  937. if (res.taskName == "发起人填写") {
  938. this.disabled = false;
  939. this.startStatus = true;
  940. this.saveStatus = true;
  941. this.dialoglablesStatus = true
  942. } else {
  943. this.disabled = true;
  944. this.startStatus = false;
  945. this.saveStatus = false;
  946. this.dialoglablesStatus = true
  947. }
  948. }
  949. if (this.clickTagName === "first") {//代办
  950. this.dialogTitle = "处理";
  951. if (res.taskName == "发起人填写") {
  952. this.savestatusBtn = false
  953. this.disabled = false;
  954. this.startStatus = true;
  955. this.saveStatus = true;
  956. this.closeStatus = true;
  957. this.dialoglablesStatus = true
  958. } else {
  959. this.savestatusBtn = true
  960. this.disabled = true;
  961. this.closeStatus = true;
  962. this.startStatus = true;
  963. this.saveStatus = false;
  964. this.dialoglablesStatus = true
  965. }
  966. }
  967. if (this.clickTagName === "two") {//已办
  968. this.dialogTitle = "查看";
  969. this.closeStatus = true;
  970. this.startStatus = false;
  971. this.saveStatus = false;
  972. this.disabled = true;
  973. this.dialoglablesStatus = true
  974. }
  975. this.dialogStatus = true
  976. this.fromList = res;
  977. this.clickForm(res);
  978. this.getFromQuery(res);
  979. }
  980. },
  981. //查询form表单数据
  982. getFromQuery(e) {
  983. this.$http({
  984. url: "/market/SjkdbProcess/query",
  985. method: "post",
  986. headers: {
  987. "Content-Type": "application/json",
  988. },
  989. data: { id: e.id },
  990. }).then((res) => {
  991. this.fromList = res.data;
  992. this.dialogStatus = true;
  993. this.fromList.taskId = e.taskId
  994. this.fromList.taskName = e.taskName
  995. this.fromList.createId = e.createId
  996. if (this.fromList.accessoryList) {
  997. this.fromList.accessoryList.map((item) => {
  998. item.name = item.fileName;
  999. })
  1000. }
  1001. this.fromList.resourceId = e.resourceId
  1002. this.getSjkdbOwnerTable({}, this.pageSizeSjkdbOwner)
  1003. this.getSjkdbTableNameTable({}, this.pageSizSjkdbTableName)
  1004. });
  1005. },
  1006. async clickForm(e) {
  1007. let list = {
  1008. processInstanceId: e.process_id,
  1009. // taskId:e.taskId
  1010. };
  1011. let _this = this;
  1012. let obj = {
  1013. url: this.$url.formList.getCommentsByProcessId, //流程追踪接口
  1014. data: list,
  1015. headers: {
  1016. "Content-Type": "application/json",
  1017. },
  1018. };
  1019. let res = await this.common.httpPost(obj, success);
  1020. function success(data) {
  1021. console.log('[ 接口返回值第一曾 ] >', data)
  1022. let list = [];
  1023. list = data.data.data;
  1024. if (data.data.lastmandata.length != 0) {
  1025. data.data.lastmandata.map((item, index) => {
  1026. item.id = index + 22;
  1027. });
  1028. }
  1029. list.map((item, index) => {
  1030. item.startTime = _this.$util.datetimeFormat(item.startTime);
  1031. item.endTime = _this.$util.datetimeFormat(item.endTime);
  1032. item.id = index + 1;
  1033. item.children = [];
  1034. if (data.data.lastmandata.length != 0) {
  1035. let indexs = data.data.lastmandata.findIndex((items) => {
  1036. if (items.taskId == item.taskId) {
  1037. item.children.push(items);
  1038. }
  1039. });
  1040. }
  1041. });
  1042. console.log(list);
  1043. _this.lables.data = list;
  1044. console.log("[ _this.lables.data ] >", _this.lables.data);
  1045. _this.abc = true;
  1046. }
  1047. },
  1048. handleClose() {//关闭弹窗
  1049. this.dialogStatus = false;
  1050. this.fromList = {};
  1051. },
  1052. async clickSave() {
  1053. this.$refs.form.validate((valid) => {
  1054. if (valid) {
  1055. console.log(this.$refs.form.model)
  1056. this.savestatusBtn = true
  1057. if (this.fromList.id) {
  1058. if (this.fromList.accessoryList) {
  1059. this.fromList.accessoryIdList = []
  1060. this.fromList.accessoryList.map((item) => {
  1061. this.fromList.accessoryIdList.push(item.id);
  1062. })
  1063. }
  1064. this.request_form.title = '[IT工作台]-数据库导表-' + this.fromList.needName;
  1065. this.$http({
  1066. url: "/market/SjkdbProcess/update",
  1067. method: "post",
  1068. headers: {
  1069. "Content-Type": "application/json",
  1070. },
  1071. data: this.fromList,
  1072. }).then((res) => {
  1073. if (res.data.result === 0) {
  1074. this.$message.success("表单更新成功");
  1075. }
  1076. });
  1077. } else {
  1078. this.getUserIds();
  1079. }
  1080. } else {
  1081. this.$message.error("请完善表单信息");
  1082. return false;
  1083. }
  1084. });
  1085. },
  1086. //获取自己idname
  1087. getUserIds() {
  1088. this.$http({
  1089. url: "/market/api/user/info/queryNodePers?params=" + JSON.parse(window.sessionStorage.userInfo).loginNo,
  1090. method: "post",
  1091. headers: {
  1092. "Content-Type": "application/json",
  1093. },
  1094. }).then((res) => {
  1095. this.request_form.userName = res.data[0].children[0].loginNameStr;
  1096. this.request_form.userId = res.data[0].children[0].loginNoStr;
  1097. this.setForm();
  1098. console.log(this.request_form)
  1099. });
  1100. },
  1101. setForm(e) {
  1102. this.request_form.title = '[IT工作台]-数据库导表-' + this.fromList.needName;
  1103. if (this.fromList.accessoryList) {
  1104. this.fromList.accessoryIdList = []
  1105. this.fromList.accessoryList.map((item) => {
  1106. this.fromList.accessoryIdList.push(item.id);
  1107. })
  1108. }
  1109. this.$http({
  1110. url: "/market/SjkdbProcess/add",
  1111. method: "post",
  1112. headers: {
  1113. "Content-Type": "application/json",
  1114. },
  1115. data: this.fromList,
  1116. }).then((res) => {
  1117. this.request_form.businessKey = res.data.body;
  1118. this.fromList.id = res.data.body;
  1119. this.formWorkId = res.data.body;
  1120. this.clickHandle(res.data.body);
  1121. });
  1122. },
  1123. async clickHandle(e) {
  1124. let _this = this;
  1125. let obj = {
  1126. url: this.$url.formList.startWork, //开始工作流接口
  1127. data: _this.request_form,
  1128. status: "form",
  1129. headers: {
  1130. "Content-Type": "application/x-www-form-urlencoded",
  1131. },
  1132. };
  1133. let res = await this.common.httpPost(obj, success);
  1134. function success(data) {
  1135. // console.log(data);
  1136. _this.fromList.taskId = data.data;
  1137. _this.fromList.processId = data.data;
  1138. // _this.fromList.resourceId = data.data;
  1139. _this.taskId = data.data;
  1140. // _this.fromList.taskId = data;
  1141. // _this.taskId = data;
  1142. let list = {
  1143. id: e,
  1144. // taskId:_this.formId,
  1145. processId: _this.fromList.taskId,
  1146. tableName: _this.request_form.processDefinitionKey,
  1147. };
  1148. _this.setUpdate(list);
  1149. }
  1150. },
  1151. //更新工作流接口
  1152. setUpdate(e) {
  1153. this.$http({
  1154. url: "/market/waf/updateBase",
  1155. method: "post",
  1156. headers: {
  1157. "Content-Type": "application/json",
  1158. },
  1159. data: e,
  1160. }).then((res) => {
  1161. this.fromList.taskId = res.data.body[0].taskId;
  1162. this.fromList.taskName = res.data.body[0].taskName;
  1163. // if (res.data.body.taskName === "发起人填写") {
  1164. // this.isSync = res.data.body.isSync;
  1165. // } else {
  1166. // this.isSync = "1";
  1167. // }
  1168. if (res.data.result === 0) {
  1169. this.$message.success("工作流更新成功");
  1170. }
  1171. });
  1172. },
  1173. //处理按钮,开始工作流接口
  1174. clickHandles() {
  1175. this.getNextPath(this.fromList.resourceId || "");
  1176. console.log(this.fromList);
  1177. this.request_form.title = '[IT工作台]-数据库导表-' + this.fromList.needName;
  1178. // if (this.fromList.taskId) {
  1179. // this.destroy = true;
  1180. // this.handleStatus = true;
  1181. // } else {
  1182. // this.$message.error("请先点击保存按钮");
  1183. // }
  1184. },
  1185. getNextPath(e) {
  1186. let list = {
  1187. fresourceId: this.requestForm.fresourceId, // 本地环境
  1188. processId: this.requestForm.processDefinitionKey,
  1189. };
  1190. if (e) {
  1191. // this.propsList = [];
  1192. list.resourceId = e;
  1193. }
  1194. console.log(11111);
  1195. console.log(list);
  1196. console.log(11111);
  1197. this.$http({
  1198. url: "/market/waf/queryPath",
  1199. method: "post",
  1200. headers: {
  1201. "Content-Type": "application/json",
  1202. },
  1203. data: list,
  1204. }).then((res) => {
  1205. console.log(res);
  1206. console.log(this.fromList);
  1207. console.log(res.data.body);
  1208. console.log(res.data.body.nextShapes[0].multi);
  1209. if (res.data.body.nextShapes[0].multi) {
  1210. if (res.data.body.nextShapes[0].multi.multi === "true") {
  1211. this.getLastName();
  1212. }
  1213. }
  1214. if (this.fromList.taskId || this.fromList.processId) {
  1215. this.destroy = true;
  1216. this.handleStatus = true;
  1217. } else {
  1218. this.$message.error("请先点击保存按钮");
  1219. }
  1220. });
  1221. },
  1222. //处理关闭
  1223. handleCloses() {
  1224. // this.treeList = [];
  1225. // this.textarea = "";
  1226. this.handleStatus = false;
  1227. this.usernumber()
  1228. },
  1229. //新增关闭
  1230. handleSjkdbOwnerCloses() {
  1231. this.handleSjkdbOwnerStatus = false;
  1232. },
  1233. handleSjkdbTableNameCloses() {
  1234. this.handleSjkdbTableNameStatus = false;
  1235. },
  1236. updateForm() {
  1237. this.dialogStatus = false;
  1238. this.handleCloses();
  1239. this.usernumber()
  1240. if (this.clickTagName == 'first') {
  1241. this.lableTable = this.firstlabel
  1242. this.getQueryList();
  1243. }
  1244. if (this.clickTagName == 'two') {
  1245. this.lableTable = this.twolabel
  1246. this.getQueryDone();
  1247. }
  1248. if (this.clickTagName == 'three') {
  1249. this.lableTable = this.threelabel
  1250. this.getMeLaunch()
  1251. }
  1252. },
  1253. clickTabMains(e) {
  1254. console.log(e);
  1255. this.clickTagName = e
  1256. this.pageNo = 1
  1257. this.$refs.TableList.page = 1;
  1258. if (this.clickTagName == 'first') {
  1259. this.lableTable = this.firstlabel
  1260. this.getQueryList();
  1261. }
  1262. if (this.clickTagName == 'two') {
  1263. this.lableTable = this.twolabel
  1264. this.getQueryDone();
  1265. }
  1266. if (this.clickTagName == 'three') {
  1267. this.lableTable = this.threelabel
  1268. this.getMeLaunch()
  1269. }
  1270. },
  1271. adminhandleSizeChange(val) {
  1272. console.log(`每页 ${val} 条`);
  1273. },
  1274. adminhandleCurrentChange(val) {
  1275. console.log(`当前页: ${val}`);
  1276. },
  1277. // 分页
  1278. currchangeSjkdbOwner(v) {
  1279. this.pageSizeSjkdbOwner = v;
  1280. this.getSjkdbOwnerTable(this.paramsSjkdbOwner, this.pageSizeSjkdbOwner);
  1281. },
  1282. currchangeSjkdbTableName(v) {
  1283. this.pageSizSjkdbTableName = v;
  1284. this.getSjkdbTableNameTable(this.paramsSjkdbTableName, this.pageSizSjkdbTableName)
  1285. },
  1286. //我的待办
  1287. getQueryList(e, status) {
  1288. this.loading = true;
  1289. getTodoBase(this.pageNo, "", e || { tableName: this.tableName }).then((res) => {
  1290. if (status === 0) {
  1291. this.clickDemand("任务主题", res.data.data[0]);
  1292. }
  1293. this.lableTable.data = res.data.data;
  1294. this.lableTable.pageData.total = res.data.totalRecord;
  1295. this.tabListMain[0].number = res.data.totalRecord
  1296. this.loading = false;
  1297. });
  1298. },
  1299. //我的已办
  1300. getQueryDone() {
  1301. this.loading = true;
  1302. getDoneBase(this.pageNo, "", { tableName: this.tableName, }).then((res) => {
  1303. this.lableTable.data = res.data.data;
  1304. // this.lableTable.data.map((item) => {
  1305. // item.status = "2";
  1306. // });
  1307. this.lableTable.pageData.total = res.data.totalRecord;
  1308. this.tabListMain[1].number = res.data.totalRecord
  1309. this.loading = false;
  1310. });
  1311. },
  1312. //我发起的
  1313. getMeLaunch() {
  1314. this.loading = true;
  1315. getInitiateBase(this.pageNo, "", { tableName: this.tableName, }).then((res) => {
  1316. this.lableTable.data = res.data.data;
  1317. // this.lableTable.data.map((item) => {
  1318. // if (item.taskName === "发起人填写") {
  1319. // item.status = "1";
  1320. // } else {
  1321. // item.status = "2";
  1322. // }
  1323. // });
  1324. this.lableTable.pageData.total = res.data.totalRecord;
  1325. this.tabListMain[2].number = res.data.totalRecord
  1326. this.loading = false;
  1327. });
  1328. },
  1329. usernumber() {
  1330. getInitiateBase(this.pageNo, "", { tableName: this.tableName, }).then((res) => {
  1331. this.tabListMain[2].number = res.data.totalRecord
  1332. });
  1333. getDoneBase(this.pageNo, "", { tableName: this.tableName, }).then((res) => {
  1334. this.tabListMain[1].number = res.data.totalRecord
  1335. });
  1336. getTodoBase(this.pageNo, "", { tableName: this.tableName }).then((res) => {
  1337. this.tabListMain[0].number = res.data.totalRecord
  1338. });
  1339. }
  1340. },
  1341. created() {
  1342. let status = JSON.stringify(this.$route.query) == "{}";
  1343. if (status) {
  1344. this.lableTable = this.firstlabel
  1345. this.getQueryList()
  1346. this.usernumber()
  1347. } else {
  1348. let { id, type } = this.$route.query;
  1349. let list = {
  1350. taskId: id,
  1351. tableName: this.tableName
  1352. };
  1353. this.usernumber()
  1354. this.lableTable = this.firstlabel
  1355. this.getQueryList(list, 0);//代办
  1356. }
  1357. }
  1358. }
  1359. </script>
  1360. <style lang="scss" scoped>
  1361. .copyClass {
  1362. display: flex;
  1363. }
  1364. .flex-header-text-tree {
  1365. width: 50%;
  1366. text-align: center;
  1367. }
  1368. ::v-deep .el-form-item {
  1369. width: 100%;
  1370. }
  1371. .active {
  1372. background-color: #f3faff;
  1373. }
  1374. .flex-common {
  1375. padding: 10px 5%;
  1376. font-size: 18px;
  1377. }
  1378. .flex-buttons {
  1379. background-color: #cde4f6;
  1380. border-color: #cde4f6;
  1381. color: #606266;
  1382. }
  1383. .flex-button {
  1384. margin-top: 10px;
  1385. margin-bottom: 10px;
  1386. ::v-deep .el-button--primary {
  1387. width: 222px;
  1388. }
  1389. }
  1390. .flex-left-header-text {
  1391. height: 40px;
  1392. line-height: 40px;
  1393. color: black;
  1394. padding-left: 10px;
  1395. background-color: #cde4f6;
  1396. font-size: 18px;
  1397. font-weight: bold;
  1398. }
  1399. .flex-right-text {
  1400. margin-right: 20px;
  1401. width: 50%;
  1402. }
  1403. .flex-handle {
  1404. width: 100%;
  1405. padding: 30px;
  1406. display: flex;
  1407. .flex-right {
  1408. width: 50%;
  1409. border: 1px solid #e1e1e1;
  1410. margin-left: 20px;
  1411. }
  1412. .flex-left {
  1413. width: 50%;
  1414. display: flex;
  1415. flex-direction: column;
  1416. .flex-left-header {
  1417. display: flex;
  1418. justify-content: space-around;
  1419. }
  1420. }
  1421. }
  1422. .table-title {
  1423. height: 50px;
  1424. line-height: 50px;
  1425. background-color: #f3faff;
  1426. font-size: 18px;
  1427. font-weight: bold;
  1428. }
  1429. ::v-deep .el-dialog {
  1430. margin-top: 0 !important;
  1431. }
  1432. ::v-deep .el-table__fixed-body-wrapper {
  1433. top: 50px !important;
  1434. }
  1435. .flex-box {
  1436. display: flex;
  1437. width: calc(100% - 40px);
  1438. border-radius: 20px;
  1439. background-color: #fff;
  1440. margin: 0 auto;
  1441. margin-top: 20px;
  1442. position: relative;
  1443. flex-direction: column;
  1444. .flex-load {
  1445. display: flex;
  1446. width: 100%;
  1447. position: relative;
  1448. margin: 1%;
  1449. border-bottom: 1px solid #e1e1e1;
  1450. justify-content: space-between;
  1451. }
  1452. .flex-header {
  1453. display: flex;
  1454. // width: 100%;
  1455. position: relative;
  1456. // height: 60px;
  1457. margin: 1%;
  1458. border-bottom: 1px solid #e1e1e1;
  1459. justify-content: space-between;
  1460. // ::v-deep .el-form-item {
  1461. // width: 30%;
  1462. // margin-right: 5%;
  1463. // }
  1464. .el-button {
  1465. width: 150px;
  1466. float: right;
  1467. height: 40px !important;
  1468. margin-right: 30px;
  1469. }
  1470. }
  1471. }
  1472. //设置子组件样式
  1473. ::v-deep .el-tabs__item {
  1474. padding: 0;
  1475. margin-right: 20px;
  1476. width: 166px;
  1477. text-align: center;
  1478. background-color: #d8eaf6;
  1479. color: black;
  1480. }
  1481. //设置子组件样式
  1482. ::v-deep .el-form-item__label {
  1483. text-align: center;
  1484. }
  1485. ::v-deep .is-active {
  1486. color: #fff;
  1487. background-color: #0583cd;
  1488. }
  1489. ::v-deep .el-select {
  1490. width: 100%
  1491. }
  1492. ::v-deep .el-tabs__active-bar {
  1493. display: none;
  1494. }
  1495. ::v-deep .el-tabs__nav-wrap::after {
  1496. display: none !important;
  1497. }
  1498. .flex-form {
  1499. margin-top: 50px;
  1500. }
  1501. .flex-footer-botton {
  1502. display: flex;
  1503. justify-content: space-evenly;
  1504. }
  1505. a {
  1506. text-decoration: none
  1507. }
  1508. </style>