|
|
|
@ -82,7 +82,11 @@
|
|
|
|
|
@selection-change="handleSelectionChange"
|
|
|
|
|
>
|
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
<el-table-column label="区域" align="center" prop="areaId" />
|
|
|
|
|
<el-table-column label="区域" align="center" prop="areaId">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ $filterTown(scope.row.areaId) }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="类型" align="center" prop="type" />
|
|
|
|
|
<el-table-column label="材料名称" align="center" prop="materialsName" />
|
|
|
|
|
<el-table-column
|
|
|
|
@ -178,17 +182,8 @@
|
|
|
|
|
>
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="材料文件名称" prop="materialsFileName">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.materialsFileName"
|
|
|
|
|
placeholder="请输入材料文件名称"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="材料文件URL" prop="materialsFileUrl">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.materialsFileUrl"
|
|
|
|
|
placeholder="请输入材料文件URL"
|
|
|
|
|
/>
|
|
|
|
|
<el-form-item label="材料文件" prop="materialsFileUrl">
|
|
|
|
|
<FileUpload v-model="fileList" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
@ -214,7 +209,7 @@
|
|
|
|
|
labelClassName="desLable"
|
|
|
|
|
>
|
|
|
|
|
<el-descriptions-item label="区域">{{
|
|
|
|
|
form.areaId
|
|
|
|
|
$filterTown(form.areaId)
|
|
|
|
|
}}</el-descriptions-item>
|
|
|
|
|
|
|
|
|
|
<el-descriptions-item label="类型">{{
|
|
|
|
@ -228,15 +223,8 @@
|
|
|
|
|
<el-descriptions-item label="发布时间">{{
|
|
|
|
|
form.fabuTime
|
|
|
|
|
}}</el-descriptions-item>
|
|
|
|
|
|
|
|
|
|
<el-descriptions-item label="材料文件名称">{{
|
|
|
|
|
form.materialsFileName
|
|
|
|
|
}}</el-descriptions-item>
|
|
|
|
|
|
|
|
|
|
<el-descriptions-item label="材料文件URL">{{
|
|
|
|
|
form.materialsFileUrl
|
|
|
|
|
}}</el-descriptions-item>
|
|
|
|
|
</el-descriptions>
|
|
|
|
|
<FileView :fileList="fileList" />
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
@ -259,6 +247,7 @@ export default {
|
|
|
|
|
//注释字典
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
fileList: [],
|
|
|
|
|
tableHeigth: 0,
|
|
|
|
|
//查看详情
|
|
|
|
|
infoOpen: false,
|
|
|
|
@ -355,6 +344,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
remark: null,
|
|
|
|
|
};
|
|
|
|
|
this.fileList = [];
|
|
|
|
|
this.resetForm("form");
|
|
|
|
|
},
|
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
@ -378,6 +368,12 @@ export default {
|
|
|
|
|
this.reset();
|
|
|
|
|
const id = row.id || this.ids;
|
|
|
|
|
getDongtai(id).then((response) => {
|
|
|
|
|
this.filterFile(
|
|
|
|
|
2,
|
|
|
|
|
response.data.materialsFileName,
|
|
|
|
|
response.data.materialsFileUrl
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
this.form = response.data;
|
|
|
|
|
this.infoOpen = true;
|
|
|
|
|
this.infoTitle = "查看工作动态详情";
|
|
|
|
@ -394,15 +390,53 @@ export default {
|
|
|
|
|
this.reset();
|
|
|
|
|
const id = row.id || this.ids;
|
|
|
|
|
getDongtai(id).then((response) => {
|
|
|
|
|
this.filterFile(
|
|
|
|
|
2,
|
|
|
|
|
response.data.materialsFileName,
|
|
|
|
|
response.data.materialsFileUrl
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
this.form = response.data;
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.title = "修改工作动态";
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
filterFile(state, fileName, fileUrl) {
|
|
|
|
|
//1.提交 else 查看
|
|
|
|
|
if (state == 1) {
|
|
|
|
|
let fileName = [];
|
|
|
|
|
let fileUrl = [];
|
|
|
|
|
if (this.fileList.length > 0) {
|
|
|
|
|
this.fileList.forEach((item) => {
|
|
|
|
|
fileName.push(item.name);
|
|
|
|
|
fileUrl.push(item.url);
|
|
|
|
|
});
|
|
|
|
|
this.form.materialsFileName = fileName.join(",");
|
|
|
|
|
this.form.materialsFileUrl = fileUrl.join(",");
|
|
|
|
|
} else {
|
|
|
|
|
this.form.materialsFileName = "";
|
|
|
|
|
this.form.materialsFileUrl = "";
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (fileName || fileUrl) {
|
|
|
|
|
fileName = fileName.split(",");
|
|
|
|
|
fileUrl = fileUrl.split(",");
|
|
|
|
|
fileName.forEach((item, index) => {
|
|
|
|
|
this.fileList.push({
|
|
|
|
|
name: item,
|
|
|
|
|
url: fileUrl[index],
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.fileList = [];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
|
submitForm() {
|
|
|
|
|
this.$refs["form"].validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
this.filterFile(1);
|
|
|
|
|
if (this.form.id != null) {
|
|
|
|
|
updateDongtai(this.form).then((response) => {
|
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
|