调解系统PC端服务

addNodeprocess.vue 4.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <template>
  2. <div>
  3. <el-dialog title="新增流程节点" :visible="addvisiable" v-if="addvisiable" @close="cancel" width="600px" center>
  4. <el-form :model="ruleForm" label-position="left" :rules="rules" ref="ruleForm" label-width="90px"
  5. class="demo-ruleForm">
  6. <el-form-item label="节点名称" prop="nodename">
  7. <el-select v-model="ruleForm.nodename" placeholder="请选择">
  8. <el-option v-for="dict in dict.type.template_type" :key="dict.value" :label="dict.label"
  9. :value="dict.value"></el-option>
  10. </el-select>
  11. </el-form-item>
  12. <el-form-item label="案件状态" prop="casestatus">
  13. <el-input v-model="ruleForm.casestatus"></el-input>
  14. </el-form-item>
  15. <el-form-item label="驳回节点" prop="rejectnode">
  16. <el-select v-model="ruleForm.rejectnode" placeholder="请选择">
  17. <el-option v-for="item in tempList" :key="item.id" :label="item.identifyName" :value="item.id">
  18. </el-option>
  19. </el-select>
  20. </el-form-item>
  21. <el-form-item label="关联角色" prop="associatedroles">
  22. <el-select v-model="ruleForm.associatedroles" placeholder="请选择">
  23. <el-option v-for="item in tempList" :key="item.id" :label="item.identifyName" :value="item.id">
  24. </el-option>
  25. </el-select>
  26. </el-form-item>
  27. </el-form>
  28. <div slot="footer" class="dialog-footer">
  29. <el-button @click="cancel" class="endbutton"><span>取 消</span></el-button>
  30. <el-button type="primary" @click="submitUpload" class="endbutton"><span>确认</span></el-button>
  31. </div>
  32. </el-dialog>
  33. </div>
  34. </template>
  35. <script>
  36. // import {
  37. // deptIdentifyList,
  38. // } from "@/api/officialSeal/officialSeal.js";
  39. export default {
  40. props: ["addvisiable", "editData", "queryParams"],
  41. dicts: ["template_type"],
  42. data() {
  43. return {
  44. fileList: [],
  45. data: [],
  46. tempList: [],
  47. isImg:false,
  48. filedata: {},
  49. flagBtn: false,
  50. ruleForm: {},
  51. rules: {
  52. temName: [
  53. { required: true, message: '请输入模板名称', trigger: 'blur' },
  54. ],
  55. temType: [
  56. { required: true, message: '请输入模板名称', trigger: 'blur' },
  57. ],
  58. identifyId: [
  59. { required: true, message: '请输入模板名称', trigger: 'blur' },
  60. ]
  61. }
  62. };
  63. },
  64. watch: {
  65. editData(val) {
  66. if (val) {
  67. this.ruleForm = val
  68. // let queryParams = {
  69. // pageNum: 1,
  70. // pageSize: 10000000000000000000000,
  71. // };
  72. // deptIdentifyList(queryParams).then(res => {
  73. // this.tempList = res.rows;
  74. // })
  75. // this.ruleForm = {}
  76. }
  77. }
  78. },
  79. created() {
  80. },
  81. methods: {
  82. cancel() {
  83. this.$emit("cancelAdd");
  84. },
  85. handleChange(file, fileList) {
  86. this.isImg = file.type === '.doc' || '.docx'
  87. },
  88. UploadUrl() {
  89. return window.location.origin + "/API/deptIdentify/insertTemplate";
  90. },
  91. submitUpload() {
  92. this.$refs['ruleForm'].validate((valid) => {
  93. if (valid) {
  94. this.filedata.identifyId = this.ruleForm.identifyId;
  95. this.filedata.temName = this.ruleForm.temName;
  96. if (this.isImg) {
  97. this.$refs.upload.submit();
  98. }else{
  99. this.$message.error('只能上传doc,docx格式的文件')
  100. }
  101. }
  102. });
  103. },
  104. handleRemove(file, fileList) {
  105. console.log(file, fileList);
  106. },
  107. beforeUpload(file) {
  108. // debugger
  109. // this.isImg = file.type === '.doc' || '.docx'
  110. },
  111. handleSuccess() {
  112. this.$message.success('上传成功');
  113. this.$emit("cancelAdd");
  114. this.$emit('getList', this.queryParams);
  115. }
  116. },
  117. };
  118. </script>
  119. <style lang="scss" scoped>
  120. ::v-deep .el-select {
  121. width: 100%;
  122. }
  123. </style>