|
@@ -81,19 +81,20 @@
|
|
:show-overflow-tooltip="true"
|
|
:show-overflow-tooltip="true"
|
|
/>
|
|
/>
|
|
<el-table-column label="作者" align="center" prop="createBy" />
|
|
<el-table-column label="作者" align="center" prop="createBy" />
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="发布单位"
|
|
|
|
+ align="center"
|
|
|
|
+ prop="deptName"
|
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
|
+ width="100"
|
|
|
|
+ />
|
|
<el-table-column
|
|
<el-table-column
|
|
label="类型"
|
|
label="类型"
|
|
align="center"
|
|
align="center"
|
|
prop="noticeType"
|
|
prop="noticeType"
|
|
:formatter="typeFormat"
|
|
:formatter="typeFormat"
|
|
/>
|
|
/>
|
|
- <!-- <el-table-column
|
|
|
|
- label="状态"
|
|
|
|
- align="center"
|
|
|
|
- prop="status"
|
|
|
|
- :formatter="statusFormat"
|
|
|
|
- width="100"
|
|
|
|
- /> -->
|
|
|
|
|
|
+
|
|
<el-table-column label="创建时间" align="center" prop="createTime">
|
|
<el-table-column label="创建时间" align="center" prop="createTime">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
|
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
|
@@ -137,29 +138,34 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
- <el-form-item label="作者" prop="noticeTitle">
|
|
|
|
- <el-input v-model="form.noticeTitle" placeholder="请输入作者" />
|
|
|
|
|
|
+ <el-form-item label="作者" prop="createBy">
|
|
|
|
+ <el-input v-model="form.createBy" placeholder="请输入作者" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
- <el-form-item label="单位" prop="noticeTitle">
|
|
|
|
- <el-input v-model="form.noticeTitle" placeholder="请输入单位" />
|
|
|
|
|
|
+ <el-form-item label="单位" prop="deptName">
|
|
|
|
+ <el-input v-model="form.deptName" placeholder="请输入单位" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
<el-form-item label="类型" prop="noticeType">
|
|
<el-form-item label="类型" prop="noticeType">
|
|
-
|
|
|
|
|
|
+ <el-radio-group v-model="form.noticeType">
|
|
|
|
+ <el-radio
|
|
|
|
+ v-for="dict in typeOptions"
|
|
|
|
+ :key="dict.dictValue"
|
|
|
|
+ :label="dict.dictValue"
|
|
|
|
+ >{{dict.dictLabel}}</el-radio>
|
|
|
|
+ </el-radio-group>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
- <el-form-item label="状态">
|
|
|
|
- <el-radio-group v-model="form.status">
|
|
|
|
- <el-radio
|
|
|
|
- v-for="dict in statusOptions"
|
|
|
|
- :key="dict.dictValue"
|
|
|
|
- :label="dict.dictValue"
|
|
|
|
- >{{dict.dictLabel}}</el-radio>
|
|
|
|
- </el-radio-group>
|
|
|
|
|
|
+ <el-form-item label="缩略图" class="elItem" prop="je">
|
|
|
|
+ <el-upload class="upload-demo" ref="upload" action="http://192.168.101.11:8080/common/upload"
|
|
|
|
+ :on-preview="handlePreview" :on-remove="handleRemove" :on-success="handleSucc" :file-list="fileList" :auto-upload="false" :multiple="true">
|
|
|
|
+ <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
|
|
|
|
+ <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button>
|
|
|
|
+ <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
|
|
|
|
+ </el-upload>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
@@ -178,7 +184,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { listNotice, getNotice, delNotice, addNotice, updateNotice, exportNotice } from "@/api/system/notice";
|
|
|
|
|
|
+import { listNotice, getNotice, getNoticetwo, delNotice, addNotice, updateNotice, exportNotice,listNoticetwo } from "@/api/system/notice";
|
|
import Editor from '@/components/Editor';
|
|
import Editor from '@/components/Editor';
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -228,7 +234,9 @@ export default {
|
|
noticeType: [
|
|
noticeType: [
|
|
{ required: true, message: "公告类型不能为空", trigger: "change" }
|
|
{ required: true, message: "公告类型不能为空", trigger: "change" }
|
|
]
|
|
]
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ configList: [{}],
|
|
|
|
+ fileList: []
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -244,7 +252,7 @@ export default {
|
|
/** 查询公告列表 */
|
|
/** 查询公告列表 */
|
|
getList() {
|
|
getList() {
|
|
this.loading = true;
|
|
this.loading = true;
|
|
- listNotice(this.queryParams).then(response => {
|
|
|
|
|
|
+ listNoticetwo(this.queryParams).then(response => {
|
|
this.noticeList = response.rows;
|
|
this.noticeList = response.rows;
|
|
this.total = response.total;
|
|
this.total = response.total;
|
|
this.loading = false;
|
|
this.loading = false;
|
|
@@ -252,7 +260,7 @@ export default {
|
|
},
|
|
},
|
|
// 公告状态字典翻译
|
|
// 公告状态字典翻译
|
|
statusFormat(row, column) {
|
|
statusFormat(row, column) {
|
|
- return this.selectDictLabel(this.statusOptions, row.status);
|
|
|
|
|
|
+ return this.selectDictLabel(this.statusOptions, row.noticeType);
|
|
},
|
|
},
|
|
// 公告状态字典翻译
|
|
// 公告状态字典翻译
|
|
typeFormat(row, column) {
|
|
typeFormat(row, column) {
|
|
@@ -300,7 +308,10 @@ export default {
|
|
handleUpdate(row) {
|
|
handleUpdate(row) {
|
|
this.reset();
|
|
this.reset();
|
|
const noticeId = row.noticeId || this.ids
|
|
const noticeId = row.noticeId || this.ids
|
|
- getNotice(noticeId).then(response => {
|
|
|
|
|
|
+ // this.form = row;
|
|
|
|
+ // this.open = true;
|
|
|
|
+ // console.log(24)
|
|
|
|
+ getNoticetwo(noticeId).then(response => {
|
|
this.form = response.data;
|
|
this.form = response.data;
|
|
this.open = true;
|
|
this.open = true;
|
|
this.title = "修改动态";
|
|
this.title = "修改动态";
|
|
@@ -339,6 +350,26 @@ export default {
|
|
this.getList();
|
|
this.getList();
|
|
this.msgSuccess("删除成功");
|
|
this.msgSuccess("删除成功");
|
|
})
|
|
})
|
|
|
|
+ },
|
|
|
|
+ submitUpload() {
|
|
|
|
+
|
|
|
|
+ this.$refs.upload.submit();
|
|
|
|
+ },
|
|
|
|
+ handleRemove(file, fileList) {
|
|
|
|
+ console.log(file, fileList);
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ handlePreview(file) {
|
|
|
|
+ console.log(file,45);
|
|
|
|
+ },
|
|
|
|
+ handleSucc(response, file, fileList){
|
|
|
|
+ this.form.imgUrl = file.response.url
|
|
|
|
+ console.log(this.form.imgUrl)
|
|
|
|
+ if(file.response.code == 200){
|
|
|
|
+ this.msgSuccess("上传成功");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ console.log(response.url, file, fileList);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|