页面整合
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="AppMassNotification">
|
<section class="AppMassNotification">
|
||||||
<keep-alive :include="['List']">
|
<keep-alive :include="['List']">
|
||||||
<component ref="component" :is="component" :instance="instance" :params="params" :dict="dict" @change="onChange"/>
|
<component ref="component" :is="currentPage" :instance="instance" :params="params" :dict="dict" @change="onChange"/>
|
||||||
</keep-alive>
|
</keep-alive>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
@@ -25,22 +25,18 @@ export default {
|
|||||||
include: [],
|
include: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
currentPage() {
|
||||||
|
const {hash} = this.$route
|
||||||
|
return hash == "#add" ? Add : List
|
||||||
|
},
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onChange(data) {
|
onChange(data) {
|
||||||
if (data.type === "Add") {
|
if (data.type === "Add") {
|
||||||
this.component = "Add";
|
this.$router.push({hash: "#add", query: data.params})
|
||||||
this.params = data.params;
|
} else {
|
||||||
}
|
this.$router.push({})
|
||||||
|
|
||||||
if (data.type === "List") {
|
|
||||||
this.component = "List";
|
|
||||||
this.params = data.params;
|
|
||||||
|
|
||||||
this.$nextTick(() => {
|
|
||||||
if (data.isRefresh) {
|
|
||||||
this.$refs.component.getTableData();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="Add">
|
<section class="Add">
|
||||||
<ai-detail v-if="!params.id">
|
<ai-detail v-if="!$route.query.id">
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<ai-title title="群发通知" isShowBack isShowBottomBorder @onBackClick="cancel(false)"></ai-title>
|
<ai-title title="群发通知" isShowBack isShowBottomBorder @onBackClick="cancel(false)"></ai-title>
|
||||||
</template>
|
</template>
|
||||||
@@ -76,15 +76,18 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 图片 -->
|
<!-- 图片 -->
|
||||||
<el-form-item label="图片" style="width: 100%" v-if="form.contentType == 'image'">
|
<el-form-item label="图片" style="width: 100%" v-if="form.contentType == 'image'">
|
||||||
<ai-uploader :instance="instance" isWechat v-model="imgList" acceptType=".jpg,.png,.jpeg" :limit="1" url="/app/wxcp/upload/uploadFile?type=image"></ai-uploader>
|
<ai-uploader :instance="instance" isWechat v-model="imgList" acceptType=".jpg,.png,.jpeg" :limit="1"
|
||||||
|
url="/app/wxcp/upload/uploadFile?type=image"></ai-uploader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 视频 -->
|
<!-- 视频 -->
|
||||||
<el-form-item label="视频" style="width: 100%" v-if="form.contentType == 'video'">
|
<el-form-item label="视频" style="width: 100%" v-if="form.contentType == 'video'">
|
||||||
<ai-uploader :instance="instance" fileType="file" isWechat acceptType=".mp4" v-model="videoList" :limit="1" url="/app/wxcp/upload/uploadFile?type=video"></ai-uploader>
|
<ai-uploader :instance="instance" fileType="file" isWechat acceptType=".mp4" v-model="videoList" :limit="1"
|
||||||
|
url="/app/wxcp/upload/uploadFile?type=video"></ai-uploader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 附件 -->
|
<!-- 附件 -->
|
||||||
<el-form-item label="附件" style="width: 100%" v-if="form.contentType == 'file'">
|
<el-form-item label="附件" style="width: 100%" v-if="form.contentType == 'file'">
|
||||||
<ai-uploader :instance="instance" fileType="file" isWechat v-model="filesList" :limit="1" url="/app/wxcp/upload/uploadFile?type=file"></ai-uploader>
|
<ai-uploader :instance="instance" fileType="file" isWechat v-model="filesList" :limit="1"
|
||||||
|
url="/app/wxcp/upload/uploadFile?type=file"></ai-uploader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -99,7 +102,7 @@
|
|||||||
|
|
||||||
</ai-detail>
|
</ai-detail>
|
||||||
|
|
||||||
<ai-detail class="add" v-if="params.id">
|
<ai-detail class="add" v-if="$route.query.id">
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<ai-title title="群发通知详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)"></ai-title>
|
<ai-title title="群发通知详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)"></ai-title>
|
||||||
</template>
|
</template>
|
||||||
@@ -143,16 +146,13 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {mapState} from "vuex";
|
import {mapState} from "vuex";
|
||||||
import AiDvWrapper from '../../../../project/dvui/layout/AiDvWrapper/AiDvWrapper.vue';
|
|
||||||
export default {
|
export default {
|
||||||
components: { AiDvWrapper },
|
|
||||||
name: 'Add',
|
name: 'Add',
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
dict: Object,
|
dict: Object
|
||||||
params: Object
|
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isShow: false,
|
isShow: false,
|
||||||
@@ -210,7 +210,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
if (this.params.id) {
|
if (this.$route.query.id) {
|
||||||
this.getInfo()
|
this.getInfo()
|
||||||
} else {
|
} else {
|
||||||
this.getSubTags()
|
this.getSubTags()
|
||||||
@@ -247,7 +247,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
getInfo() {
|
getInfo() {
|
||||||
this.instance.post(`/app/pushmessage/detail?id=${this.params.id}`).then(res => {
|
this.instance.post(`/app/pushmessage/detail?id=${this.$route.query.id}`).then(res => {
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
this.data = res.data
|
this.data = res.data
|
||||||
this.images = [{url: res.data.fileList.filter(e => e.contentType == "image")[0]?.accessUrl}]
|
this.images = [{url: res.data.fileList.filter(e => e.contentType == "image")[0]?.accessUrl}]
|
||||||
@@ -415,8 +415,10 @@ export default {
|
|||||||
.tag_title {
|
.tag_title {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag_item {
|
.tag_item {
|
||||||
margin: 5px 0;
|
margin: 5px 0;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
// padding: 5px 10px;
|
// padding: 5px 10px;
|
||||||
@@ -429,6 +431,7 @@ export default {
|
|||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.active {
|
.active {
|
||||||
background: #53bcea;
|
background: #53bcea;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
|
|||||||
@@ -50,6 +50,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {mapState} from 'vuex'
|
import {mapState} from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "List",
|
name: "List",
|
||||||
props: {
|
props: {
|
||||||
@@ -131,6 +132,7 @@ export default {
|
|||||||
.List {
|
.List {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: #f3f4f5;
|
background: #f3f4f5;
|
||||||
|
|
||||||
.count {
|
.count {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: #2266FF;
|
color: #2266FF;
|
||||||
@@ -142,6 +144,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
img, video {
|
img, video {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
|
|||||||
Reference in New Issue
Block a user