index.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. <template >
  2. <div class="app-container">
  3. <el-table v-loading="loading" :data="approvedangerList" @selection-change="handleSelectionChange" :height="clientHeight" border>
  4. <el-table-column type="selection" width="55" align="center" />
  5. <el-table-column label="流程ID" align="center" prop="processId" :show-overflow-tooltip="true"/>
  6. <el-table-column label="流程名称" align="center" prop="processName" :show-overflow-tooltip="true"/>
  7. <el-table-column label="流程创建时间" align="center" prop="processCreateTime" :show-overflow-tooltip="true"/>
  8. <el-table-column label="申请人姓名" align="center" prop="apName" :show-overflow-tooltip="true"/>
  9. <!-- <el-table-column :label="$t('隐患级别')" align="center" prop="tApprove.hiddendangerLevel" :show-overflow-tooltip="true"/>-->
  10. <el-table-column label="申请编号" align="center" prop="apNo" :show-overflow-tooltip="true"/>
  11. <el-table-column
  12. prop="isEnd"
  13. header-align="center"
  14. align="center"
  15. label="是否结束">
  16. <template slot-scope="scope">
  17. <el-tag
  18. :type="scope.row.end? 'success' : 'danger'"
  19. disable-transitions>{{scope.row.end? '是' : '否'}}</el-tag>
  20. </template>
  21. </el-table-column>
  22. <el-table-column label="操作" align="center" width="120" class-name="small-padding fixed-width">
  23. <template slot-scope="scope">
  24. <el-button
  25. size="mini"
  26. type="text"
  27. icon="el-icon-view"
  28. @click="handleView(scope.row)"
  29. >查看</el-button>
  30. <el-button
  31. size="mini"
  32. type="text"
  33. @click="processImg(scope.row.processId)"
  34. >流程图</el-button>
  35. </template>
  36. </el-table-column>
  37. </el-table>
  38. <!--<pagination-->
  39. <!--v-show="total>0"-->
  40. <!--:total="total"-->
  41. <!--:page.sync="queryParams.pageNum"-->
  42. <!--:limit.sync="queryParams.pageSize"-->
  43. <!--@pagination="getList"-->
  44. <!--/>-->
  45. <!-- 弹窗, 查看 -->
  46. <!-- <div v-if="addOrUpdateVisible">-->
  47. <!-- <el-dialog :close-on-click-modal="false" v-dialogDrag :visible.sync="addOrUpdateVisible" :destroy-on-close="true">-->
  48. <!-- <add-or-update :info="approveInfo"></add-or-update>-->
  49. <!-- </el-dialog>-->
  50. <!-- </div>-->
  51. <!--<process-img v-if="processImgVisible" ref="processImg" @refreshDataList="getList"></process-img>-->
  52. <!--<add-or-update v-if="specDealVisible" ref="specDeal" @refreshDataList="getList"></add-or-update>-->
  53. <!--<spec-modify v-if="specModifyDealVisible" ref="specModifyDeal" @refreshDataList="getList"></spec-modify>-->
  54. <!--<spec-training-plan v-if="specTrainingPlanVisible" ref="specTrainingPlan" @refreshDataList="getList"></spec-training-plan>-->
  55. <!--<spec-maintenance v-if="specMaintenanceVisible" ref="specMaintenance" @refreshDataList="getList"></spec-maintenance>-->
  56. <!--<intact-detail v-if="intactDetailVisible" ref="intactDetail" @refreshDataList="getList"></intact-detail>-->
  57. <!--<kekao-detail v-if="kekaoDetailVisible" ref="kekaoDetail" @refreshDataList="getList"></kekao-detail>-->
  58. <!--<invoice-detail v-if="invoiceDetailVisible" ref="invoiceDetail" @refreshDataList="getList"></invoice-detail>-->
  59. <!--<offlinevalve-detail v-if="offlinevalveDetailVisible" ref="offlinevalveDetail" @refreshDataList="getList"></offlinevalve-detail>-->
  60. <!--<safetychange-detail v-if="safetychangeDetailVisible" ref="safetychangeDetail" @refreshDataList="getList"></safetychange-detail>-->
  61. <!--<sai-apply-detail v-if="saiApplyVisible" ref="saiApplyDetail" @refreshDataList="getList"></sai-apply-detail>-->
  62. </div>
  63. </template>
  64. <script>
  65. // import { getTaskdonelist } from "@/api/ehs/approvedanger";
  66. // import AddOrUpdate from '../approveDetail/spec-detail';
  67. // import { treeselect } from "@/api/system/dept";
  68. // import { getToken } from "@/utils/auth";
  69. // import Treeselect from "@riophae/vue-treeselect";
  70. // import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  71. // import ProcessImg from "../processImg/index";
  72. // import SpecModify from '../approveDetail/specModify-detail';
  73. // import SpecTrainingPlan from '../approveDetail/specTrainingPlan-detaill';
  74. // import SpecMaintenance from "@/views/approve/approveDetail/specMaintenance-detail";
  75. // import IntactDetail from "@/views/approve/approveDetail/intact-detail";
  76. // import KekaoDetail from "@/views/approve/approveDetail/kekao-detail";
  77. // import InvoiceDetail from "@/views/approve/approveDetail/invoice-detail";
  78. // import OfflinevalveDetail from "@/views/approve/approveDetail/offlinevalve-detail";
  79. // import SafetychangeDetail from "@/views/approve/approveDetail/safetychange-detail";
  80. // import SaiApplyDetail from "@/views/approve/approveDetail/sai-apply-detail";
  81. export default {
  82. name: "Taskdone",
  83. // components: {
  84. // SaiApplyDetail,
  85. // SafetychangeDetail,
  86. // OfflinevalveDetail,
  87. // Treeselect, AddOrUpdate,ProcessImg,SpecModify,SpecTrainingPlan,SpecMaintenance,IntactDetail,KekaoDetail,InvoiceDetail
  88. // },
  89. data() {
  90. return {
  91. // 遮罩层
  92. loading: true,
  93. processImgVisible: false,
  94. specDealVisible: false,
  95. specModifyDealVisible: false,
  96. specTrainingPlanVisible: false,
  97. specMaintenanceVisible: false,
  98. intactDetailVisible:false,
  99. kekaoDetailVisible:false,
  100. invoiceDetailVisible:false,
  101. offlinevalveDetailVisible:false,
  102. safetychangeDetailVisible:false,
  103. saiApplyVisible:false,
  104. // 选中数组
  105. ids: [],
  106. // 非单个禁用
  107. single: true,
  108. // 非多个禁用
  109. multiple: true,
  110. // 显示搜索条件
  111. showSearch: false,
  112. // 总条数
  113. total: 0,
  114. // 我的申请表格数据
  115. approvedangerList: [],
  116. // 弹出层标题
  117. title: "",
  118. // 部门树选项
  119. deptOptions: undefined,
  120. clientHeight:300,
  121. // 是否显示弹出层
  122. open: false,
  123. // 装置名称字典
  124. plantCodeOptions: [],
  125. // 查询参数
  126. queryParams: {
  127. pageNum: 1,
  128. pageSize: 20,
  129. plantCode: null,
  130. recorderId: null,
  131. hiddendangerLevel: null,
  132. hiddendangerContent: null,
  133. measures: null,
  134. completeTime: null,
  135. status: null,
  136. creattime: null,
  137. endtime: null,
  138. processId: null,
  139. approveNo: null,
  140. deptId: null,
  141. },
  142. // 表单参数
  143. form: {},
  144. //处理数据传输
  145. approveInfo: null,
  146. //弹窗界面是否开启
  147. addOrUpdateVisible: false,
  148. };
  149. },
  150. watch: {
  151. // 根据名称筛选部门树
  152. deptName(val) {
  153. this.$refs.tree.filter(val);
  154. }
  155. },
  156. created() {
  157. //设置表格高度对应屏幕高度
  158. this.$nextTick(() => {
  159. this.clientHeight = document.body.clientHeight -250
  160. })
  161. this.getList();
  162. this.getTreeselect();
  163. this.getDicts("PLANT_DIVIDE").then(response => {
  164. this.plantCodeOptions = response.data;
  165. });
  166. },
  167. methods: {
  168. /** 查询隐患申请列表 */
  169. getList() {
  170. this.loading = true;
  171. // getTaskdonelist(this.queryParams).then(response => {
  172. // this.approvedangerList = response.rows;
  173. // this.total = response.total;
  174. this.loading = false;
  175. // });
  176. },
  177. /** 查询部门下拉树结构 */
  178. getTreeselect() {
  179. treeselect().then(response => {
  180. this.deptOptions = response.data;
  181. });
  182. },
  183. /** 查看操作 */
  184. handleView (row) {
  185. if (row.processName == "特种设备审核"){
  186. this.specDealVisible = true
  187. this.$nextTick(() => {
  188. console.log(row.taskName)
  189. this.$refs.specDeal.init(row.specApprove.id, row.taskId, row.processId,row.taskName)
  190. })
  191. }else if (row.processName == "年度检查报告申请"){
  192. this.specDealVisible = true
  193. this.$nextTick(() => {
  194. console.log(row.taskName)
  195. this.$refs.specDeal.init(row.specApprove.id, row.taskId, row.processId,row.taskName)
  196. })
  197. }else if (row.processName == "月度检查"){
  198. this.specDealVisible = true
  199. this.$nextTick(() => {
  200. console.log(row.taskName)
  201. this.$refs.specDeal.init(row.specApprove.id, row.taskId, row.processId,row.taskName)
  202. })
  203. }else if (row.processName == "设备修改/删除审核" || row.processName == "设备新增/删除审核"){
  204. this.specModifyDealVisible = true
  205. this.$nextTick(() => {
  206. console.log(row.taskName)
  207. this.$refs.specModifyDeal.init(row.approveSpecModify.id, row.taskId, row.processId,row.taskName)
  208. })
  209. }else if (row.processName == "专项培训计划审核"){
  210. this.specTrainingPlanVisible = true
  211. this.$nextTick(() => {
  212. console.log(row.taskName)
  213. this.$refs.specTrainingPlan.init(row.approveObject.id, row.taskId, row.processId,row.taskName)
  214. })
  215. }else if (row.processName == "设备维修审批流程") {
  216. this.specMaintenanceVisible = true
  217. this.$nextTick(() => {
  218. console.log(row.taskName)
  219. this.$refs.specMaintenance.init(row.approveObject.id, row.taskId, row.processId, row.taskName)
  220. })
  221. }else if (row.processName == "设备变更申请") {
  222. this.intactDetailVisible = true
  223. this.$nextTick(() => {
  224. console.log(row.taskName)
  225. this.$refs.intactDetail.init(row.approveObject.id, row.taskId, row.processId, row.taskName)
  226. })
  227. }else if (row.processName == "可靠性管理申请") {
  228. this.kekaoDetailVisible = true
  229. this.$nextTick(() => {
  230. console.log(row.taskName)
  231. this.$refs.kekaoDetail.init(row.approveObject.id, row.taskId, row.processId, row.taskName)
  232. })
  233. }else if (row.processName == "预约开票审批流程"){
  234. this.invoiceDetailVisible = true
  235. this.$nextTick(() => {
  236. console.log(row)
  237. console.log(row.approveObj)
  238. this.$refs.invoiceDetail.init(row.approveObject.id, row.taskId, row.processId,row.taskName)
  239. })
  240. } else if (row.processName == "安全阀离线/切出申请流程") {
  241. this.offlinevalveDetailVisible = true
  242. this.$nextTick(() => {
  243. this.$refs.offlinevalveDetail.init(row.approveObject.id, row.taskId, row.processId, row.taskName)
  244. })
  245. } else if (row.processName == "组织保护措施状态变更申请流程") {
  246. this.safetychangeDetailVisible = true
  247. this.$nextTick(() => {
  248. this.$refs.safetychangeDetail.init(row.approveObject.id, row.taskId, row.processId, row.taskName)
  249. })
  250. } else if (row.processName == "SAI开项申请流程") {
  251. this.saiApplyVisible = true
  252. this.$nextTick(() => {
  253. this.$refs.saiApplyDetail.init(row.approveObject.saiApplyId, row.taskId, row.processId, row.taskName)
  254. })
  255. } else {
  256. this.approveInfo = row;
  257. this.infoTaskName = row.taskName;
  258. this.infoprocessName = row.processName;
  259. this.addOrUpdateVisible = true;
  260. }
  261. },
  262. // 装置名称字典翻译
  263. plantCodeFormat(row, column) {
  264. return this.selectDictLabel(this.plantCodeOptions, row.plantCode);
  265. },
  266. // 取消按钮
  267. cancel() {
  268. this.open = false;
  269. this.reset();
  270. },
  271. // 表单重置
  272. reset() {
  273. this.form = {
  274. id: null,
  275. plantCode: null,
  276. recorderId: null,
  277. hiddendangerLevel: null,
  278. hiddendangerContent: null,
  279. measures: null,
  280. completeTime: null,
  281. status: 0,
  282. creattime: null,
  283. endtime: null,
  284. processId: null,
  285. approveNo: null,
  286. deptId: null,
  287. delFlag: null
  288. };
  289. this.resetForm("form");
  290. },
  291. /** 搜索按钮操作 */
  292. handleQuery() {
  293. this.queryParams.pageNum = 1;
  294. this.getList();
  295. },
  296. /** 重置按钮操作 */
  297. resetQuery() {
  298. this.resetForm("queryForm");
  299. this.handleQuery();
  300. },
  301. // 多选框选中数据
  302. handleSelectionChange(selection) {
  303. this.ids = selection.map(item => item.id)
  304. this.single = selection.length!==1
  305. this.multiple = !selection.length
  306. },
  307. processImg (processId) {
  308. this.processImgVisible = true
  309. this.$nextTick(() => {
  310. this.$refs.processImg.init(processId)
  311. })
  312. },
  313. }
  314. };
  315. </script>