调解机构管理模块
This commit is contained in:
@@ -0,0 +1,124 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog :title="title" :visible="operateVisable" v-if="operateVisable" @close="cancel" width="600px" center
|
||||
:distroy-on-close="true">
|
||||
|
||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="130px" class="demo-ruleForm">
|
||||
<el-form-item label="机构名称" prop="identifyName">
|
||||
<el-input v-model="ruleForm.identifyName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="机构邮箱" prop="identifyEmail">
|
||||
<el-input v-model="ruleForm.identifyEmail"></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="经办人姓名" prop="operName">
|
||||
<el-input v-model="ruleForm.operName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="经办人用户名" prop="operUserName">
|
||||
<el-input v-model="ruleForm.operUserName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="经办人手机号" prop="operPhone">
|
||||
<el-input v-model="ruleForm.operPhone"></el-input>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="机构信用代码" prop="creditCode">
|
||||
<el-input v-model="ruleForm.creditCode"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="法人姓名" prop="legalPerName">
|
||||
<el-input v-model="ruleForm.legalPerName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="法人手机号" prop="legalPerPhone">
|
||||
<el-input v-model="ruleForm.legalPerPhone"></el-input>
|
||||
</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="submitForm" class="endbutton"><span>确认</span></el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
insert,
|
||||
} from "@/api/officialSeal/officialSeal.js";
|
||||
import { listUser } from '@/api/system/user.js'
|
||||
export default {
|
||||
props: ["operateVisable", "queryParams"],
|
||||
data() {
|
||||
return {
|
||||
title: "新增机构",
|
||||
ruleForm: {},
|
||||
rules: {
|
||||
identifyName: [
|
||||
{ required: true, message: '请输入机构名称', trigger: 'blur' },
|
||||
],
|
||||
// operName: [
|
||||
// { required: true, message: '请输入经办人姓名', trigger: 'blur' },
|
||||
// ],
|
||||
// operPhone: [
|
||||
// { required: true, message: '请输入经办人手机号', trigger: 'blur' },
|
||||
// { pattern: /^[1][3,4,5,6,7,8,9][0-9]{9}$/, message: '请输入正确的手机号码', trigger: 'blur', },
|
||||
// ],
|
||||
creditCode: [
|
||||
{ required: true, message: '请输入机构信用代码', trigger: 'blur' },
|
||||
],
|
||||
legalPerName: [
|
||||
{ required: true, message: '请输入法人姓名', trigger: 'blur' },
|
||||
],
|
||||
legalPerPhone: [
|
||||
{ required: true, message: '请输入法人手机号', trigger: 'blur' },
|
||||
{ pattern: /^[1][3,4,5,6,7,8,9][0-9]{9}$/, message: '请输入正确的手机号码', trigger: 'blur', },
|
||||
],
|
||||
// operUserName: [
|
||||
// { required: true, message: '请输入经办人用户名', trigger: 'blur' },
|
||||
// ],
|
||||
identifyEmail: [
|
||||
{ required: true, message: '请输入邮箱', trigger: 'blur' },
|
||||
{ type: 'email', message: '请输入正确的邮箱地址', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
operateVisable(val) {
|
||||
if (val) {
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 新增部门
|
||||
insertFn(data) {
|
||||
insert(data).then(res => {
|
||||
this.$modal.msgSuccess("新增成功!");
|
||||
this.$emit("cancelFilingreview");
|
||||
this.$emit('getList', this.queryParams);
|
||||
})
|
||||
},
|
||||
// 提交form表单
|
||||
submitForm() {
|
||||
this.$refs['ruleForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.insertFn(this.ruleForm)
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
cancel() {
|
||||
this.$emit("cancelFilingreview");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.steps {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.radiobox {
|
||||
margin-top: 30px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,94 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog title="新增模板" :visible="uploadVisable" v-if="uploadVisable" @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="name">
|
||||
<el-input v-model="ruleForm.name"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="模板类型" prop="type">
|
||||
<el-select v-model="ruleForm.type" placeholder="请选择">
|
||||
<el-option v-for="dict in dict.type.manager_type" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="模板内容" prop="content">
|
||||
<el-input type="textarea" placeholder="请输入内容" v-model="ruleForm.content">
|
||||
</el-input>
|
||||
</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 { getToken } from "@/utils/auth";
|
||||
import {
|
||||
insertManager,
|
||||
} from "@/api/officialSeal/officialSeal.js";
|
||||
export default {
|
||||
props: ["uploadVisable", "uploadData", "queryParams"],
|
||||
dicts: ["manager_type"],
|
||||
data() {
|
||||
return {
|
||||
fileList: [],
|
||||
data: [],
|
||||
tempList: [],
|
||||
isImg: false,
|
||||
headers: {
|
||||
Authorization: "Bearer " + getToken(),
|
||||
},
|
||||
filedata: {},
|
||||
flagBtn: false,
|
||||
ruleForm: {},
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: '请输入模板名称', trigger: 'blur' },
|
||||
],
|
||||
type: [
|
||||
{ required: true, message: '请输入模板名称', trigger: 'blur' },
|
||||
],
|
||||
content: [
|
||||
{ required: true, message: '请输入模板名称', trigger: 'blur' },
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
uploadVisable(val) {
|
||||
if (val) {
|
||||
this.ruleForm = {};
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
cancel() {
|
||||
this.$emit("cancelUpload");
|
||||
},
|
||||
// 新增模板
|
||||
insertManagerFn(data) {
|
||||
insertManager(data).then(res => {
|
||||
this.$message.success('新增成功');
|
||||
this.$emit("cancelUpload");
|
||||
this.$emit('getList', this.queryParams);
|
||||
})
|
||||
},
|
||||
submitUpload() {
|
||||
this.$refs['ruleForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
console.log(this.ruleForm, "LLLLLLLLLLLLLLLLLLLLLLL");
|
||||
this.insertManagerFn(this.ruleForm)
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -0,0 +1,123 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog title="新增模板" :visible="uploadVisable" v-if="uploadVisable" @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="temName">
|
||||
<el-input v-model="ruleForm.temName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="模板类型" prop="temType">
|
||||
<el-select v-model="ruleForm.temType" 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="identifyId">
|
||||
<el-select v-model="ruleForm.identifyId" 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>
|
||||
<el-upload class="avatar-uploader" :before-upload="beforeUpload" :on-success="handleSuccess" ref="upload"
|
||||
:action="UploadUrl()" :headers="headers" :data="filedata" :on-remove="handleRemove"
|
||||
:on-change="handleChange" accept=".doc,.docx" :file-list="fileList" :auto-upload="false">
|
||||
<el-button size="small" type="primary">选择模板文件</el-button>
|
||||
</el-upload>
|
||||
<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 { getToken } from "@/utils/auth";
|
||||
import {
|
||||
deptIdentifyList,
|
||||
} from "@/api/officialSeal/officialSeal.js";
|
||||
export default {
|
||||
props: ["uploadVisable", "uploadData", "queryParams"],
|
||||
dicts: ["template_type"],
|
||||
data() {
|
||||
return {
|
||||
fileList: [],
|
||||
data: [],
|
||||
tempList: [],
|
||||
isImg:false,
|
||||
headers: {
|
||||
Authorization: "Bearer " + getToken(),
|
||||
},
|
||||
filedata: {},
|
||||
flagBtn: false,
|
||||
ruleForm: {},
|
||||
rules: {
|
||||
temName: [
|
||||
{ required: true, message: '请输入模板名称', trigger: 'blur' },
|
||||
],
|
||||
temType: [
|
||||
{ required: true, message: '请输入模板名称', trigger: 'blur' },
|
||||
],
|
||||
identifyId: [
|
||||
{ required: true, message: '请输入模板名称', trigger: 'blur' },
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
uploadVisable(val) {
|
||||
if (val) {
|
||||
let queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10000000000000000000000,
|
||||
};
|
||||
deptIdentifyList(queryParams).then(res => {
|
||||
this.tempList = res.rows;
|
||||
})
|
||||
this.ruleForm = {}
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
cancel() {
|
||||
this.$emit("cancelUpload");
|
||||
},
|
||||
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("cancelUpload");
|
||||
this.$emit('getList', this.queryParams);
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -0,0 +1,90 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog title="修改模板" :visible="editVisable" v-if="editVisable" @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="name">
|
||||
<el-input v-model="ruleForm.name"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="模板类型" prop="type">
|
||||
<el-select v-model="ruleForm.type" placeholder="请选择">
|
||||
<el-option v-for="dict in dict.type.manager_type" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="模板内容" prop="content">
|
||||
<el-input type="textarea" placeholder="请输入内容" v-model="ruleForm.content">
|
||||
</el-input>
|
||||
</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 { updateManager } from "@/api/officialSeal/officialSeal"
|
||||
export default {
|
||||
props: ["editVisable", "editData", "queryParams"],
|
||||
dicts: ["manager_type"],
|
||||
data() {
|
||||
return {
|
||||
data: [],
|
||||
flagBtn: false,
|
||||
ruleForm: {},
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: '请输入模板名称', trigger: 'blur' },
|
||||
],
|
||||
type: [
|
||||
{ required: true, message: '请输入模板名称', trigger: 'blur' },
|
||||
],
|
||||
content: [
|
||||
{ required: true, message: '请输入模板名称', trigger: 'blur' },
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
editData(val) {
|
||||
if (val) {
|
||||
this.ruleForm = val;
|
||||
this.fileList = [];
|
||||
this.ruleForm.type = this.ruleForm.type + '';
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
cancel() {
|
||||
this.$emit("cancelEdit");
|
||||
},
|
||||
// 修改模板
|
||||
updateManagerFn(data) {
|
||||
updateManager(data).then(res => {
|
||||
this.$message.success('修改成功');
|
||||
this.$emit("cancelEdit");
|
||||
this.$emit('getList', this.queryParams);
|
||||
})
|
||||
},
|
||||
submitUpload() {
|
||||
this.$refs['ruleForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.updateManagerFn({
|
||||
name: this.ruleForm.name,
|
||||
content: this.ruleForm.content,
|
||||
type: this.ruleForm.type,
|
||||
id:this.ruleForm.id
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -0,0 +1,127 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog title="修改模板" :visible="editVisable" v-if="editVisable" @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="temName">
|
||||
<el-input v-model="ruleForm.temName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="模板类型" prop="temType">
|
||||
<el-select v-model="ruleForm.temType" 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="当前模板">
|
||||
<span style="color: #0e5ce3;cursor:pointer" @click="openUrl(editData.temOrigPath)">{{ editData.fileName
|
||||
}}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-upload class="avatar-uploader" :before-upload="beforeUpload" :on-success="handleSuccess" ref="upload"
|
||||
:action="UploadUrl()" :headers="headers" :data="filedata" :on-remove="handleRemove"
|
||||
:on-change="handleChange" accept=".doc,.docx" :file-list="fileList" :auto-upload="false">
|
||||
<el-button size="small" type="primary">选择模板文件</el-button>
|
||||
</el-upload>
|
||||
<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 { getToken } from "@/utils/auth";
|
||||
import { updateTemplate } from "@/api/officialSeal/officialSeal"
|
||||
export default {
|
||||
props: ["editVisable", "editData", "queryParams"],
|
||||
dicts: ["template_type"],
|
||||
data() {
|
||||
return {
|
||||
fileList: [],
|
||||
data: [],
|
||||
headers: {
|
||||
Authorization: "Bearer " + getToken(),
|
||||
},
|
||||
isImg: true,
|
||||
filedata: {},
|
||||
flagBtn: false,
|
||||
ruleForm: {},
|
||||
rules: {
|
||||
temName: [
|
||||
{ required: true, message: '请输入模板名称', trigger: 'blur' },
|
||||
],
|
||||
temType: [
|
||||
{ required: true, message: '请输入模板名称', trigger: 'blur' },
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
editData(val) {
|
||||
if (val) {
|
||||
this.ruleForm = val;
|
||||
this.fileList = [];
|
||||
this.ruleForm.temType = this.ruleForm.temType + '';
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 打开链接
|
||||
openUrl(urlTemp) {
|
||||
let headPath = window.location.origin + "/API/";
|
||||
window.open(headPath + urlTemp);
|
||||
},
|
||||
cancel() {
|
||||
this.$emit("cancelEdit");
|
||||
},
|
||||
handleChange(file, fileList) {
|
||||
this.isImg = file.type === '.doc' || '.docx';
|
||||
this.fileList = fileList;
|
||||
},
|
||||
UploadUrl() {
|
||||
return window.location.origin + "/API/deptIdentify/updateTemplate";
|
||||
},
|
||||
submitUpload() {
|
||||
let that = this;
|
||||
this.$refs['ruleForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (that.fileList.length > 0) {
|
||||
that.filedata.id = that.editData.id;
|
||||
that.filedata.temName = that.ruleForm.temName;
|
||||
if (that.isImg) {
|
||||
that.$refs.upload.submit();
|
||||
} else {
|
||||
that.$message.error('只能上传doc,docx格式的文件')
|
||||
}
|
||||
} else {
|
||||
updateTemplate({
|
||||
id: that.editData.id,
|
||||
temName: that.ruleForm.temName
|
||||
}).then(res => {
|
||||
that.$message.success('修改成功');
|
||||
that.$emit("cancelEdit");
|
||||
that.$emit('getList', that.queryParams);
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
handleRemove(file, fileList) {
|
||||
console.log(file, fileList);
|
||||
},
|
||||
beforeUpload(file) {
|
||||
// this.isImg = file.type === '.doc' || '.docx'
|
||||
},
|
||||
handleSuccess() {
|
||||
this.$message.success('修改成功');
|
||||
this.$emit("cancelEdit");
|
||||
this.$emit('getList', this.queryParams);
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -0,0 +1,112 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog :title="title" :visible="editVisable" v-if="editVisable" @close="cancel" width="600px" center
|
||||
:distroy-on-close="true">
|
||||
<el-form :model="editForm" :rules="rules" ref="editForm" label-width="130px" class="demo-editForm">
|
||||
<el-form-item label="机构名称" prop="identifyName">
|
||||
<el-input v-model="editForm.identifyName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="机构邮箱" prop="identifyEmail">
|
||||
<el-input v-model="editForm.identifyEmail"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="机构信用代码" prop="creditCode">
|
||||
<el-input v-model="editForm.creditCode"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="法人姓名" prop="legalPerName">
|
||||
<el-input v-model="editForm.legalPerName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="法人手机号" prop="legalPerPhone">
|
||||
<el-input v-model="editForm.legalPerPhone"></el-input>
|
||||
</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="submitForm" class="endbutton"><span>确认</span></el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
sealUpdate
|
||||
} from "@/api/officialSeal/officialSeal.js";
|
||||
export default {
|
||||
props: ["editVisable","editData","queryParams"],
|
||||
data() {
|
||||
return {
|
||||
title: "修改机构",
|
||||
editForm: {},
|
||||
rules: {
|
||||
identifyName: [
|
||||
{ required: true, message: '请输入机构名称', trigger: 'blur' },
|
||||
],
|
||||
creditCode: [
|
||||
{ required: true, message: '请输入机构信用代码', trigger: 'blur' },
|
||||
],
|
||||
legalPerName: [
|
||||
{ required: true, message: '请输入法人姓名', trigger: 'blur' },
|
||||
],
|
||||
legalPerPhone: [
|
||||
{ required: true, message: '请输入法人手机号', trigger: 'blur' },
|
||||
{ pattern: /^[1][3,4,5,6,7,8,9][0-9]{9}$/, message: '请输入正确的手机号码', trigger: 'blur', },
|
||||
],
|
||||
// operUserName: [
|
||||
// { required: true, message: '请输入经办人用户名', trigger: 'blur' },
|
||||
// ],
|
||||
identifyEmail: [
|
||||
{ required: true, message: '请输入邮箱', trigger: 'blur' },
|
||||
{ type: 'email', message: '请输入正确的邮箱地址', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
editVisable(val) {
|
||||
if (val) {
|
||||
this.editForm = this.editData;
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 编辑
|
||||
sealUpdateFn(data) {
|
||||
sealUpdate(data).then(res => {
|
||||
this.$modal.msgSuccess("修改成功!");
|
||||
this.$emit("cancelEdit");
|
||||
this.$emit('getList',this.queryParams);
|
||||
})
|
||||
},
|
||||
// 提交form表单
|
||||
submitForm() {
|
||||
this.$refs['editForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.sealUpdateFn({
|
||||
identifyName:this.editForm.identifyName,
|
||||
operName:this.editForm.operName,
|
||||
operPhone:this.editForm.operPhone,
|
||||
id:this.editForm.id,
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
cancel() {
|
||||
this.$emit("cancelEdit");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.steps {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.radiobox {
|
||||
margin-top: 30px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,288 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog title="设置抓取规则" :visible="rulesVisable" v-if="rulesVisable" @close="cancelRules"
|
||||
append-to-body :destroy-on-close="true" center>
|
||||
<el-button type="primary" icon="el-icon-plus" style="margin-bottom: 20px;"
|
||||
@click="addForm">新增系统内置抓取规则</el-button>
|
||||
<div class="formDom">
|
||||
<el-form ref="form" :model="formData" label-width="150px">
|
||||
<div class="formItem" v-for="(item, index) in formData.forms" :key="item.key">
|
||||
<el-button type="primary" icon="el-icon-delete" style="margin-bottom: 20px;"
|
||||
@click="deleteForm(item)">删除</el-button>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="抓取文件名:" :prop="'forms.' + index + '.fileName'" :rules="[
|
||||
{
|
||||
required: true,
|
||||
message: '抓取文件名不能为空',
|
||||
},
|
||||
]">
|
||||
<el-input v-model="item.fileName" placeholder="请输入抓取文件名" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="字段名:" :prop="'forms.' + index + '.columnName'" :rules="[
|
||||
{
|
||||
required: true,
|
||||
message: '字段名不能为空',
|
||||
},
|
||||
]">
|
||||
<el-select v-model="item.columnName" placeholder="请选择" @change="columnNameChange(item)">
|
||||
<el-option v-for="dict in dict.type.case_built_type" :key="dict.value"
|
||||
:label="dict.label" :value="dict.label"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开始抓取字段:" :prop="'forms.' + index + '.startContent'">
|
||||
<el-input v-model="item.startContent" placeholder="请输入开始抓取字段" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="结束抓取字段:" :prop="'forms.' + index + '.endContent'">
|
||||
<el-input v-model="item.endContent" placeholder="结束抓取字段" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="指定抓取开始位置:" :prop="'forms.' + index + '.startContentRepeatOrder'">
|
||||
<el-input-number v-model="item.startContentRepeatOrder" controls-position="right" :min="1"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="指定抓取结束位置:" :prop="'forms.' + index + '.endContentRepeatOrder'">
|
||||
<el-input-number v-model="item.endContentRepeatOrder" controls-position="right" :min="1"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="抓取方向:" :prop="'forms.' + index + '.fatchOrder'">
|
||||
<el-select v-model="item.fatchOrder" placeholder="请选择">
|
||||
<el-option v-for="dict in fatchOrderList" :key="dict.key"
|
||||
:label="dict.name" :value="dict.key"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-button type="primary" icon="el-icon-plus" style="margin-bottom: 20px;"
|
||||
@click="addFormCustom">新增自定义抓取规则</el-button>
|
||||
<div class="formDom">
|
||||
<el-form ref="form_custom" :model="formData_custom" label-width="150px">
|
||||
<div class="formItem" v-for="(item, index) in formData_custom.forms" :key="item.key">
|
||||
<el-button type="primary" icon="el-icon-delete" style="margin-bottom: 20px;"
|
||||
@click="deleteFormCustom(item)">删除</el-button>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="字段:" :prop="'forms.' + index + '.column'" :rules="[
|
||||
{
|
||||
required: true,
|
||||
message: '字段不能为空',
|
||||
},
|
||||
]">
|
||||
<el-input v-model="item.column" placeholder="请输入字段" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="字段名:" :prop="'forms.' + index + '.columnName'" :rules="[
|
||||
{
|
||||
required: true,
|
||||
message: '字段名不能为空',
|
||||
},
|
||||
]">
|
||||
<el-input v-model="item.columnName" placeholder="请输入字段名" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="抓取文件名:" :prop="'forms.' + index + '.fileName'" :rules="[
|
||||
{
|
||||
required: true,
|
||||
message: '抓取文件名不能为空',
|
||||
},
|
||||
]">
|
||||
<el-input v-model="item.fileName" placeholder="请输入抓取文件名" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开始抓取字段:" :prop="'forms.' + index + '.startContent'">
|
||||
<el-input v-model="item.startContent" placeholder="请输入开始抓取字段" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="结束抓取字段:" :prop="'forms.' + index + '.endContent'">
|
||||
<el-input v-model="item.endContent" placeholder="结束抓取字段" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="指定抓取开始位置:" :prop="'forms.' + index + '.startContentRepeatOrder'">
|
||||
<el-input-number v-model="item.startContentRepeatOrder" controls-position="right" :min="1"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="指定抓取结束位置:" :prop="'forms.' + index + '.endContentRepeatOrder'">
|
||||
<el-input-number v-model="item.endContentRepeatOrder" controls-position="right" :min="1"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="抓取方向:" :prop="'forms.' + index + '.fatchOrder'">
|
||||
<el-select v-model="item.fatchOrder" placeholder="请选择">
|
||||
<el-option v-for="dict in fatchOrderList" :key="dict.key"
|
||||
:label="dict.name" :value="dict.key"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="cancelRules" class="endbutton"><span>取 消</span></el-button>
|
||||
<el-button type="primary" @click="submitRules" class="endbutton"><span>确认</span></el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
getFatchRuleByTemplateid,
|
||||
saveFatchRules
|
||||
} from "@/api/officialSeal/officialSeal.js";
|
||||
export default {
|
||||
props: ["rulesVisable", "rulesData", "queryParams"],
|
||||
dicts: ["case_built_type"],
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
forms: [{
|
||||
// fileName: "",
|
||||
// startContent: '',
|
||||
// endContent: '',
|
||||
// column: "",
|
||||
// columnName: "",
|
||||
}]
|
||||
},
|
||||
formData_custom: {
|
||||
forms: []
|
||||
},
|
||||
fatchOrderList: [
|
||||
{
|
||||
name:'从前向后抓取',
|
||||
key:0
|
||||
},
|
||||
{
|
||||
name:'从后往前抓取',
|
||||
key:1
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
rulesData(val) {
|
||||
if (val) {
|
||||
this.formData.forms = [];
|
||||
this.formData_custom.forms = [];
|
||||
this.getFatchRuleByTemplateidFn({ id: val.id })
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
cancelRules() {
|
||||
this.$emit("cancelRules");
|
||||
},
|
||||
addForm() {
|
||||
this.formData.forms.push({
|
||||
fileName: "",
|
||||
startContent: '',
|
||||
endContent: '',
|
||||
column: "",
|
||||
columnName: "",
|
||||
isDefault: 0
|
||||
});
|
||||
},
|
||||
deleteForm(item) {
|
||||
var index = this.formData.forms.indexOf(item)
|
||||
if (index !== -1) {
|
||||
this.formData.forms.splice(index, 1)
|
||||
}
|
||||
},
|
||||
deleteFormCustom(item) {
|
||||
var index = this.formData_custom.forms.indexOf(item)
|
||||
if (index !== -1) {
|
||||
this.formData_custom.forms.splice(index, 1)
|
||||
}
|
||||
},
|
||||
addFormCustom() {
|
||||
this.formData_custom.forms.push({
|
||||
fileName: "",
|
||||
startContent: '',
|
||||
endContent: '',
|
||||
column: "",
|
||||
columnName: "",
|
||||
isDefault: 1
|
||||
});
|
||||
},
|
||||
columnNameChange(item){
|
||||
let result = this.dict.type.case_built_type.find((data=>{
|
||||
return data.label == item.columnName
|
||||
}))
|
||||
item.column = result.value;
|
||||
},
|
||||
submitRules() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.$refs['form_custom'].validate((valid_custom) => {
|
||||
if (valid_custom) {
|
||||
let paramsList = this.formData.forms.concat(this.formData_custom.forms)
|
||||
this.saveFatchRulesFn({
|
||||
id: this.rulesData.id,
|
||||
fatchRules: paramsList
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
// 根据id获取抓取规则
|
||||
getFatchRuleByTemplateidFn(data) {
|
||||
getFatchRuleByTemplateid(data).then(res => {
|
||||
// this.formData.forms = res.data;
|
||||
// this.selectList = res.data
|
||||
this.formData.forms = [];
|
||||
this.formData_custom.forms = [];
|
||||
console.log(res.data,"LLLLLLLLLLLLLLLLLLLLLLLLLLLL");
|
||||
res.data.forEach(item => {
|
||||
if(item.isDefault == 0){
|
||||
this.formData.forms.push(item)
|
||||
}else if(item.isDefault == 1){
|
||||
this.formData_custom.forms.push(item)
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
// 提交抓取规则
|
||||
saveFatchRulesFn(data) {
|
||||
saveFatchRules(data).then(res => {
|
||||
this.$message.success('提交成功');
|
||||
this.$emit("cancelRules");
|
||||
this.$emit('getList', this.queryParams);
|
||||
})
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-form {
|
||||
border: 1px solid #c2bcbc;
|
||||
padding: 20px;
|
||||
margin-bottom: 15px;
|
||||
max-height: 300px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.el-input-number{
|
||||
width: 180px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,117 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog title="公章列表" :visible="sealVisable" @close="cancel" width="800px" center :distroy-on-close="true">
|
||||
<el-table v-loading="loading" :data="dataList" style="width: 100%">
|
||||
<el-table-column label="序号" type="index" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{
|
||||
(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="印章名称" align="center" prop="sealName"
|
||||
:show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column label="印章图片" align="center" prop="annexPath">
|
||||
<template slot-scope="scope">
|
||||
<el-image style="width: 40px; height: 40px;" :src="imgUrl + scope.row.annexPath"
|
||||
:preview-src-list="[imgUrl + scope.row.annexPath]">
|
||||
</el-image>
|
||||
<!-- <span>{{ imgUrl + scope.row.annexPath }}</span> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否启用" align="center" prop="sealStatus">
|
||||
<template slot-scope="scope">
|
||||
<el-tag type="success" v-if="scope.row.isUse == 1">已启用</el-tag>
|
||||
<el-tag type="info"
|
||||
v-if="(scope.row.isUse == 0 || scope.row.isUse == null) && scope.row.sealStatus !== 0">未启用</el-tag>
|
||||
<el-tag type="danger" v-if="scope.row.sealStatus == 0">审核中</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" @click="isUseChange(scope.row.id, 1)" type="text" icon="el-icon-thumb"
|
||||
v-if="(scope.row.isUse == 0 || scope.row.isUse == null) && scope.row.sealStatus !== 0">启用</el-button>
|
||||
<el-button size="mini" @click="isUseChange(scope.row.id, 0)" type="text" icon="el-icon-thumb"
|
||||
v-if="scope.row.isUse == 1">禁用</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize" @pagination="sealListFn(queryParams)" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
sealList,
|
||||
updateSealLockStatus
|
||||
} from "@/api/officialSeal/officialSeal.js";
|
||||
export default {
|
||||
props: ["sealVisable", "sealData"],
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
srcList: [],
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
dataList: [
|
||||
|
||||
],
|
||||
total: 0,
|
||||
imgUrl: ""
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
sealVisable(val) {
|
||||
if (val) {
|
||||
this.queryParams.id = this.sealData.id;
|
||||
this.sealListFn(this.queryParams)
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.UploadUrl()
|
||||
},
|
||||
methods: {
|
||||
UploadUrl() {
|
||||
this.imgUrl = window.location.origin + '/API';
|
||||
},
|
||||
// 查询列表数据
|
||||
sealListFn(data) {
|
||||
this.loading = true;
|
||||
sealList(data).then(res => {
|
||||
this.dataList = res.rows;
|
||||
this.total = res.total;
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
// 更新公章状态
|
||||
updateSealLockStatusFn(data) {
|
||||
updateSealLockStatus(data).then(res => {
|
||||
this.$message.success('更新状态成功');
|
||||
this.sealListFn(this.queryParams);
|
||||
})
|
||||
},
|
||||
// 启用或者禁用公章
|
||||
isUseChange(id, type) {
|
||||
let params = {
|
||||
id: id,
|
||||
isUse: type
|
||||
}
|
||||
this.$modal
|
||||
.confirm("是否更改状态")
|
||||
.then((res) => {
|
||||
this.updateSealLockStatusFn(params);
|
||||
})
|
||||
},
|
||||
cancel() {
|
||||
this.$emit("cancelSeal");
|
||||
},
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -0,0 +1,58 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog :title="title" :visible="listVisable" v-if="listVisable" @close="cancel" width="800px" center
|
||||
:distroy-on-close="true">
|
||||
<el-table v-loading="loading" :data="dataList" style="width: 100%">
|
||||
<el-table-column label="字段" align="center" prop="column" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="字段名" align="center" prop="columnName" :show-overflow-tooltip="true" />
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="cancel" class="endbutton"><span>取 消</span></el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
getTemplateInfoById
|
||||
} from "@/api/officialSeal/officialSeal.js";
|
||||
export default {
|
||||
props: ["listVisable", "listData", "queryParams"],
|
||||
data() {
|
||||
return {
|
||||
title: "模板字段列表",
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
dataList:[]
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
listData(val) {
|
||||
if (val) {
|
||||
getTemplateInfoById({ id: val.id }).then(res=>{
|
||||
this.dataList = res.data;
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
cancel() {
|
||||
this.$emit("cancelList");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.steps {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.radiobox {
|
||||
margin-top: 30px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,128 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog title="上传公章" :visible="uploadVisable" v-if="uploadVisable" @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="sealName">
|
||||
<el-input v-model="ruleForm.sealName"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-upload class="avatar-uploader" accept="image/png" :before-upload="beforeUpload" :on-success="handleSuccess" ref="upload"
|
||||
:action="UploadUrl()" :headers="headers" :data="filedata" :on-remove="handleRemove"
|
||||
:on-change="handleChange" :show-file-list="false" :file-list="fileList" :auto-upload="false">
|
||||
<img v-if="imageUrl" :src="imageUrl" class="avatar">
|
||||
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
||||
</el-upload>
|
||||
<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 { getToken } from "@/utils/auth";
|
||||
export default {
|
||||
props: ["uploadVisable", "uploadData"],
|
||||
data() {
|
||||
return {
|
||||
fileList: [],
|
||||
data: [],
|
||||
headers: {
|
||||
Authorization: "Bearer " + getToken(),
|
||||
},
|
||||
filedata: {
|
||||
id: this.uploadData.id
|
||||
},
|
||||
flagBtn: false,
|
||||
imageUrl: "",
|
||||
ruleForm: {},
|
||||
rules: {
|
||||
sealName: [
|
||||
{ required: true, message: '请输入印章名称', trigger: 'blur' },
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
uploadVisable(val) {
|
||||
if (val) {
|
||||
this.imageUrl = "",
|
||||
this.ruleForm = {}
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
cancel() {
|
||||
this.$emit("cancelUpload");
|
||||
},
|
||||
handleChange(file, fileList) {
|
||||
this.imageUrl = URL.createObjectURL(file.raw);
|
||||
},
|
||||
UploadUrl() {
|
||||
return window.location.origin + "/API/deptIdentify/sealUpload";
|
||||
},
|
||||
submitUpload() {
|
||||
this.$refs['ruleForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.filedata.id = this.uploadData.id;
|
||||
this.filedata.sealName = this.ruleForm.sealName;
|
||||
this.$refs.upload.submit();
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
handleRemove(file, fileList) {
|
||||
console.log(file, fileList);
|
||||
},
|
||||
beforeUpload(file) {
|
||||
const isImg = file.type === 'image/png'
|
||||
if (!isImg) {
|
||||
this.$message.error('只能上传图片格式的文件')
|
||||
}
|
||||
return isImg
|
||||
},
|
||||
handleSuccess(response) {
|
||||
if (response.code == 200) {
|
||||
this.$message.success('上传成功');
|
||||
this.cancel()
|
||||
} else {
|
||||
this.$message.error(response.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .avatar-uploader .el-upload {
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
border: 1px dashed #d9d9d9;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
margin-left: 90px;
|
||||
}
|
||||
|
||||
::v-deep .avatar-uploader .el-upload:hover {
|
||||
border-color: #409EFF;
|
||||
}
|
||||
|
||||
::v-deep .avatar-uploader-icon {
|
||||
font-size: 28px;
|
||||
color: #8c939d;
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
line-height: 178px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
::v-deep .avatar {
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user