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>
|
||||
<template #left>
|
||||
<ai-select
|
||||
v-model="search.type"
|
||||
@change="search.current = 1, getList()"
|
||||
placeholder="项目类型"
|
||||
:selectList="$dict.getDict('questionnaireType')">
|
||||
v-model="search.type"
|
||||
@change="search.current = 1, getList()"
|
||||
placeholder="项目类型"
|
||||
:selectList="$dict.getDict('questionnaireType')">
|
||||
</ai-select>
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input
|
||||
v-model="search.title"
|
||||
size="small"
|
||||
placeholder="请输入模板名称或创建人"
|
||||
clearable
|
||||
@keyup.enter.native="search.current = 1, getList()"
|
||||
@clear="search.current = 1, search.title = '', getList()"
|
||||
suffix-icon="iconfont iconSearch">
|
||||
v-model="search.title"
|
||||
size="small"
|
||||
placeholder="请输入模板名称或创建人"
|
||||
clearable
|
||||
@keyup.enter.native="search.current = 1, getList()"
|
||||
@clear="search.current = 1, search.title = '', getList()"
|
||||
suffix-icon="iconfont iconSearch">
|
||||
</el-input>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
@@ -28,13 +28,13 @@
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table
|
||||
:tableData="tableData"
|
||||
:col-configs="colConfigs"
|
||||
:total="total"
|
||||
style="margin-top: 6px;"
|
||||
:current.sync="search.current"
|
||||
:size.sync="search.size"
|
||||
@getList="getList">
|
||||
:tableData="tableData"
|
||||
:col-configs="colConfigs"
|
||||
:total="total"
|
||||
style="margin-top: 6px;"
|
||||
:current.sync="search.current"
|
||||
:size.sync="search.size"
|
||||
@getList="getList">
|
||||
<el-table-column slot="type" width="120px" label="项目类型" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="tags-wrapper">
|
||||
@@ -53,10 +53,10 @@
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
<ai-dialog
|
||||
:visible.sync="isShow"
|
||||
width="800px"
|
||||
title="请选择新建模板类型"
|
||||
@onConfirm="onConfirm">
|
||||
:visible.sync="isShow"
|
||||
width="800px"
|
||||
title="请选择新建模板类型"
|
||||
@onConfirm="onConfirm">
|
||||
<div class="type-list">
|
||||
<div class="type-item" @click="currIndex = 0" :class="[currIndex === 0 ? 'active' : '']">
|
||||
<svg class="icon" aria-hidden="true">
|
||||
@@ -95,189 +95,188 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Template',
|
||||
export default {
|
||||
name: 'Template',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object
|
||||
props: {
|
||||
instance: Function,
|
||||
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 () {
|
||||
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: []
|
||||
}
|
||||
quote(id, type) {
|
||||
this.$emit('change', {
|
||||
type: 'add',
|
||||
params: {
|
||||
id,
|
||||
type,
|
||||
isQuote: true,
|
||||
templateType: 0
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
mounted () {
|
||||
this.getList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList () {
|
||||
this.instance.post(`/app/appquestionnairetemplate/list`, null, {
|
||||
params: {
|
||||
...this.search
|
||||
}
|
||||
}).then(res => {
|
||||
remove(id) {
|
||||
this.$confirm('确定删除该数据?').then(() => {
|
||||
this.instance.post(`/app/appquestionnairetemplate/deleteShareTemplate?ids=${id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.tableData = res.data.records
|
||||
this.total = res.data.total
|
||||
this.$initWxOpenData()
|
||||
this.$message.success('删除成功!')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
quote (id, type) {
|
||||
this.$emit('change', {
|
||||
type: 'add',
|
||||
params: {
|
||||
id,
|
||||
type,
|
||||
isQuote: true,
|
||||
templateType: 0
|
||||
}
|
||||
})
|
||||
},
|
||||
toAdd(id) {
|
||||
this.$emit('change', {
|
||||
type: 'Add',
|
||||
params: {
|
||||
id
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
remove (id) {
|
||||
this.$confirm('确定删除该数据?').then(() => {
|
||||
this.instance.post(`/app/appquestionnairetemplate/deleteShareTemplate?ids=${id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('删除成功!')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
toEdit(id, type) {
|
||||
this.$emit('change', {
|
||||
type: 'add',
|
||||
params: {
|
||||
id,
|
||||
type,
|
||||
templateType: 1
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toAdd (id) {
|
||||
this.$emit('change', {
|
||||
type: 'Add',
|
||||
params: {
|
||||
id
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
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
|
||||
}
|
||||
})
|
||||
}
|
||||
onConfirm() {
|
||||
this.$emit('change', {
|
||||
type: 'add',
|
||||
params: {
|
||||
id: '',
|
||||
templateType: 1,
|
||||
type: this.currIndex
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.template {
|
||||
.tags-wrapper {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.template {
|
||||
.tags-wrapper {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.type-list {
|
||||
.type-list {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.type-item {
|
||||
display: flex;
|
||||
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 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
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 {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
svg {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
&.active {
|
||||
border: 1px solid #2266FF;
|
||||
}
|
||||
|
||||
&.active {
|
||||
border: 1px solid #2266FF;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
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>
|
||||
|
||||
@@ -246,7 +246,7 @@ export default {
|
||||
if (res?.data) {
|
||||
this.info.attendees = res.data.records;
|
||||
this.total = res.data.total;
|
||||
this.$initWxOpenData()
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@@ -133,7 +133,7 @@ export default {
|
||||
if (res && res.data) {
|
||||
this.tableData = res.data.records;
|
||||
this.total = res.data.total;
|
||||
this.$initWxOpenData()
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@@ -114,7 +114,7 @@ export default {
|
||||
if (res?.data) {
|
||||
this.tableData = res.data.records
|
||||
this.page.total = res.data.total
|
||||
this.$initWxOpenData()
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<template>
|
||||
<ai-detail>
|
||||
<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 #content>
|
||||
<ai-card title="基本信息">
|
||||
@@ -19,8 +20,8 @@
|
||||
<el-form-item label="发送对象" prop="persons">
|
||||
<el-row type="flex" align="middle">
|
||||
<div class="text-area">
|
||||
<span v-text="item.name"/>
|
||||
<span v-if="persons.length">等{{persons.length}}人</span>
|
||||
<span v-text="item.name"/>
|
||||
<span v-if="persons.length">等{{ persons.length }}人</span>
|
||||
</div>
|
||||
<ai-wechat-selecter v-model="form.persons" :instance="instance" @change="onChange">
|
||||
<el-button type="info">选择</el-button>
|
||||
@@ -36,12 +37,12 @@
|
||||
</el-form-item>
|
||||
<el-form-item prop="releaseTime" class="picker" v-if="form.type==1">
|
||||
<el-date-picker
|
||||
v-model="form.releaseTime"
|
||||
style="margin-left: 10px;"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
size="small"
|
||||
type="datetime"
|
||||
placeholder="请选择">
|
||||
v-model="form.releaseTime"
|
||||
style="margin-left: 10px;"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
size="small"
|
||||
type="datetime"
|
||||
placeholder="请选择">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
@@ -58,126 +59,128 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "add",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
detail: Object,
|
||||
},
|
||||
data() {
|
||||
export default {
|
||||
name: "add",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
detail: Object,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
id: null,
|
||||
title: "",
|
||||
content: "",
|
||||
files: [],
|
||||
persons: [],
|
||||
type: 0,
|
||||
releaseTime: null,
|
||||
},
|
||||
persons: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
rules() {
|
||||
return {
|
||||
form: {
|
||||
id: null,
|
||||
title: "",
|
||||
content: "",
|
||||
files: [],
|
||||
persons: [],
|
||||
type: 0,
|
||||
releaseTime: null,
|
||||
},
|
||||
persons:[],
|
||||
}
|
||||
title: [
|
||||
{required: true, message: '请输入公告标题'},
|
||||
],
|
||||
content: [
|
||||
{required: true, message: '请输入公告内容'},
|
||||
],
|
||||
persons: [
|
||||
{required: true, message: '请选择发送对象'},
|
||||
],
|
||||
type: [
|
||||
{required: true},
|
||||
],
|
||||
releaseTime: [
|
||||
{required: true, message: '请选择发送时间'},
|
||||
],
|
||||
};
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onChange(e) {
|
||||
this.form.persons = e;
|
||||
this.persons = e;
|
||||
this.$refs["form"].validateField("persons");
|
||||
},
|
||||
computed: {
|
||||
rules() {
|
||||
return {
|
||||
title: [
|
||||
{required: true, message: '请输入公告标题'},
|
||||
],
|
||||
content: [
|
||||
{required: true, message: '请输入公告内容'},
|
||||
],
|
||||
persons: [
|
||||
{required: true, message: '请选择发送对象'},
|
||||
],
|
||||
type: [
|
||||
{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("发送时间要大于当前时间")
|
||||
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();
|
||||
}
|
||||
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(){
|
||||
if(this.detail?.id){
|
||||
this.getDetail();
|
||||
}
|
||||
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;
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if (this.detail?.id) {
|
||||
this.getDetail();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .picker {
|
||||
width: 300px;
|
||||
::v-deep .picker {
|
||||
width: 300px;
|
||||
|
||||
.el-form-item__content {
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
.el-form-item__content {
|
||||
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{
|
||||
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:"、";
|
||||
}
|
||||
&:nth-child(2):after{
|
||||
content:"";
|
||||
}
|
||||
&:nth-child(2):after {
|
||||
content: "";
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<ai-card :title="detailObj.title" class="title">
|
||||
<template #content>
|
||||
<el-row type="flex" justify="space-between" class="info">
|
||||
<span>时间:{{detailObj.releaseTime}}</span>
|
||||
<span>时间:{{ detailObj.releaseTime }}</span>
|
||||
<span style="display:flex">发布单位:
|
||||
<span v-text="detailObj.unitName"/>
|
||||
</span>
|
||||
@@ -20,9 +20,10 @@
|
||||
</ai-card>
|
||||
<ai-card title="附件" v-if="detailObj.files && detailObj.files.length">
|
||||
<template #content>
|
||||
<el-row type="flex" justify="space-between" class="file" v-for="(item,index) in detailObj.files" :key="index" @click.native="open(item)">
|
||||
<span>{{item.fileName}}</span>
|
||||
<span>{{(item.size/1024).toFixed(2)}}KB</span>
|
||||
<el-row type="flex" justify="space-between" class="file" v-for="(item,index) in detailObj.files" :key="index"
|
||||
@click.native="open(item)">
|
||||
<span>{{ item.fileName }}</span>
|
||||
<span>{{ (item.size / 1024).toFixed(2) }}KB</span>
|
||||
</el-row>
|
||||
</template>
|
||||
</ai-card>
|
||||
@@ -31,64 +32,64 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "detail",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
detail: Object
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
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()
|
||||
}
|
||||
})
|
||||
export default {
|
||||
name: "detail",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
detail: Object
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
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;
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .title {
|
||||
.aibar-left {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
::v-deep .title {
|
||||
.aibar-left {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.file {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
padding: 0 8px;
|
||||
.file {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
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;
|
||||
color: #333;
|
||||
background: #fff;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #d0d4dc;
|
||||
margin-bottom: 16px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.info {
|
||||
& > span {
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<ai-card :title="detailObj.title" class="title">
|
||||
<template #content>
|
||||
<el-row type="flex" justify="space-between" class="info">
|
||||
<span>时间:{{detailObj.releaseTime}}</span>
|
||||
<span>时间:{{ detailObj.releaseTime }}</span>
|
||||
<span style="display:flex">发布单位:
|
||||
<span v-text="detailObj.unitName"/>
|
||||
</span>
|
||||
@@ -25,7 +25,7 @@
|
||||
<span class="Edit" @click="downFileAll"><i class="iconfont iconDownload"></i>下载全部</span>
|
||||
</template>
|
||||
<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>
|
||||
</ai-card>
|
||||
</template>
|
||||
@@ -35,24 +35,25 @@
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<ai-select
|
||||
v-model="search.readStatus"
|
||||
@change="search.current=1,getList()"
|
||||
placeholder="查阅状态"
|
||||
:selectList="dict.getDict('announcementReadStatus')"
|
||||
v-model="search.readStatus"
|
||||
@change="search.current=1,getList()"
|
||||
placeholder="查阅状态"
|
||||
:selectList="dict.getDict('announcementReadStatus')"
|
||||
></ai-select>
|
||||
</template>
|
||||
<template #right>
|
||||
<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>
|
||||
</ai-search-bar>
|
||||
<ai-table
|
||||
:tableData="tableData"
|
||||
:col-configs="colConfigs"
|
||||
:total="total"
|
||||
:current.sync="search.current"
|
||||
:size.sync="search.size"
|
||||
@getList="getList">
|
||||
:tableData="tableData"
|
||||
:col-configs="colConfigs"
|
||||
:total="total"
|
||||
:current.sync="search.current"
|
||||
:size.sync="search.size"
|
||||
@getList="getList">
|
||||
<el-table-column slot="readUserName" label="姓名" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<span v-text="row.readUserName"/>
|
||||
@@ -72,131 +73,132 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "manageDetail",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
detail:Object
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
index: 0,
|
||||
tableData: [],
|
||||
total: 0,
|
||||
detailObj: {},
|
||||
search: {
|
||||
current: 1,
|
||||
size: 10
|
||||
}
|
||||
export default {
|
||||
name: "manageDetail",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
detail: Object
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
index: 0,
|
||||
tableData: [],
|
||||
total: 0,
|
||||
detailObj: {},
|
||||
search: {
|
||||
current: 1,
|
||||
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>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .title {
|
||||
.aibar-left {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
::v-deep .title {
|
||||
.aibar-left {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.file {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
padding: 0 8px;
|
||||
.file {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
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;
|
||||
color: #333;
|
||||
background: #fff;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #d0d4dc;
|
||||
margin-bottom: 16px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.info {
|
||||
& > span {
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -7,25 +7,25 @@
|
||||
<ai-select v-model="search.status" placeholder="发布状态" :selectList="dict.getDict('announcementStatus')"
|
||||
@change="search.current = 1, getList()"></ai-select>
|
||||
<el-date-picker
|
||||
type="daterange"
|
||||
size="small"
|
||||
v-model="date"
|
||||
@change="search.current = 1,getList()"
|
||||
range-separator="至"
|
||||
value-format="yyyy-MM-dd"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
type="daterange"
|
||||
size="small"
|
||||
v-model="date"
|
||||
@change="search.current = 1,getList()"
|
||||
range-separator="至"
|
||||
value-format="yyyy-MM-dd"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</template>
|
||||
<template slot="right">
|
||||
<el-input
|
||||
v-model="search.title"
|
||||
size="small"
|
||||
@keyup.enter.native="search.current = 1, getList()"
|
||||
placeholder="标题"
|
||||
clearable
|
||||
@clear="search.current = 1, search.title = '', getList()"
|
||||
suffix-icon="iconfont iconSearch">
|
||||
v-model="search.title"
|
||||
size="small"
|
||||
@keyup.enter.native="search.current = 1, getList()"
|
||||
placeholder="标题"
|
||||
clearable
|
||||
@clear="search.current = 1, search.title = '', getList()"
|
||||
suffix-icon="iconfont iconSearch">
|
||||
</el-input>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
@@ -35,12 +35,12 @@
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table
|
||||
:tableData="tableData"
|
||||
:col-configs="colConfigs"
|
||||
:total="total"
|
||||
:current.sync="search.current"
|
||||
:size.sync="search.size"
|
||||
@getList="getList">
|
||||
:tableData="tableData"
|
||||
:col-configs="colConfigs"
|
||||
:total="total"
|
||||
:current.sync="search.current"
|
||||
:size.sync="search.size"
|
||||
@getList="getList">
|
||||
<el-table-column slot="releaseUserName" label="发布人" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<span v-text="row.releaseUserName"/>
|
||||
@@ -65,11 +65,11 @@
|
||||
</template>
|
||||
</ai-list>
|
||||
<ai-dialog
|
||||
title="查阅状态"
|
||||
:visible.sync="visible"
|
||||
@closed="row={},readList=[]"
|
||||
:customFooter="true"
|
||||
width="800px">
|
||||
title="查阅状态"
|
||||
:visible.sync="visible"
|
||||
@closed="row={},readList=[]"
|
||||
:customFooter="true"
|
||||
width="800px">
|
||||
<template v-if="readObj.read && readObj.read.length">
|
||||
<header>已读人员</header>
|
||||
<div class="wrap">
|
||||
@@ -94,171 +94,174 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "noticeManage",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
search: {
|
||||
title: "",
|
||||
status: "",
|
||||
size: 10,
|
||||
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();
|
||||
export default {
|
||||
name: "noticeManage",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
search: {
|
||||
title: "",
|
||||
status: "",
|
||||
size: 10,
|
||||
current: 1,
|
||||
},
|
||||
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;
|
||||
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)
|
||||
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) {
|
||||
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>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .status {
|
||||
color: rgba(41, 107, 251, 100);
|
||||
cursor: pointer;
|
||||
}
|
||||
::v-deep .status {
|
||||
color: rgba(41, 107, 251, 100);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
header{
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
header {
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
::v-deep .wrap {
|
||||
::v-deep .wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.item {
|
||||
width: 50px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
margin-right: 22px;
|
||||
margin-bottom: 22px;
|
||||
|
||||
.item {
|
||||
width: 50px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
margin-right: 22px;
|
||||
margin-bottom: 22px;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
span{
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
text-align: center;
|
||||
}
|
||||
span {
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -4,20 +4,20 @@
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<ai-select
|
||||
v-model="search.readStatus"
|
||||
@change="getList()"
|
||||
placeholder="查阅状态"
|
||||
:selectList="dict.getDict('announcementReadStatus')"
|
||||
v-model="search.readStatus"
|
||||
@change="getList()"
|
||||
placeholder="查阅状态"
|
||||
:selectList="dict.getDict('announcementReadStatus')"
|
||||
></ai-select>
|
||||
<el-date-picker
|
||||
v-model="date"
|
||||
@change="search.current = 1,getList()"
|
||||
type="daterange"
|
||||
size="small"
|
||||
value-format="yyyy-MM-dd"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
v-model="date"
|
||||
@change="search.current = 1,getList()"
|
||||
type="daterange"
|
||||
size="small"
|
||||
value-format="yyyy-MM-dd"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</template>
|
||||
<template #right>
|
||||
@@ -33,7 +33,7 @@
|
||||
<!-- <em v-if="item.readStatus==0"></em>-->
|
||||
<div class="status" v-if="item.readStatus==0">未读</div>
|
||||
<div class="status read" v-else>已读</div>
|
||||
{{item.title}}</label>
|
||||
{{ item.title }}</label>
|
||||
<el-row type="flex" justify="space-between" class="row">
|
||||
<span style="display:flex">
|
||||
<b>发布人:</b>
|
||||
@@ -45,7 +45,7 @@
|
||||
</span>
|
||||
<span>
|
||||
<b>发布日期:</b>
|
||||
{{item.releaseTime}}</span>
|
||||
{{ item.releaseTime }}</span>
|
||||
</el-row>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -53,16 +53,16 @@
|
||||
</div>
|
||||
<div class="pagination" v-if="tableData.length>0">
|
||||
<el-pagination
|
||||
@current-change="handleCurrentChange"
|
||||
@size-change="handleSizeChange"
|
||||
background
|
||||
:current-page.sync="search.current"
|
||||
:page-sizes="[5, 10, 50, 100,200]"
|
||||
:page-size="search.size"
|
||||
layout="slot,->,prev, pager, next,sizes,jumper"
|
||||
:total="total">
|
||||
@current-change="handleCurrentChange"
|
||||
@size-change="handleSizeChange"
|
||||
background
|
||||
:current-page.sync="search.current"
|
||||
:page-sizes="[5, 10, 50, 100,200]"
|
||||
:page-size="search.size"
|
||||
layout="slot,->,prev, pager, next,sizes,jumper"
|
||||
:total="total">
|
||||
<div class="page" style="text-align: left">共
|
||||
<em>{{total}}</em>
|
||||
<em>{{ total }}</em>
|
||||
条记录
|
||||
</div>
|
||||
</el-pagination>
|
||||
@@ -72,146 +72,146 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "recentNotice",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
search: {
|
||||
readStatus: "",
|
||||
title: "",
|
||||
current: 1,
|
||||
size: 10,
|
||||
},
|
||||
date: [],
|
||||
tableData: [],
|
||||
total: 0,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
pickerChange(e) {
|
||||
console.log(e);
|
||||
export default {
|
||||
name: "recentNotice",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
search: {
|
||||
readStatus: "",
|
||||
title: "",
|
||||
current: 1,
|
||||
size: 10,
|
||||
},
|
||||
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;
|
||||
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())
|
||||
date: [],
|
||||
tableData: [],
|
||||
total: 0,
|
||||
}
|
||||
},
|
||||
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>
|
||||
|
||||
<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;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
|
||||
li {
|
||||
height: 86px;
|
||||
background: #FFFFFF;
|
||||
border-radius: 4px;
|
||||
box-sizing: border-box;
|
||||
padding: 16px 215px 16px 32px;
|
||||
margin-top: 10px;
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
font-size: 16px;
|
||||
color: #222222;
|
||||
|
||||
label {
|
||||
.status {
|
||||
width: 40px;
|
||||
height: 20px;
|
||||
background: #FEF4E5;
|
||||
color: #F79300;
|
||||
border-radius: 4px;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
font-size: 16px;
|
||||
color: #222222;
|
||||
justify-content: center;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.status {
|
||||
width: 40px;
|
||||
height: 20px;
|
||||
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 {
|
||||
background: #EEEEEE;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.read{
|
||||
background: #EEEEEE;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
em {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
background: #ff4422;
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
left: -16px;
|
||||
top: 4px;
|
||||
}
|
||||
em {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
background: #ff4422;
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
left: -16px;
|
||||
top: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .row {
|
||||
margin-top: 10px;
|
||||
::v-deep .row {
|
||||
margin-top: 10px;
|
||||
|
||||
span {
|
||||
span {
|
||||
font-size: 14px;
|
||||
color: #222222;
|
||||
|
||||
b {
|
||||
font-size: 14px;
|
||||
color: #222222;
|
||||
|
||||
b {
|
||||
font-size: 14px;
|
||||
color: #888888;
|
||||
}
|
||||
color: #888888;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .page {
|
||||
font-size: 12px;
|
||||
color: #555555;
|
||||
::v-deep .page {
|
||||
font-size: 12px;
|
||||
color: #555555;
|
||||
|
||||
em {
|
||||
font-style: normal;
|
||||
color: rgb(34, 102, 255);
|
||||
}
|
||||
em {
|
||||
font-style: normal;
|
||||
color: rgb(34, 102, 255);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user