|
@ -28,6 +28,15 @@ |
|
|
placeholder="请输入转办意见,不超过500字" v-model="formData.content"></el-input> |
|
|
placeholder="请输入转办意见,不超过500字" v-model="formData.content"></el-input> |
|
|
</div> |
|
|
</div> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item style="display: block" label="附件" label-width="150px" prop="attach"> |
|
|
|
|
|
<el-upload :headers="$getElUploadHeaders()" class="upload-demo" :action="uploadUlr" |
|
|
|
|
|
accept=".doc,.pdf,.xls,.docx,.xlsx,.jpg,.png,.jpeg,.bmp,.mp4,.wma,.m4a,.mp3" |
|
|
|
|
|
:on-success="handleFileSuccess" :on-remove="handleFileRemove" :on-preview="handleFileDownload" |
|
|
|
|
|
:limit="3" :before-upload="beforeUpload" :file-list="fileList"> |
|
|
|
|
|
<el-button size="small" :disabled="fileList.length === 3" type="primary">点击上传</el-button> |
|
|
|
|
|
<div slot="tip" class="el-upload__tip">支持图片、word、pdf</div> |
|
|
|
|
|
</el-upload> |
|
|
|
|
|
</el-form-item> |
|
|
<el-form-item label="办结时限" prop="timeLimit" label-width="150px" :class="{ 'form-item': source === 'visiual' }" |
|
|
<el-form-item label="办结时限" prop="timeLimit" label-width="150px" :class="{ 'form-item': source === 'visiual' }" |
|
|
style="display: block"> |
|
|
style="display: block"> |
|
|
<div :class="{ 'visiual-form': source === 'visiual' }"> |
|
|
<div :class="{ 'visiual-form': source === 'visiual' }"> |
|
@ -55,7 +64,8 @@ export default { |
|
|
categoryId: "",//事件分类 |
|
|
categoryId: "",//事件分类 |
|
|
deptId: "", //指派部门 |
|
|
deptId: "", //指派部门 |
|
|
deptName: "", |
|
|
deptName: "", |
|
|
categoryList: [] |
|
|
categoryList: [], |
|
|
|
|
|
files: [] //附件 |
|
|
}, |
|
|
}, |
|
|
orgOptions: [], |
|
|
orgOptions: [], |
|
|
orgOptionProps: { |
|
|
orgOptionProps: { |
|
@ -71,6 +81,8 @@ export default { |
|
|
eventDetailCopy: {}, |
|
|
eventDetailCopy: {}, |
|
|
selCategoryArray: [], |
|
|
selCategoryArray: [], |
|
|
casOptions: [], |
|
|
casOptions: [], |
|
|
|
|
|
fileList: [], |
|
|
|
|
|
uploadUlr: window.SITE_CONFIG["apiURL"] + "/oss/file/uploadvariedfile", |
|
|
iscascaderShow: 0, |
|
|
iscascaderShow: 0, |
|
|
optionProps: { |
|
|
optionProps: { |
|
|
multiple: false, |
|
|
multiple: false, |
|
@ -92,8 +104,8 @@ export default { |
|
|
{ required: true, message: "办结时限不能为空", trigger: "blur" }, |
|
|
{ required: true, message: "办结时限不能为空", trigger: "blur" }, |
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
selCateObj:{ |
|
|
selCateObj: { |
|
|
id:"" |
|
|
id: "" |
|
|
}, |
|
|
}, |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
@ -126,7 +138,6 @@ export default { |
|
|
this.getCategoryList(); |
|
|
this.getCategoryList(); |
|
|
if (this.eventId) { |
|
|
if (this.eventId) { |
|
|
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData)); |
|
|
this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData)); |
|
|
console.log(this.eventDetailCopy); |
|
|
|
|
|
// 这一步接收到eventDetailCopy在这里回填 |
|
|
// 这一步接收到eventDetailCopy在这里回填 |
|
|
if (this.eventDetailCopy.parentCategoryId && this.eventDetailCopy.categoryId) { |
|
|
if (this.eventDetailCopy.parentCategoryId && this.eventDetailCopy.categoryId) { |
|
|
this.selCateObj.id = this.eventDetailCopy.categoryId |
|
|
this.selCateObj.id = this.eventDetailCopy.categoryId |
|
@ -181,7 +192,7 @@ export default { |
|
|
if (this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0]) { |
|
|
if (this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0]) { |
|
|
this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0].data |
|
|
this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0].data |
|
|
this.formData.categoryId = this.selCateObj.id |
|
|
this.formData.categoryId = this.selCateObj.id |
|
|
console.log(this.formData.categoryId,'this.formData.categoryId'); |
|
|
console.log(this.formData.categoryId, 'this.formData.categoryId'); |
|
|
} else { |
|
|
} else { |
|
|
this.selCateObj = {} |
|
|
this.selCateObj = {} |
|
|
} |
|
|
} |
|
@ -206,11 +217,13 @@ export default { |
|
|
if (!valid) { |
|
|
if (!valid) { |
|
|
app.util.validateRule(messageObj); |
|
|
app.util.validateRule(messageObj); |
|
|
} else { |
|
|
} else { |
|
|
console.log(this.selCateObj); |
|
|
|
|
|
if (!this.selCateObj || !this.selCateObj.id) { |
|
|
if (!this.selCateObj || !this.selCateObj.id) { |
|
|
this.$message.error("请选择事件分类"); |
|
|
this.$message.error("请选择事件分类"); |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
|
|
|
if(this.fileList){ |
|
|
|
|
|
this.formData.files = this.fileList |
|
|
|
|
|
} |
|
|
this.formData.status = "processing"; |
|
|
this.formData.status = "processing"; |
|
|
this.formData.categoryId = this.selCateObj.id; |
|
|
this.formData.categoryId = this.selCateObj.id; |
|
|
this.formData.categoryList = []; |
|
|
this.formData.categoryList = []; |
|
@ -222,6 +235,74 @@ export default { |
|
|
resetData() { |
|
|
resetData() { |
|
|
this.agencyIdArray = [] |
|
|
this.agencyIdArray = [] |
|
|
}, |
|
|
}, |
|
|
|
|
|
beforeUpload(file) { |
|
|
|
|
|
const array = file.name.split("."); |
|
|
|
|
|
const extension = array[array.length - 1]; |
|
|
|
|
|
const formatarray = [ |
|
|
|
|
|
"jpg", |
|
|
|
|
|
"png", |
|
|
|
|
|
"jpeg", |
|
|
|
|
|
"bmp", |
|
|
|
|
|
"mp4", |
|
|
|
|
|
"wma", |
|
|
|
|
|
"m4a", |
|
|
|
|
|
"mp3", |
|
|
|
|
|
"doc", |
|
|
|
|
|
"docx", |
|
|
|
|
|
"xls", |
|
|
|
|
|
"xlsx", |
|
|
|
|
|
"pdf", |
|
|
|
|
|
]; |
|
|
|
|
|
if (formatarray.indexOf(extension) === -1) { |
|
|
|
|
|
this.$message.error("只支持图片、word、pdf"); |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
handleFileRemove(file) { |
|
|
|
|
|
if (file && file.status === "success") { |
|
|
|
|
|
this.fileList.splice( |
|
|
|
|
|
this.fileList.findIndex((item) => item.uid === file.uid), |
|
|
|
|
|
1 |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
handleFileSuccess(res, file) { |
|
|
|
|
|
if (res.code === 0 && res.msg === "success") { |
|
|
|
|
|
const array = file.name.split("."); |
|
|
|
|
|
const fileType = array[array.length - 1]; |
|
|
|
|
|
const picArray = ["jpg", "png", "jpeg", "bmp"]; |
|
|
|
|
|
const videoarray = ["mp4", "wma", "m4a"]; |
|
|
|
|
|
const docArray = ["doc", "docx", "xls", "xlsx", "pdf"]; |
|
|
|
|
|
const mp3Array = ["mp3"]; |
|
|
|
|
|
|
|
|
|
|
|
if (picArray.indexOf(fileType) > -1) { |
|
|
|
|
|
file.attachmentFormat = "image"; |
|
|
|
|
|
} else if (videoarray.indexOf(fileType) > -1) { |
|
|
|
|
|
file.attachmentFormat = "video"; |
|
|
|
|
|
} else if (docArray.indexOf(fileType) > -1) { |
|
|
|
|
|
file.attachmentFormat = "doc"; |
|
|
|
|
|
} else if (mp3Array.indexOf(fileType) > -1) { |
|
|
|
|
|
file.attachmentFormat = "voice"; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
file.url = res.data.url; |
|
|
|
|
|
file.type = fileType; |
|
|
|
|
|
|
|
|
|
|
|
file.attachmentName = file.name; |
|
|
|
|
|
file.attachmentType = file.type; |
|
|
|
|
|
file.attachmentUrl = file.url; |
|
|
|
|
|
|
|
|
|
|
|
this.fileList.push(file); |
|
|
|
|
|
} else this.$message.error(res.msg); |
|
|
|
|
|
}, |
|
|
|
|
|
//下载 |
|
|
|
|
|
handleFileDownload(file) { |
|
|
|
|
|
var a = document.createElement("a"); |
|
|
|
|
|
var event = new MouseEvent("click"); |
|
|
|
|
|
a.download = file.name; |
|
|
|
|
|
a.href = file.url; |
|
|
|
|
|
a.dispatchEvent(event); |
|
|
|
|
|
}, |
|
|
// 开启加载动画 |
|
|
// 开启加载动画 |
|
|
startLoading() { |
|
|
startLoading() { |
|
|
loading = Loading.service({ |
|
|
loading = Loading.service({ |
|
|