Commit ba7cb957 authored by 高宇's avatar 高宇

Merge remote-tracking branch 'origin/master'

parents 9574ceb1 15c92254
......@@ -74,7 +74,7 @@ export default {
toolbar: {
container: toolbarOptions,
handlers: {
image: function (value) {
image: function(value) {
if (value) {
// 调用element的图片上传组件
document.querySelector('.avatar-uploader input').click()
......@@ -91,7 +91,7 @@ export default {
created() {
// TODO: clear this log
console.log(`this.value`, this.value)
console.log(`this.value`, this.value, this.type)
// this.content = ''
if (this.type === '1' || this.type === '2') {
this.content = this.value
......
......@@ -271,6 +271,7 @@ export default {
} else if (this.type === 1) {
this.form = this.$route.query.data
this.style = this.$route.query.data.style
this.isRestrictions = Number(this.$route.query.data.isRestrictions)
this.imageUrl = baseURL + this.form.imgUrl
this.richtexttype = '1'
this.formdisable = false
......@@ -278,6 +279,7 @@ export default {
} else if (this.type === 2) {
this.form = this.$route.query.data
this.style = this.$route.query.data.style
this.isRestrictions = Number(this.$route.query.data.isRestrictions)
this.imageUrl = baseURL + this.form.imgUrl
this.richtexttype = '2'
this.formdisable = true
......
<template>
<div style="padding: 0 20px">
<div v-if="type === 0" class="add-title">新增活动</div>
<div v-if="type === 1" class="add-title">编辑活动</div>
<div v-if="type === 0" class="add-title">新增公告</div>
<div v-if="type === 1" class="add-title">编辑公告</div>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="公告标题" prop="title">
<el-input v-model.trim="form.title" :maxlength="30" placeholder="请输入公告标题" />
......@@ -20,7 +20,7 @@
</template>
<script>
import { announcementadd, announcementupdate } from '@/api/announcement'
import { announcementadd, announcementupdate, queryannounceDetailById } from '@/api/announcement'
import quilleditor from '@/components/quilleditor'
export default {
name: 'Annoceaddorupdate',
......
......@@ -68,8 +68,8 @@
</el-table-column>
<el-table-column label="公告状态" align="center" prop="status">
<template slot-scope="scope">
<!-- <span v-if="scope.row.status === 0" style="color: #D84848 ">未发布</span>-->
<!-- <span v-if="scope.row.status === 1" style="color: #42AE5B">已发布</span>-->
<!-- <span v-if="scope.row.status === 0" style="color: #D84848 ">未发布</span>-->
<!-- <span v-if="scope.row.status === 1" style="color: #42AE5B">已发布</span>-->
<el-switch
:value="scope.row.status"
class="switchDisabledStyle"
......@@ -104,15 +104,15 @@
type="text"
@click="handleDelete(scope.row)"
>删除</el-button>
<!-- <el-switch-->
<!-- :value="scope.row.status"-->
<!-- class="switchDisabledStyle"-->
<!-- :active-value="1"-->
<!-- :inactive-value="0"-->
<!-- active-text="发布"-->
<!-- style="margin-left: 10px"-->
<!-- @change="handleStatusChange(scope.row)"-->
<!-- />-->
<!-- <el-switch-->
<!-- :value="scope.row.status"-->
<!-- class="switchDisabledStyle"-->
<!-- :active-value="1"-->
<!-- :inactive-value="0"-->
<!-- active-text="发布"-->
<!-- style="margin-left: 10px"-->
<!-- @change="handleStatusChange(scope.row)"-->
<!-- />-->
</template>
</el-table-column>
</el-table>
......@@ -170,7 +170,7 @@ import {
announcementdel,
announcementList,
announcementpublish,
announcementupdate
announcementupdate, queryannounceDetailById
} from '@/api/announcement'
export default {
......@@ -219,8 +219,9 @@ export default {
// 查询参数
queryParams: {
page: 1,
rows: 10
rows: 10
},
data: {},
// 表单参数
form: {},
// 表单校验
......@@ -332,12 +333,15 @@ export default {
// this.form = row
// this.open = true
// this.type = '1'
this.$router.push({
path: '/announcements/annoceaddorupdate',
query: {
type: 1,
data: row
}
const id = row.businessId
queryannounceDetailById(id).then(res => {
this.$router.push({
path: '/announcements/annoceaddorupdate',
query: {
type: 1,
data: res.data
}
})
})
},
/** 提交按钮 */
......
......@@ -739,11 +739,11 @@ export default {
handleUpdate(row) {
this.reset()
const userId = row.businessId || this.ids
this.title = '修改'
getUser(userId).then(response => {
this.open = true
this.form = response.data
this.roleList = row.roleList.map(Number)
this.title = '修改'
})
this.getChildrenDept(userId)
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment