| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- <template>
- <div>
- <el-dialog title="新增流程节点" :visible="addvisiable" v-if="addvisiable" @close="cancel" width="600px" center>
- <el-form :model="ruleForm" label-position="left" :rules="rules" ref="ruleForm" label-width="90px"
- class="demo-ruleForm">
- <el-form-item label="节点名称" prop="nodename">
- <el-select v-model="ruleForm.nodename" placeholder="请选择">
- <el-option v-for="dict in dict.type.template_type" :key="dict.value" :label="dict.label"
- :value="dict.value"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="案件状态" prop="casestatus">
- <el-input v-model="ruleForm.casestatus"></el-input>
- </el-form-item>
- <el-form-item label="驳回节点" prop="rejectnode">
- <el-select v-model="ruleForm.rejectnode" placeholder="请选择">
- <el-option v-for="item in tempList" :key="item.id" :label="item.identifyName" :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="关联角色" prop="associatedroles">
- <el-select v-model="ruleForm.associatedroles" placeholder="请选择">
- <el-option v-for="item in tempList" :key="item.id" :label="item.identifyName" :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="cancel" class="endbutton"><span>取 消</span></el-button>
- <el-button type="primary" @click="submitUpload" class="endbutton"><span>确认</span></el-button>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- // import {
- // deptIdentifyList,
- // } from "@/api/officialSeal/officialSeal.js";
- export default {
- props: ["addvisiable", "editData", "queryParams"],
- dicts: ["template_type"],
- data() {
- return {
- fileList: [],
- data: [],
- tempList: [],
- isImg:false,
- filedata: {},
- flagBtn: false,
- ruleForm: {},
- rules: {
- temName: [
- { required: true, message: '请输入模板名称', trigger: 'blur' },
- ],
- temType: [
- { required: true, message: '请输入模板名称', trigger: 'blur' },
- ],
- identifyId: [
- { required: true, message: '请输入模板名称', trigger: 'blur' },
- ]
- }
- };
- },
- watch: {
- editData(val) {
- if (val) {
- this.ruleForm = val
- // let queryParams = {
- // pageNum: 1,
- // pageSize: 10000000000000000000000,
- // };
- // deptIdentifyList(queryParams).then(res => {
- // this.tempList = res.rows;
- // })
- // this.ruleForm = {}
- }
- }
- },
- created() {
-
- },
- methods: {
- cancel() {
- this.$emit("cancelAdd");
- },
- handleChange(file, fileList) {
- this.isImg = file.type === '.doc' || '.docx'
- },
- UploadUrl() {
- return window.location.origin + "/API/deptIdentify/insertTemplate";
- },
- submitUpload() {
- this.$refs['ruleForm'].validate((valid) => {
- if (valid) {
- this.filedata.identifyId = this.ruleForm.identifyId;
- this.filedata.temName = this.ruleForm.temName;
- if (this.isImg) {
- this.$refs.upload.submit();
- }else{
- this.$message.error('只能上传doc,docx格式的文件')
- }
- }
- });
- },
- handleRemove(file, fileList) {
- console.log(file, fileList);
- },
- beforeUpload(file) {
- // debugger
- // this.isImg = file.type === '.doc' || '.docx'
- },
- handleSuccess() {
- this.$message.success('上传成功');
- this.$emit("cancelAdd");
- this.$emit('getList', this.queryParams);
- }
- },
- };
- </script>
-
- <style lang="scss" scoped>
- ::v-deep .el-select {
- width: 100%;
- }
- </style>
|