|
|
|
@ -172,7 +172,9 @@
|
|
|
|
|
>导出</el-button
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
<el-button type="primary" size="mini" @click="importFiles">导入</el-button>
|
|
|
|
|
<el-button type="primary" size="mini" @click="importFiles"
|
|
|
|
|
>导入</el-button
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
<el-button type="success" size="mini" @click="enable" :disabled="multiple"
|
|
|
|
|
>启用</el-button
|
|
|
|
@ -300,6 +302,40 @@
|
|
|
|
|
<el-form-item label="舆情状态" prop="yqState">
|
|
|
|
|
<el-input v-model="form.yqState" placeholder="请输入舆情状态" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="上传文件">
|
|
|
|
|
<div class="updataFile">
|
|
|
|
|
<div class="fileHeader">
|
|
|
|
|
<!-- <div class="names">文件名称</div> -->
|
|
|
|
|
<div class="urls">文件路径(完整路径)</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div @click="addFile" class="fileIcon">
|
|
|
|
|
<i class="el-icon-circle-plus-outline"></i>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
class="main-file"
|
|
|
|
|
v-for="(item, index) in fileNameS"
|
|
|
|
|
:key="index"
|
|
|
|
|
>
|
|
|
|
|
<div class="fileItems">
|
|
|
|
|
<!-- <div class="names">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="item.fileName"
|
|
|
|
|
placeholder="请输入文件名称"
|
|
|
|
|
/>
|
|
|
|
|
</div> -->
|
|
|
|
|
<div class="urls">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="item.fileUrl"
|
|
|
|
|
placeholder="请输入文件路径(完整路径)"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div @click="removeFile(index)" class="fileIcon">
|
|
|
|
|
<i class="el-icon-remove-outline"></i>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
|
|
<el-input v-model="form.remark" placeholder="请输入备注" />
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -345,7 +381,16 @@
|
|
|
|
|
<el-descriptions-item label="舆情状态">{{
|
|
|
|
|
form.yqState
|
|
|
|
|
}}</el-descriptions-item>
|
|
|
|
|
|
|
|
|
|
<el-descriptions-item :span="2" label="文件路径(完整路径)">
|
|
|
|
|
<a
|
|
|
|
|
style="text-decoration: underline; color: rgb(24, 144, 255)"
|
|
|
|
|
v-for="(item, index) in files(form.fileUrl)"
|
|
|
|
|
target="_blank"
|
|
|
|
|
:key="index"
|
|
|
|
|
:href="item"
|
|
|
|
|
>{{ item }} , </a
|
|
|
|
|
>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="备注">{{
|
|
|
|
|
form.remark
|
|
|
|
|
}}</el-descriptions-item>
|
|
|
|
@ -473,22 +518,53 @@ export default {
|
|
|
|
|
// 表单校验
|
|
|
|
|
rules: {
|
|
|
|
|
// areaId: [{ required: true, message: "请选择区域", trigger: "blur" }],
|
|
|
|
|
isStatus: [{ required: true, message: "请选择启动/禁用", trigger: "blur" }],
|
|
|
|
|
yqTitle: [{ required: true, message: "舆情标题不能为空", trigger: "blur" }],
|
|
|
|
|
isStatus: [
|
|
|
|
|
{ required: true, message: "请选择启动/禁用", trigger: "blur" },
|
|
|
|
|
],
|
|
|
|
|
yqTitle: [
|
|
|
|
|
{ required: true, message: "舆情标题不能为空", trigger: "blur" },
|
|
|
|
|
],
|
|
|
|
|
depName: [{ required: true, message: "部门名称", trigger: "blur" }],
|
|
|
|
|
yqState: [{ required: true, message: "请输入舆情状态", trigger: "blur" }],
|
|
|
|
|
yqState: [
|
|
|
|
|
{ required: true, message: "请输入舆情状态", trigger: "blur" },
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
fileList: [],
|
|
|
|
|
limit: 1,
|
|
|
|
|
accept: ".xls,.xlsx",
|
|
|
|
|
fileOpen: false,
|
|
|
|
|
headers: { Authorization: "Bearer " + getToken() },
|
|
|
|
|
fileNameS: [],
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
files(e) {
|
|
|
|
|
if (!e) return [];
|
|
|
|
|
return e.split(",");
|
|
|
|
|
},
|
|
|
|
|
//添加表格
|
|
|
|
|
addFile() {
|
|
|
|
|
if (this.fileNameS.length <= 0) {
|
|
|
|
|
this.fileNameS.push({
|
|
|
|
|
fileUrl: "",
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
if (this.fileNameS[this.fileNameS.length - 1].fileUrl != "") {
|
|
|
|
|
this.fileNameS.push({
|
|
|
|
|
fileUrl: "",
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.$modal.msgError("请完整填写上一条");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//删除表格
|
|
|
|
|
removeFile(index) {
|
|
|
|
|
this.fileNameS.splice(index, 1);
|
|
|
|
|
},
|
|
|
|
|
//下载模板
|
|
|
|
|
importTemplate() {
|
|
|
|
|
this.download(
|
|
|
|
@ -652,15 +728,29 @@ export default {
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
|
handleAdd() {
|
|
|
|
|
this.reset();
|
|
|
|
|
this.fileNameS = [
|
|
|
|
|
{
|
|
|
|
|
fileUrl: "",
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.title = "添加 转办量、转办详情";
|
|
|
|
|
},
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
|
handleUpdate(row) {
|
|
|
|
|
this.reset();
|
|
|
|
|
this.fileNameS = [];
|
|
|
|
|
const id = row.id || this.ids;
|
|
|
|
|
getZbxq(id).then((response) => {
|
|
|
|
|
this.form = response.data;
|
|
|
|
|
if (response.data.fileUrl) {
|
|
|
|
|
let arr2 = response.data.fileUrl.split(",");
|
|
|
|
|
arr2.forEach((value, index) => {
|
|
|
|
|
this.fileNameS.push({
|
|
|
|
|
fileUrl: arr2[index],
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.title = "修改 转办量、转办详情";
|
|
|
|
|
});
|
|
|
|
@ -682,6 +772,17 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
|
submitForm() {
|
|
|
|
|
let arr2 = [];
|
|
|
|
|
if (this.fileNameS.length > 0) {
|
|
|
|
|
this.fileNameS.forEach((value) => {
|
|
|
|
|
if (value.fileUrl) {
|
|
|
|
|
arr2.push(value.fileUrl);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
this.form.fileUrl = arr2.join(",");
|
|
|
|
|
} else {
|
|
|
|
|
this.form.fileUrl = "";
|
|
|
|
|
}
|
|
|
|
|
this.$refs["form"].validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
if (this.form.id != null) {
|
|
|
|
@ -740,3 +841,55 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.updataFile {
|
|
|
|
|
display: flex;
|
|
|
|
|
}
|
|
|
|
|
.fileIcon {
|
|
|
|
|
width: 10%;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
font-size: 24px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
.main-file {
|
|
|
|
|
display: flex;
|
|
|
|
|
}
|
|
|
|
|
.fileHeader {
|
|
|
|
|
border: 1px solid #dcdfe6;
|
|
|
|
|
color: #515a6e;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
height: 40px;
|
|
|
|
|
display: flex;
|
|
|
|
|
background: #f8f8f9;
|
|
|
|
|
width: 90%;
|
|
|
|
|
}
|
|
|
|
|
.fileItems {
|
|
|
|
|
border: 1px solid #dcdfe6;
|
|
|
|
|
border-top: none;
|
|
|
|
|
color: #606266;
|
|
|
|
|
height: 40px;
|
|
|
|
|
display: flex;
|
|
|
|
|
width: 90%;
|
|
|
|
|
}
|
|
|
|
|
.names {
|
|
|
|
|
width: 40%;
|
|
|
|
|
border-right: 1px solid #dcdfe6;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
padding-left: 10px;
|
|
|
|
|
}
|
|
|
|
|
::v-deep .names .el-input__inner {
|
|
|
|
|
border: none !important;
|
|
|
|
|
padding-left: 0 !important;
|
|
|
|
|
}
|
|
|
|
|
.urls {
|
|
|
|
|
width: 100%;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
padding-left: 10px;
|
|
|
|
|
}
|
|
|
|
|
::v-deep .urls .el-input__inner {
|
|
|
|
|
border: none !important;
|
|
|
|
|
padding-left: 0 !important;
|
|
|
|
|
}
|
|
|
|
|
</style>
|