BUG 26973
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -4,21 +4,21 @@
|
|||||||
<ai-search-bar bottomBorder>
|
<ai-search-bar bottomBorder>
|
||||||
<template #left>
|
<template #left>
|
||||||
<ai-select
|
<ai-select
|
||||||
v-model="search.type"
|
v-model="search.type"
|
||||||
@change="search.current = 1, getList()"
|
@change="search.current = 1, getList()"
|
||||||
placeholder="项目类型"
|
placeholder="项目类型"
|
||||||
:selectList="$dict.getDict('questionnaireType')">
|
:selectList="$dict.getDict('questionnaireType')">
|
||||||
</ai-select>
|
</ai-select>
|
||||||
</template>
|
</template>
|
||||||
<template #right>
|
<template #right>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="search.title"
|
v-model="search.title"
|
||||||
size="small"
|
size="small"
|
||||||
placeholder="请输入模板名称或创建人"
|
placeholder="请输入模板名称或创建人"
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter.native="search.current = 1, getList()"
|
@keyup.enter.native="search.current = 1, getList()"
|
||||||
@clear="search.current = 1, search.title = '', getList()"
|
@clear="search.current = 1, search.title = '', getList()"
|
||||||
suffix-icon="iconfont iconSearch">
|
suffix-icon="iconfont iconSearch">
|
||||||
</el-input>
|
</el-input>
|
||||||
</template>
|
</template>
|
||||||
</ai-search-bar>
|
</ai-search-bar>
|
||||||
@@ -28,13 +28,13 @@
|
|||||||
</template>
|
</template>
|
||||||
</ai-search-bar>
|
</ai-search-bar>
|
||||||
<ai-table
|
<ai-table
|
||||||
:tableData="tableData"
|
:tableData="tableData"
|
||||||
:col-configs="colConfigs"
|
:col-configs="colConfigs"
|
||||||
:total="total"
|
:total="total"
|
||||||
style="margin-top: 6px;"
|
style="margin-top: 6px;"
|
||||||
:current.sync="search.current"
|
:current.sync="search.current"
|
||||||
:size.sync="search.size"
|
:size.sync="search.size"
|
||||||
@getList="getList">
|
@getList="getList">
|
||||||
<el-table-column slot="type" width="120px" label="项目类型" align="center">
|
<el-table-column slot="type" width="120px" label="项目类型" align="center">
|
||||||
<template slot-scope="{ row }">
|
<template slot-scope="{ row }">
|
||||||
<div class="tags-wrapper">
|
<div class="tags-wrapper">
|
||||||
@@ -53,10 +53,10 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</ai-table>
|
</ai-table>
|
||||||
<ai-dialog
|
<ai-dialog
|
||||||
:visible.sync="isShow"
|
:visible.sync="isShow"
|
||||||
width="800px"
|
width="800px"
|
||||||
title="请选择新建模板类型"
|
title="请选择新建模板类型"
|
||||||
@onConfirm="onConfirm">
|
@onConfirm="onConfirm">
|
||||||
<div class="type-list">
|
<div class="type-list">
|
||||||
<div class="type-item" @click="currIndex = 0" :class="[currIndex === 0 ? 'active' : '']">
|
<div class="type-item" @click="currIndex = 0" :class="[currIndex === 0 ? 'active' : '']">
|
||||||
<svg class="icon" aria-hidden="true">
|
<svg class="icon" aria-hidden="true">
|
||||||
@@ -95,189 +95,188 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'Template',
|
name: 'Template',
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
dict: Object
|
dict: Object
|
||||||
|
},
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
search: {
|
||||||
|
current: 1,
|
||||||
|
status: '',
|
||||||
|
type: '',
|
||||||
|
size: 10,
|
||||||
|
templateType: 1,
|
||||||
|
title: ''
|
||||||
|
},
|
||||||
|
currIndex: 0,
|
||||||
|
isShow: false,
|
||||||
|
total: 10,
|
||||||
|
colConfigs: [
|
||||||
|
{prop: 'title', label: '模板名称', align: 'left'},
|
||||||
|
{slot: 'type', label: '项目类型', align: 'center'},
|
||||||
|
{prop: 'quoteCount', label: '引用次数', align: 'center'},
|
||||||
|
{prop: 'createUserName', label: '创建人', align: 'center'},
|
||||||
|
{prop: 'createUnitName', label: '创建单位', align: 'center'},
|
||||||
|
{prop: 'createTime', label: '创建时间', align: 'center'}
|
||||||
|
],
|
||||||
|
tableData: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
getList() {
|
||||||
|
this.instance.post(`/app/appquestionnairetemplate/list`, null, {
|
||||||
|
params: {
|
||||||
|
...this.search
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.tableData = res.data.records
|
||||||
|
this.total = res.data.total
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
data () {
|
quote(id, type) {
|
||||||
return {
|
this.$emit('change', {
|
||||||
search: {
|
type: 'add',
|
||||||
current: 1,
|
params: {
|
||||||
status: '',
|
id,
|
||||||
type: '',
|
type,
|
||||||
size: 10,
|
isQuote: true,
|
||||||
templateType: 1,
|
templateType: 0
|
||||||
title: ''
|
}
|
||||||
},
|
})
|
||||||
currIndex: 0,
|
|
||||||
isShow: false,
|
|
||||||
total: 10,
|
|
||||||
colConfigs: [
|
|
||||||
{ prop: 'title', label: '模板名称', align: 'left' },
|
|
||||||
{ slot: 'type', label: '项目类型', align: 'center' },
|
|
||||||
{ prop: 'quoteCount', label: '引用次数', align: 'center' },
|
|
||||||
{ prop: 'createUserName', label: '创建人', align: 'center' },
|
|
||||||
{ prop: 'createUnitName', label: '创建单位', align: 'center' },
|
|
||||||
{ prop: 'createTime', label: '创建时间', align: 'center' }
|
|
||||||
],
|
|
||||||
tableData: []
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted () {
|
remove(id) {
|
||||||
this.getList()
|
this.$confirm('确定删除该数据?').then(() => {
|
||||||
},
|
this.instance.post(`/app/appquestionnairetemplate/deleteShareTemplate?ids=${id}`).then(res => {
|
||||||
|
|
||||||
methods: {
|
|
||||||
getList () {
|
|
||||||
this.instance.post(`/app/appquestionnairetemplate/list`, null, {
|
|
||||||
params: {
|
|
||||||
...this.search
|
|
||||||
}
|
|
||||||
}).then(res => {
|
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.tableData = res.data.records
|
this.$message.success('删除成功!')
|
||||||
this.total = res.data.total
|
this.getList()
|
||||||
this.$initWxOpenData()
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
})
|
||||||
|
},
|
||||||
|
|
||||||
quote (id, type) {
|
toAdd(id) {
|
||||||
this.$emit('change', {
|
this.$emit('change', {
|
||||||
type: 'add',
|
type: 'Add',
|
||||||
params: {
|
params: {
|
||||||
id,
|
id
|
||||||
type,
|
}
|
||||||
isQuote: true,
|
})
|
||||||
templateType: 0
|
},
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
remove (id) {
|
toEdit(id, type) {
|
||||||
this.$confirm('确定删除该数据?').then(() => {
|
this.$emit('change', {
|
||||||
this.instance.post(`/app/appquestionnairetemplate/deleteShareTemplate?ids=${id}`).then(res => {
|
type: 'add',
|
||||||
if (res.code == 0) {
|
params: {
|
||||||
this.$message.success('删除成功!')
|
id,
|
||||||
this.getList()
|
type,
|
||||||
}
|
templateType: 1
|
||||||
})
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
toAdd (id) {
|
onConfirm() {
|
||||||
this.$emit('change', {
|
this.$emit('change', {
|
||||||
type: 'Add',
|
type: 'add',
|
||||||
params: {
|
params: {
|
||||||
id
|
id: '',
|
||||||
}
|
templateType: 1,
|
||||||
})
|
type: this.currIndex
|
||||||
},
|
}
|
||||||
|
})
|
||||||
toEdit (id, type) {
|
|
||||||
this.$emit('change', {
|
|
||||||
type: 'add',
|
|
||||||
params: {
|
|
||||||
id,
|
|
||||||
type,
|
|
||||||
templateType: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
onConfirm () {
|
|
||||||
this.$emit('change', {
|
|
||||||
type: 'add',
|
|
||||||
params: {
|
|
||||||
id: '',
|
|
||||||
templateType: 1,
|
|
||||||
type: this.currIndex
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.template {
|
.template {
|
||||||
.tags-wrapper {
|
.tags-wrapper {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.type-list {
|
.type-list {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.type-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 128px;
|
||||||
|
height: 64px;
|
||||||
|
margin-right: 20px;
|
||||||
|
background: #FFFFFF;
|
||||||
|
// box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.08);
|
||||||
|
border-radius: 2px;
|
||||||
|
cursor: pointer;
|
||||||
|
border: 1px solid #E4E8EF;
|
||||||
|
|
||||||
.type-item {
|
svg {
|
||||||
display: flex;
|
width: 24px;
|
||||||
align-items: center;
|
height: 24px;
|
||||||
justify-content: center;
|
margin-right: 8px;
|
||||||
width: 128px;
|
}
|
||||||
height: 64px;
|
|
||||||
margin-right: 20px;
|
|
||||||
background: #FFFFFF;
|
|
||||||
border-radius: 2px;
|
|
||||||
// box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.08);
|
|
||||||
border-radius: 2px;
|
|
||||||
cursor: pointer;
|
|
||||||
border: 1px solid #E4E8EF;
|
|
||||||
|
|
||||||
svg {
|
&.active {
|
||||||
width: 24px;
|
border: 1px solid #2266FF;
|
||||||
height: 24px;
|
}
|
||||||
margin-right: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.active {
|
&:last-child {
|
||||||
border: 1px solid #2266FF;
|
margin-right: 0;
|
||||||
}
|
|
||||||
|
|
||||||
&:last-child {
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tags {
|
|
||||||
display: block;
|
|
||||||
width: 64px;
|
|
||||||
height: 24px;
|
|
||||||
line-height: 24px;
|
|
||||||
text-align: center;
|
|
||||||
border-radius: 4px;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.type-0 {
|
|
||||||
color: #2266FF;
|
|
||||||
background: rgba(34, 102, 255, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.type-1 {
|
|
||||||
color: rgba(34, 170, 153, 1);
|
|
||||||
background: rgba(34, 170, 153, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.type-2 {
|
|
||||||
color: rgba(248, 180, 37, 1);
|
|
||||||
background: rgba(248, 180, 37, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.type-3 {
|
|
||||||
color: rgba(102, 119, 187, 1);
|
|
||||||
background: rgba(102, 119, 187, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.type-4 {
|
|
||||||
color: rgba(236, 68, 97, 1);
|
|
||||||
background: rgba(236, 68, 97, 0.1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tags {
|
||||||
|
display: block;
|
||||||
|
width: 64px;
|
||||||
|
height: 24px;
|
||||||
|
line-height: 24px;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 4px;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.type-0 {
|
||||||
|
color: #2266FF;
|
||||||
|
background: rgba(34, 102, 255, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.type-1 {
|
||||||
|
color: rgba(34, 170, 153, 1);
|
||||||
|
background: rgba(34, 170, 153, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.type-2 {
|
||||||
|
color: rgba(248, 180, 37, 1);
|
||||||
|
background: rgba(248, 180, 37, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.type-3 {
|
||||||
|
color: rgba(102, 119, 187, 1);
|
||||||
|
background: rgba(102, 119, 187, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.type-4 {
|
||||||
|
color: rgba(236, 68, 97, 1);
|
||||||
|
background: rgba(236, 68, 97, 0.1);
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -246,7 +246,7 @@ export default {
|
|||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
this.info.attendees = res.data.records;
|
this.info.attendees = res.data.records;
|
||||||
this.total = res.data.total;
|
this.total = res.data.total;
|
||||||
this.$initWxOpenData()
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ export default {
|
|||||||
if (res && res.data) {
|
if (res && res.data) {
|
||||||
this.tableData = res.data.records;
|
this.tableData = res.data.records;
|
||||||
this.total = res.data.total;
|
this.total = res.data.total;
|
||||||
this.$initWxOpenData()
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ export default {
|
|||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
this.tableData = res.data.records
|
this.tableData = res.data.records
|
||||||
this.page.total = res.data.total
|
this.page.total = res.data.total
|
||||||
this.$initWxOpenData()
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<ai-detail>
|
<ai-detail>
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<ai-title :title="detail.id ? '编辑公告' : '创建公告'" isShowBack isShowBottomBorder @onBackClick="$parent.goBack"></ai-title>
|
<ai-title :title="detail.id ? '编辑公告' : '创建公告'" isShowBack isShowBottomBorder
|
||||||
|
@onBackClick="$parent.goBack"></ai-title>
|
||||||
</template>
|
</template>
|
||||||
<template #content>
|
<template #content>
|
||||||
<ai-card title="基本信息">
|
<ai-card title="基本信息">
|
||||||
@@ -19,8 +20,8 @@
|
|||||||
<el-form-item label="发送对象" prop="persons">
|
<el-form-item label="发送对象" prop="persons">
|
||||||
<el-row type="flex" align="middle">
|
<el-row type="flex" align="middle">
|
||||||
<div class="text-area">
|
<div class="text-area">
|
||||||
<span v-text="item.name"/>
|
<span v-text="item.name"/>
|
||||||
<span v-if="persons.length">等{{persons.length}}人</span>
|
<span v-if="persons.length">等{{ persons.length }}人</span>
|
||||||
</div>
|
</div>
|
||||||
<ai-wechat-selecter v-model="form.persons" :instance="instance" @change="onChange">
|
<ai-wechat-selecter v-model="form.persons" :instance="instance" @change="onChange">
|
||||||
<el-button type="info">选择</el-button>
|
<el-button type="info">选择</el-button>
|
||||||
@@ -36,12 +37,12 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="releaseTime" class="picker" v-if="form.type==1">
|
<el-form-item prop="releaseTime" class="picker" v-if="form.type==1">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="form.releaseTime"
|
v-model="form.releaseTime"
|
||||||
style="margin-left: 10px;"
|
style="margin-left: 10px;"
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
size="small"
|
size="small"
|
||||||
type="datetime"
|
type="datetime"
|
||||||
placeholder="请选择">
|
placeholder="请选择">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -58,126 +59,128 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "add",
|
name: "add",
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
dict: Object,
|
dict: Object,
|
||||||
detail: Object,
|
detail: Object,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
return {
|
||||||
|
form: {
|
||||||
|
id: null,
|
||||||
|
title: "",
|
||||||
|
content: "",
|
||||||
|
files: [],
|
||||||
|
persons: [],
|
||||||
|
type: 0,
|
||||||
|
releaseTime: null,
|
||||||
|
},
|
||||||
|
persons: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
rules() {
|
||||||
return {
|
return {
|
||||||
form: {
|
title: [
|
||||||
id: null,
|
{required: true, message: '请输入公告标题'},
|
||||||
title: "",
|
],
|
||||||
content: "",
|
content: [
|
||||||
files: [],
|
{required: true, message: '请输入公告内容'},
|
||||||
persons: [],
|
],
|
||||||
type: 0,
|
persons: [
|
||||||
releaseTime: null,
|
{required: true, message: '请选择发送对象'},
|
||||||
},
|
],
|
||||||
persons:[],
|
type: [
|
||||||
}
|
{required: true},
|
||||||
|
],
|
||||||
|
releaseTime: [
|
||||||
|
{required: true, message: '请选择发送时间'},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onChange(e) {
|
||||||
|
this.form.persons = e;
|
||||||
|
this.persons = e;
|
||||||
|
this.$refs["form"].validateField("persons");
|
||||||
},
|
},
|
||||||
computed: {
|
confim(e) {
|
||||||
rules() {
|
this.$refs["form"].validate(v => {
|
||||||
return {
|
if (v) {
|
||||||
title: [
|
if (this.form.releaseTime && (new Date(this.form.releaseTime).getTime() <= Date.now())) {
|
||||||
{required: true, message: '请输入公告标题'},
|
return this.$message.error("发送时间要大于当前时间")
|
||||||
],
|
}
|
||||||
content: [
|
this.instance.post("/app/appannouncement/addOrUpdate", {
|
||||||
{required: true, message: '请输入公告内容'},
|
...this.form,
|
||||||
],
|
status: e
|
||||||
persons: [
|
}).then(res => {
|
||||||
{required: true, message: '请选择发送对象'},
|
if (res.code == 0) {
|
||||||
],
|
this.$message.success(e == 0 ? "保存成功" : "发布成功");
|
||||||
type: [
|
this.$parent.goBack();
|
||||||
{required: true},
|
|
||||||
],
|
|
||||||
releaseTime: [
|
|
||||||
{required: true, message: '请选择发送时间'},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
onChange(e){
|
|
||||||
this.form.persons = e;
|
|
||||||
this.persons = e;
|
|
||||||
this.$refs["form"].validateField("persons");
|
|
||||||
},
|
|
||||||
confim(e) {
|
|
||||||
this.$refs["form"].validate(v => {
|
|
||||||
if (v) {
|
|
||||||
if(this.form.releaseTime && (new Date(this.form.releaseTime).getTime() <= Date.now())){
|
|
||||||
return this.$message.error("发送时间要大于当前时间")
|
|
||||||
}
|
}
|
||||||
this.instance.post("/app/appannouncement/addOrUpdate", {
|
})
|
||||||
...this.form,
|
}
|
||||||
status: e
|
})
|
||||||
}).then(res => {
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.$message.success(e==0?"保存成功":"发布成功");
|
|
||||||
this.$parent.goBack();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getDetail(){
|
|
||||||
this.instance.post("/app/appannouncement/detail",null,{
|
|
||||||
params:{
|
|
||||||
id:this.detail.id
|
|
||||||
}
|
|
||||||
}).then(res=>{
|
|
||||||
if(res && res.data){
|
|
||||||
Object.keys(this.form).map(e=>this.form[e] = res.data[e]);
|
|
||||||
this.form.type = res.data.releaseTime ? 1 : 0;
|
|
||||||
this.$initWxOpenData()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
mounted(){
|
getDetail() {
|
||||||
if(this.detail?.id){
|
this.instance.post("/app/appannouncement/detail", null, {
|
||||||
this.getDetail();
|
params: {
|
||||||
}
|
id: this.detail.id
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if (res && res.data) {
|
||||||
|
Object.keys(this.form).map(e => this.form[e] = res.data[e]);
|
||||||
|
this.form.type = res.data.releaseTime ? 1 : 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
if (this.detail?.id) {
|
||||||
|
this.getDetail();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
::v-deep .picker {
|
::v-deep .picker {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
|
|
||||||
.el-form-item__content {
|
.el-form-item__content {
|
||||||
margin-left: 0 !important;
|
margin-left: 0 !important;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-area {
|
||||||
|
width: 995px;
|
||||||
|
height: 32px;
|
||||||
|
background-color: #F5F5F5;
|
||||||
|
border: 1px solid #d0d4dc;
|
||||||
|
border-radius: 2px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 0 6px;
|
||||||
|
color: #666666;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .AiOpenData {
|
||||||
|
height: auto !important;
|
||||||
|
|
||||||
|
&:after {
|
||||||
|
content: "、";
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-area{
|
&:nth-child(2):after {
|
||||||
width:995px;
|
content: "";
|
||||||
height:32px;
|
|
||||||
background-color:#F5F5F5;
|
|
||||||
border: 1px solid #d0d4dc;
|
|
||||||
border-radius: 2px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding:0 6px;
|
|
||||||
color: #666666;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
overflow: hidden;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
::v-deep .AiOpenData{
|
|
||||||
height:auto !important;
|
|
||||||
&:after{
|
|
||||||
content:"、";
|
|
||||||
}
|
|
||||||
&:nth-child(2):after{
|
|
||||||
content:"";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<ai-card :title="detailObj.title" class="title">
|
<ai-card :title="detailObj.title" class="title">
|
||||||
<template #content>
|
<template #content>
|
||||||
<el-row type="flex" justify="space-between" class="info">
|
<el-row type="flex" justify="space-between" class="info">
|
||||||
<span>时间:{{detailObj.releaseTime}}</span>
|
<span>时间:{{ detailObj.releaseTime }}</span>
|
||||||
<span style="display:flex">发布单位:
|
<span style="display:flex">发布单位:
|
||||||
<span v-text="detailObj.unitName"/>
|
<span v-text="detailObj.unitName"/>
|
||||||
</span>
|
</span>
|
||||||
@@ -20,9 +20,10 @@
|
|||||||
</ai-card>
|
</ai-card>
|
||||||
<ai-card title="附件" v-if="detailObj.files && detailObj.files.length">
|
<ai-card title="附件" v-if="detailObj.files && detailObj.files.length">
|
||||||
<template #content>
|
<template #content>
|
||||||
<el-row type="flex" justify="space-between" class="file" v-for="(item,index) in detailObj.files" :key="index" @click.native="open(item)">
|
<el-row type="flex" justify="space-between" class="file" v-for="(item,index) in detailObj.files" :key="index"
|
||||||
<span>{{item.fileName}}</span>
|
@click.native="open(item)">
|
||||||
<span>{{(item.size/1024).toFixed(2)}}KB</span>
|
<span>{{ item.fileName }}</span>
|
||||||
|
<span>{{ (item.size / 1024).toFixed(2) }}KB</span>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
</ai-card>
|
</ai-card>
|
||||||
@@ -31,64 +32,64 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "detail",
|
name: "detail",
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
dict: Object,
|
dict: Object,
|
||||||
detail: Object
|
detail: Object
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
detailObj: {},
|
detailObj: {},
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
open(item) {
|
|
||||||
window.open(item.url);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.instance.post("/app/appannouncement/detail", null, {
|
|
||||||
params: {
|
|
||||||
id: this.detail.id
|
|
||||||
}
|
|
||||||
}).then(res => {
|
|
||||||
if (res && res.data) {
|
|
||||||
this.detailObj = res.data;
|
|
||||||
this.$initWxOpenData()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
open(item) {
|
||||||
|
window.open(item.url);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.instance.post("/app/appannouncement/detail", null, {
|
||||||
|
params: {
|
||||||
|
id: this.detail.id
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if (res && res.data) {
|
||||||
|
this.detailObj = res.data;
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
::v-deep .title {
|
::v-deep .title {
|
||||||
.aibar-left {
|
.aibar-left {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.file {
|
.file {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
padding: 0 8px;
|
padding: 0 8px;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #333;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 4px;
|
||||||
|
border: 1px solid #d0d4dc;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
& > span {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #333;
|
color: #333;
|
||||||
background: #fff;
|
|
||||||
border-radius: 4px;
|
|
||||||
border: 1px solid #d0d4dc;
|
|
||||||
margin-bottom: 16px;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.info {
|
|
||||||
& > span {
|
|
||||||
font-size: 14px;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<ai-card :title="detailObj.title" class="title">
|
<ai-card :title="detailObj.title" class="title">
|
||||||
<template #content>
|
<template #content>
|
||||||
<el-row type="flex" justify="space-between" class="info">
|
<el-row type="flex" justify="space-between" class="info">
|
||||||
<span>时间:{{detailObj.releaseTime}}</span>
|
<span>时间:{{ detailObj.releaseTime }}</span>
|
||||||
<span style="display:flex">发布单位:
|
<span style="display:flex">发布单位:
|
||||||
<span v-text="detailObj.unitName"/>
|
<span v-text="detailObj.unitName"/>
|
||||||
</span>
|
</span>
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
<span class="Edit" @click="downFileAll"><i class="iconfont iconDownload"></i>下载全部</span>
|
<span class="Edit" @click="downFileAll"><i class="iconfont iconDownload"></i>下载全部</span>
|
||||||
</template>
|
</template>
|
||||||
<template #content>
|
<template #content>
|
||||||
<ai-file-list :fileList="detailObj.files" :fileOps="{ name: 'fileName', size: 'size' }" ></ai-file-list>
|
<ai-file-list :fileList="detailObj.files" :fileOps="{ name: 'fileName', size: 'size' }"></ai-file-list>
|
||||||
</template>
|
</template>
|
||||||
</ai-card>
|
</ai-card>
|
||||||
</template>
|
</template>
|
||||||
@@ -35,24 +35,25 @@
|
|||||||
<ai-search-bar>
|
<ai-search-bar>
|
||||||
<template #left>
|
<template #left>
|
||||||
<ai-select
|
<ai-select
|
||||||
v-model="search.readStatus"
|
v-model="search.readStatus"
|
||||||
@change="search.current=1,getList()"
|
@change="search.current=1,getList()"
|
||||||
placeholder="查阅状态"
|
placeholder="查阅状态"
|
||||||
:selectList="dict.getDict('announcementReadStatus')"
|
:selectList="dict.getDict('announcementReadStatus')"
|
||||||
></ai-select>
|
></ai-select>
|
||||||
</template>
|
</template>
|
||||||
<template #right>
|
<template #right>
|
||||||
<el-input v-model="search.readUserName" @keyup.enter.native="getList()" placeholder="姓名"
|
<el-input v-model="search.readUserName" @keyup.enter.native="getList()" placeholder="姓名"
|
||||||
size="small" suffix-icon="iconfont iconSearch" clearable @clear="search.current=1,getList()"></el-input>
|
size="small" suffix-icon="iconfont iconSearch" clearable
|
||||||
|
@clear="search.current=1,getList()"></el-input>
|
||||||
</template>
|
</template>
|
||||||
</ai-search-bar>
|
</ai-search-bar>
|
||||||
<ai-table
|
<ai-table
|
||||||
:tableData="tableData"
|
:tableData="tableData"
|
||||||
:col-configs="colConfigs"
|
:col-configs="colConfigs"
|
||||||
:total="total"
|
:total="total"
|
||||||
:current.sync="search.current"
|
:current.sync="search.current"
|
||||||
:size.sync="search.size"
|
:size.sync="search.size"
|
||||||
@getList="getList">
|
@getList="getList">
|
||||||
<el-table-column slot="readUserName" label="姓名" align="center">
|
<el-table-column slot="readUserName" label="姓名" align="center">
|
||||||
<template slot-scope="{ row }">
|
<template slot-scope="{ row }">
|
||||||
<span v-text="row.readUserName"/>
|
<span v-text="row.readUserName"/>
|
||||||
@@ -72,131 +73,132 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "manageDetail",
|
name: "manageDetail",
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
dict: Object,
|
dict: Object,
|
||||||
detail:Object
|
detail: Object
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
index: 0,
|
index: 0,
|
||||||
tableData: [],
|
tableData: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
detailObj: {},
|
detailObj: {},
|
||||||
search: {
|
search: {
|
||||||
current: 1,
|
current: 1,
|
||||||
size: 10
|
size: 10
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
tabTitle() {
|
|
||||||
return ["公告详情", "查询情况"];
|
|
||||||
},
|
|
||||||
colConfigs(){
|
|
||||||
return [
|
|
||||||
{slot:"readUserName"},
|
|
||||||
{prop:"readUserPhone",label:"手机号",align:"center"},
|
|
||||||
{slot:"unitName"},
|
|
||||||
{
|
|
||||||
prop:"readStatus",label:"查阅状态",align:"center",
|
|
||||||
render:(h,{row})=>[<span style={{color:this.dict.getColor("announcementReadStatus",row.readStatus)}}>{this.dict.getLabel("announcementReadStatus",row.readStatus)}</span>]
|
|
||||||
},
|
|
||||||
];
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
downFileAll () {
|
|
||||||
if (this.detailObj.files.length > 0) {
|
|
||||||
this.instance.post('/app/appannouncement/downLoadAllFileForDetail', null, {
|
|
||||||
responseType: 'blob',
|
|
||||||
params: {
|
|
||||||
id: this.detailObj.id
|
|
||||||
}
|
|
||||||
}).then((res) => {
|
|
||||||
const link = document.createElement('a')
|
|
||||||
let blob = new Blob([res], { type: 'application/octet-stream' })
|
|
||||||
link.style.display = 'none'
|
|
||||||
link.href = URL.createObjectURL(blob)
|
|
||||||
var num = ''
|
|
||||||
for (let i = 0; i < 10; i++) {
|
|
||||||
num += Math.ceil(Math.random() * 10)
|
|
||||||
}
|
|
||||||
link.setAttribute('download', '公告文件' + '.zip')
|
|
||||||
document.body.appendChild(link)
|
|
||||||
link.click()
|
|
||||||
document.body.removeChild(link)
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.$message.error('暂无附件提供下载')
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onChange(val){
|
|
||||||
if(val==0){
|
|
||||||
this.getDetail();
|
|
||||||
}else {
|
|
||||||
this.getList();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
getDetail() {
|
|
||||||
this.instance.post("/app/appannouncement/detail", null, {
|
|
||||||
params: {
|
|
||||||
id: this.detail.id
|
|
||||||
}
|
|
||||||
}).then(res => {
|
|
||||||
if (res && res.data) {
|
|
||||||
this.detailObj = res.data;
|
|
||||||
this.$initWxOpenData()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getList() {
|
|
||||||
this.instance.post("/app/appannouncementreader/list", null, {
|
|
||||||
params: {
|
|
||||||
announcementId: this.detail.id,
|
|
||||||
...this.search
|
|
||||||
}
|
|
||||||
}).then(res => {
|
|
||||||
if (res && res.data) {
|
|
||||||
this.tableData = res.data.records;
|
|
||||||
this.total = res.data.total;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.dict.load("announcementReadStatus").then(this.getDetail);
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
tabTitle() {
|
||||||
|
return ["公告详情", "查询情况"];
|
||||||
|
},
|
||||||
|
colConfigs() {
|
||||||
|
return [
|
||||||
|
{slot: "readUserName"},
|
||||||
|
{prop: "readUserPhone", label: "手机号", align: "center"},
|
||||||
|
{slot: "unitName"},
|
||||||
|
{
|
||||||
|
prop: "readStatus", label: "查阅状态", align: "center",
|
||||||
|
render: (h, {row}) => [<span
|
||||||
|
style={{color: this.dict.getColor("announcementReadStatus", row.readStatus)}}>{this.dict.getLabel("announcementReadStatus", row.readStatus)}</span>]
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
downFileAll() {
|
||||||
|
if (this.detailObj.files.length > 0) {
|
||||||
|
this.instance.post('/app/appannouncement/downLoadAllFileForDetail', null, {
|
||||||
|
responseType: 'blob',
|
||||||
|
params: {
|
||||||
|
id: this.detailObj.id
|
||||||
|
}
|
||||||
|
}).then((res) => {
|
||||||
|
const link = document.createElement('a')
|
||||||
|
let blob = new Blob([res], {type: 'application/octet-stream'})
|
||||||
|
link.style.display = 'none'
|
||||||
|
link.href = URL.createObjectURL(blob)
|
||||||
|
var num = ''
|
||||||
|
for (let i = 0; i < 10; i++) {
|
||||||
|
num += Math.ceil(Math.random() * 10)
|
||||||
|
}
|
||||||
|
link.setAttribute('download', '公告文件' + '.zip')
|
||||||
|
document.body.appendChild(link)
|
||||||
|
link.click()
|
||||||
|
document.body.removeChild(link)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.error('暂无附件提供下载')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onChange(val) {
|
||||||
|
if (val == 0) {
|
||||||
|
this.getDetail();
|
||||||
|
} else {
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getDetail() {
|
||||||
|
this.instance.post("/app/appannouncement/detail", null, {
|
||||||
|
params: {
|
||||||
|
id: this.detail.id
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if (res && res.data) {
|
||||||
|
this.detailObj = res.data;
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
this.instance.post("/app/appannouncementreader/list", null, {
|
||||||
|
params: {
|
||||||
|
announcementId: this.detail.id,
|
||||||
|
...this.search
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if (res && res.data) {
|
||||||
|
this.tableData = res.data.records;
|
||||||
|
this.total = res.data.total;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.dict.load("announcementReadStatus").then(this.getDetail);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
::v-deep .title {
|
::v-deep .title {
|
||||||
.aibar-left {
|
.aibar-left {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.file {
|
.file {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
padding: 0 8px;
|
padding: 0 8px;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #333;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 4px;
|
||||||
|
border: 1px solid #d0d4dc;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
& > span {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #333;
|
color: #333;
|
||||||
background: #fff;
|
|
||||||
border-radius: 4px;
|
|
||||||
border: 1px solid #d0d4dc;
|
|
||||||
margin-bottom: 16px;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.info {
|
|
||||||
& > span {
|
|
||||||
font-size: 14px;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -7,25 +7,25 @@
|
|||||||
<ai-select v-model="search.status" placeholder="发布状态" :selectList="dict.getDict('announcementStatus')"
|
<ai-select v-model="search.status" placeholder="发布状态" :selectList="dict.getDict('announcementStatus')"
|
||||||
@change="search.current = 1, getList()"></ai-select>
|
@change="search.current = 1, getList()"></ai-select>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
type="daterange"
|
type="daterange"
|
||||||
size="small"
|
size="small"
|
||||||
v-model="date"
|
v-model="date"
|
||||||
@change="search.current = 1,getList()"
|
@change="search.current = 1,getList()"
|
||||||
range-separator="至"
|
range-separator="至"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
start-placeholder="开始日期"
|
start-placeholder="开始日期"
|
||||||
end-placeholder="结束日期">
|
end-placeholder="结束日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</template>
|
</template>
|
||||||
<template slot="right">
|
<template slot="right">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="search.title"
|
v-model="search.title"
|
||||||
size="small"
|
size="small"
|
||||||
@keyup.enter.native="search.current = 1, getList()"
|
@keyup.enter.native="search.current = 1, getList()"
|
||||||
placeholder="标题"
|
placeholder="标题"
|
||||||
clearable
|
clearable
|
||||||
@clear="search.current = 1, search.title = '', getList()"
|
@clear="search.current = 1, search.title = '', getList()"
|
||||||
suffix-icon="iconfont iconSearch">
|
suffix-icon="iconfont iconSearch">
|
||||||
</el-input>
|
</el-input>
|
||||||
</template>
|
</template>
|
||||||
</ai-search-bar>
|
</ai-search-bar>
|
||||||
@@ -35,12 +35,12 @@
|
|||||||
</template>
|
</template>
|
||||||
</ai-search-bar>
|
</ai-search-bar>
|
||||||
<ai-table
|
<ai-table
|
||||||
:tableData="tableData"
|
:tableData="tableData"
|
||||||
:col-configs="colConfigs"
|
:col-configs="colConfigs"
|
||||||
:total="total"
|
:total="total"
|
||||||
:current.sync="search.current"
|
:current.sync="search.current"
|
||||||
:size.sync="search.size"
|
:size.sync="search.size"
|
||||||
@getList="getList">
|
@getList="getList">
|
||||||
<el-table-column slot="releaseUserName" label="发布人" align="center">
|
<el-table-column slot="releaseUserName" label="发布人" align="center">
|
||||||
<template slot-scope="{ row }">
|
<template slot-scope="{ row }">
|
||||||
<span v-text="row.releaseUserName"/>
|
<span v-text="row.releaseUserName"/>
|
||||||
@@ -65,11 +65,11 @@
|
|||||||
</template>
|
</template>
|
||||||
</ai-list>
|
</ai-list>
|
||||||
<ai-dialog
|
<ai-dialog
|
||||||
title="查阅状态"
|
title="查阅状态"
|
||||||
:visible.sync="visible"
|
:visible.sync="visible"
|
||||||
@closed="row={},readList=[]"
|
@closed="row={},readList=[]"
|
||||||
:customFooter="true"
|
:customFooter="true"
|
||||||
width="800px">
|
width="800px">
|
||||||
<template v-if="readObj.read && readObj.read.length">
|
<template v-if="readObj.read && readObj.read.length">
|
||||||
<header>已读人员</header>
|
<header>已读人员</header>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
@@ -94,171 +94,174 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "noticeManage",
|
name: "noticeManage",
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
dict: Object
|
dict: Object
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
search: {
|
search: {
|
||||||
title: "",
|
title: "",
|
||||||
status: "",
|
status: "",
|
||||||
size: 10,
|
size: 10,
|
||||||
current: 1,
|
current: 1,
|
||||||
},
|
|
||||||
date: [],
|
|
||||||
tableData: [],
|
|
||||||
total: 0,
|
|
||||||
visible: false,
|
|
||||||
row: {},
|
|
||||||
readObj:{},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
computed: {
|
|
||||||
colConfigs() {
|
|
||||||
return [
|
|
||||||
{prop: 'title', label: '标题'},
|
|
||||||
{
|
|
||||||
prop: 'readNum', label: '查询状态', align: 'center',
|
|
||||||
render:(h,{row})=>[<span class='status' onClick={this.showDialog.bind(this,row)}>{row.readNum}人已读,</span>,<span class='status' onClick={this.showDialog.bind(this,row)}>{row.unReadNum}人未读</span>]
|
|
||||||
},
|
|
||||||
{slot: 'releaseUserName'},
|
|
||||||
{slot: 'unitName'},
|
|
||||||
{prop: 'releaseTime', label: '发布时间', align: 'center'},
|
|
||||||
{
|
|
||||||
prop: 'status', label: '发布状态', align: 'center',
|
|
||||||
render:(h,{row})=>[<span style={{color:this.dict.getColor("announcementStatus",row.status)}}>{this.dict.getLabel("announcementStatus",row.status)}</span>]
|
|
||||||
},
|
|
||||||
{slot: 'options'},
|
|
||||||
];
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
|
||||||
showDialog(row) {
|
|
||||||
this.row = row;
|
|
||||||
this.getReadList();
|
|
||||||
},
|
},
|
||||||
toDetail(row){
|
date: [],
|
||||||
this.$emit('goPage', {
|
tableData: [],
|
||||||
comp: 'manageDetail',
|
total: 0,
|
||||||
row
|
visible: false,
|
||||||
});
|
row: {},
|
||||||
},
|
readObj: {},
|
||||||
toEdit(row){
|
|
||||||
this.$emit('goPage', {
|
|
||||||
comp: 'add',
|
|
||||||
row
|
|
||||||
});
|
|
||||||
},
|
|
||||||
publish(row,status){
|
|
||||||
this.$confirm(`是否要${status==0?'发布':'撤回'}该公告?`).then(()=>{
|
|
||||||
this.instance.post("/app/appannouncement/update-status",null,{
|
|
||||||
params: {
|
|
||||||
id:row.id
|
|
||||||
}
|
|
||||||
}).then(res=>{
|
|
||||||
if(res.code==0){
|
|
||||||
this.$message.success(status==0?'发布成功':'撤回成功');
|
|
||||||
this.getList();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
handleDel(row){
|
|
||||||
this.$confirm("是否要删除该公布?").then(()=>{
|
|
||||||
this.instance.post("/app/appannouncement/delete",null,{
|
|
||||||
params:{
|
|
||||||
ids:row.id
|
|
||||||
}
|
|
||||||
}).then(res=>{
|
|
||||||
if(res.code==0){
|
|
||||||
this.$message.success("删除成功");
|
|
||||||
this.getList();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
add(){
|
|
||||||
this.$emit('goPage', {
|
|
||||||
comp: 'add',
|
|
||||||
row: {},
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getReadList(){
|
|
||||||
this.instance.post("/app/appannouncementreader/list-unread",null,{
|
|
||||||
params:{
|
|
||||||
id:this.row.id
|
|
||||||
}
|
|
||||||
}).then(res=>{
|
|
||||||
if(res && res.data){
|
|
||||||
this.readObj = res.data;
|
|
||||||
this.visible = true;
|
|
||||||
this.$initWxOpenData()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getList() {
|
|
||||||
this.instance.post("/app/appannouncement/list-mgr",null,{
|
|
||||||
params:{
|
|
||||||
...this.search,
|
|
||||||
startTime: this.date?.length ? this.date[0] : null,
|
|
||||||
endTime: this.date?.length ? this.date[1] : null,
|
|
||||||
}
|
|
||||||
}).then(res=>{
|
|
||||||
if(res && res.data){
|
|
||||||
this.tableData = res.data.records;
|
|
||||||
this.total = res.data.total;
|
|
||||||
this.$initWxOpenData()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.dict.load("announcementStatus").then(this.getList)
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
colConfigs() {
|
||||||
|
return [
|
||||||
|
{prop: 'title', label: '标题'},
|
||||||
|
{
|
||||||
|
prop: 'readNum', label: '查询状态', align: 'center',
|
||||||
|
render: (h, {row}) => [<span class='status'
|
||||||
|
onClick={this.showDialog.bind(this, row)}>{row.readNum}人已读,</span>,
|
||||||
|
<span class='status' onClick={this.showDialog.bind(this, row)}>{row.unReadNum}人未读</span>]
|
||||||
|
},
|
||||||
|
{slot: 'releaseUserName'},
|
||||||
|
{slot: 'unitName'},
|
||||||
|
{prop: 'releaseTime', label: '发布时间', align: 'center'},
|
||||||
|
{
|
||||||
|
prop: 'status', label: '发布状态', align: 'center',
|
||||||
|
render: (h, {row}) => [<span
|
||||||
|
style={{color: this.dict.getColor("announcementStatus", row.status)}}>{this.dict.getLabel("announcementStatus", row.status)}</span>]
|
||||||
|
},
|
||||||
|
{slot: 'options'},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
showDialog(row) {
|
||||||
|
this.row = row;
|
||||||
|
this.getReadList();
|
||||||
|
},
|
||||||
|
toDetail(row) {
|
||||||
|
this.$emit('goPage', {
|
||||||
|
comp: 'manageDetail',
|
||||||
|
row
|
||||||
|
});
|
||||||
|
},
|
||||||
|
toEdit(row) {
|
||||||
|
this.$emit('goPage', {
|
||||||
|
comp: 'add',
|
||||||
|
row
|
||||||
|
});
|
||||||
|
},
|
||||||
|
publish(row, status) {
|
||||||
|
this.$confirm(`是否要${status == 0 ? '发布' : '撤回'}该公告?`).then(() => {
|
||||||
|
this.instance.post("/app/appannouncement/update-status", null, {
|
||||||
|
params: {
|
||||||
|
id: row.id
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.$message.success(status == 0 ? '发布成功' : '撤回成功');
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleDel(row) {
|
||||||
|
this.$confirm("是否要删除该公布?").then(() => {
|
||||||
|
this.instance.post("/app/appannouncement/delete", null, {
|
||||||
|
params: {
|
||||||
|
ids: row.id
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.$message.success("删除成功");
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
add() {
|
||||||
|
this.$emit('goPage', {
|
||||||
|
comp: 'add',
|
||||||
|
row: {},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getReadList() {
|
||||||
|
this.instance.post("/app/appannouncementreader/list-unread", null, {
|
||||||
|
params: {
|
||||||
|
id: this.row.id
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if (res && res.data) {
|
||||||
|
this.readObj = res.data;
|
||||||
|
this.visible = true;
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
this.instance.post("/app/appannouncement/list-mgr", null, {
|
||||||
|
params: {
|
||||||
|
...this.search,
|
||||||
|
startTime: this.date?.length ? this.date[0] : null,
|
||||||
|
endTime: this.date?.length ? this.date[1] : null,
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if (res && res.data) {
|
||||||
|
this.tableData = res.data.records;
|
||||||
|
this.total = res.data.total;
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.dict.load("announcementStatus").then(this.getList)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
::v-deep .status {
|
::v-deep .status {
|
||||||
color: rgba(41, 107, 251, 100);
|
color: rgba(41, 107, 251, 100);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
header{
|
header {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .wrap {
|
::v-deep .wrap {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
width: 50px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
flex-direction: column;
|
||||||
flex-wrap: wrap;
|
justify-content: center;
|
||||||
|
margin-right: 22px;
|
||||||
|
margin-bottom: 22px;
|
||||||
|
|
||||||
.item {
|
img {
|
||||||
width: 50px;
|
width: 100%;
|
||||||
display: flex;
|
height: 50px;
|
||||||
flex-direction: column;
|
border-radius: 50%;
|
||||||
justify-content: center;
|
}
|
||||||
margin-right: 22px;
|
|
||||||
margin-bottom: 22px;
|
|
||||||
|
|
||||||
img {
|
span {
|
||||||
width: 100%;
|
font-size: 14px;
|
||||||
height: 50px;
|
color: #333333;
|
||||||
border-radius: 50%;
|
text-align: center;
|
||||||
}
|
|
||||||
|
|
||||||
span{
|
|
||||||
font-size: 14px;
|
|
||||||
color: #333333;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -4,20 +4,20 @@
|
|||||||
<ai-search-bar>
|
<ai-search-bar>
|
||||||
<template #left>
|
<template #left>
|
||||||
<ai-select
|
<ai-select
|
||||||
v-model="search.readStatus"
|
v-model="search.readStatus"
|
||||||
@change="getList()"
|
@change="getList()"
|
||||||
placeholder="查阅状态"
|
placeholder="查阅状态"
|
||||||
:selectList="dict.getDict('announcementReadStatus')"
|
:selectList="dict.getDict('announcementReadStatus')"
|
||||||
></ai-select>
|
></ai-select>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="date"
|
v-model="date"
|
||||||
@change="search.current = 1,getList()"
|
@change="search.current = 1,getList()"
|
||||||
type="daterange"
|
type="daterange"
|
||||||
size="small"
|
size="small"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
range-separator="至"
|
range-separator="至"
|
||||||
start-placeholder="开始日期"
|
start-placeholder="开始日期"
|
||||||
end-placeholder="结束日期">
|
end-placeholder="结束日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</template>
|
</template>
|
||||||
<template #right>
|
<template #right>
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
<!-- <em v-if="item.readStatus==0"></em>-->
|
<!-- <em v-if="item.readStatus==0"></em>-->
|
||||||
<div class="status" v-if="item.readStatus==0">未读</div>
|
<div class="status" v-if="item.readStatus==0">未读</div>
|
||||||
<div class="status read" v-else>已读</div>
|
<div class="status read" v-else>已读</div>
|
||||||
{{item.title}}</label>
|
{{ item.title }}</label>
|
||||||
<el-row type="flex" justify="space-between" class="row">
|
<el-row type="flex" justify="space-between" class="row">
|
||||||
<span style="display:flex">
|
<span style="display:flex">
|
||||||
<b>发布人:</b>
|
<b>发布人:</b>
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<span>
|
<span>
|
||||||
<b>发布日期:</b>
|
<b>发布日期:</b>
|
||||||
{{item.releaseTime}}</span>
|
{{ item.releaseTime }}</span>
|
||||||
</el-row>
|
</el-row>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -53,16 +53,16 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="pagination" v-if="tableData.length>0">
|
<div class="pagination" v-if="tableData.length>0">
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@current-change="handleCurrentChange"
|
@current-change="handleCurrentChange"
|
||||||
@size-change="handleSizeChange"
|
@size-change="handleSizeChange"
|
||||||
background
|
background
|
||||||
:current-page.sync="search.current"
|
:current-page.sync="search.current"
|
||||||
:page-sizes="[5, 10, 50, 100,200]"
|
:page-sizes="[5, 10, 50, 100,200]"
|
||||||
:page-size="search.size"
|
:page-size="search.size"
|
||||||
layout="slot,->,prev, pager, next,sizes,jumper"
|
layout="slot,->,prev, pager, next,sizes,jumper"
|
||||||
:total="total">
|
:total="total">
|
||||||
<div class="page" style="text-align: left">共
|
<div class="page" style="text-align: left">共
|
||||||
<em>{{total}}</em>
|
<em>{{ total }}</em>
|
||||||
条记录
|
条记录
|
||||||
</div>
|
</div>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
@@ -72,146 +72,146 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "recentNotice",
|
name: "recentNotice",
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
dict: Object,
|
dict: Object,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
search: {
|
search: {
|
||||||
readStatus: "",
|
readStatus: "",
|
||||||
title: "",
|
title: "",
|
||||||
current: 1,
|
current: 1,
|
||||||
size: 10,
|
size: 10,
|
||||||
},
|
|
||||||
date: [],
|
|
||||||
tableData: [],
|
|
||||||
total: 0,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
pickerChange(e) {
|
|
||||||
console.log(e);
|
|
||||||
},
|
},
|
||||||
goDetail(item) {
|
date: [],
|
||||||
this.$emit('goPage', {
|
tableData: [],
|
||||||
row: item,
|
total: 0,
|
||||||
comp: 'detail'
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getList() {
|
|
||||||
this.instance.post(`/app/appannouncement/list-latest`, null, {
|
|
||||||
params: {
|
|
||||||
...this.search,
|
|
||||||
startTime: this.date?.length ? this.date[0] : null,
|
|
||||||
endTime: this.date?.length ? this.date[1] : null,
|
|
||||||
}
|
|
||||||
}).then(res => {
|
|
||||||
if (res && res.data) {
|
|
||||||
this.tableData = res.data.records;
|
|
||||||
this.total = res.data.total;
|
|
||||||
this.$initWxOpenData()
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
handleCurrentChange(val) {
|
|
||||||
this.search.current = val;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
handleSizeChange(val) {
|
|
||||||
this.search.size = val;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.dict.load("announcementReadStatus").then(_ => this.getList())
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
pickerChange(e) {
|
||||||
|
console.log(e);
|
||||||
|
},
|
||||||
|
goDetail(item) {
|
||||||
|
this.$emit('goPage', {
|
||||||
|
row: item,
|
||||||
|
comp: 'detail'
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
this.instance.post(`/app/appannouncement/list-latest`, null, {
|
||||||
|
params: {
|
||||||
|
...this.search,
|
||||||
|
startTime: this.date?.length ? this.date[0] : null,
|
||||||
|
endTime: this.date?.length ? this.date[1] : null,
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if (res && res.data) {
|
||||||
|
this.tableData = res.data.records;
|
||||||
|
this.total = res.data.total;
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.search.current = val;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.search.size = val;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.dict.load("announcementReadStatus").then(_ => this.getList())
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.body {
|
.body {
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
|
overflow: hidden;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
|
||||||
|
li {
|
||||||
|
height: 86px;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 16px 215px 16px 32px;
|
||||||
|
margin-top: 10px;
|
||||||
|
cursor: pointer;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: 0;
|
text-overflow: ellipsis;
|
||||||
margin: 0;
|
white-space: nowrap;
|
||||||
|
|
||||||
li {
|
label {
|
||||||
height: 86px;
|
display: flex;
|
||||||
background: #FFFFFF;
|
align-items: center;
|
||||||
border-radius: 4px;
|
position: relative;
|
||||||
box-sizing: border-box;
|
font-size: 16px;
|
||||||
padding: 16px 215px 16px 32px;
|
color: #222222;
|
||||||
margin-top: 10px;
|
|
||||||
cursor: pointer;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
|
|
||||||
label {
|
.status {
|
||||||
|
width: 40px;
|
||||||
|
height: 20px;
|
||||||
|
background: #FEF4E5;
|
||||||
|
color: #F79300;
|
||||||
|
border-radius: 4px;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: bold;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
position: relative;
|
justify-content: center;
|
||||||
font-size: 16px;
|
margin-right: 4px;
|
||||||
color: #222222;
|
}
|
||||||
|
|
||||||
.status {
|
.read {
|
||||||
width: 40px;
|
background: #EEEEEE;
|
||||||
height: 20px;
|
color: #999999;
|
||||||
background: #FEF4E5;
|
}
|
||||||
color: #F79300;
|
|
||||||
border-radius: 4px;
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: bold;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
margin-right: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.read{
|
em {
|
||||||
background: #EEEEEE;
|
width: 8px;
|
||||||
color: #999999;
|
height: 8px;
|
||||||
}
|
background: #ff4422;
|
||||||
|
border-radius: 50%;
|
||||||
em {
|
position: absolute;
|
||||||
width: 8px;
|
left: -16px;
|
||||||
height: 8px;
|
top: 4px;
|
||||||
background: #ff4422;
|
|
||||||
border-radius: 50%;
|
|
||||||
position: absolute;
|
|
||||||
left: -16px;
|
|
||||||
top: 4px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
::v-deep .row {
|
::v-deep .row {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #222222;
|
||||||
|
|
||||||
|
b {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #222222;
|
color: #888888;
|
||||||
|
|
||||||
b {
|
|
||||||
font-size: 14px;
|
|
||||||
color: #888888;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
::v-deep .page {
|
::v-deep .page {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #555555;
|
color: #555555;
|
||||||
|
|
||||||
em {
|
em {
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
color: rgb(34, 102, 255);
|
color: rgb(34, 102, 255);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user