Commit 1d2c82e4 by xinla

--no commit message

1 parent 1bce1eea
...@@ -68,22 +68,6 @@ export default { ...@@ -68,22 +68,6 @@ export default {
type || !data ? (this.disabled = false) : (this.disabled = true) type || !data ? (this.disabled = false) : (this.disabled = true)
this.$emit('edit', data, type) this.$emit('edit', data, type)
}, },
submit() {
this.$refs['form'].validate((valid) => {
if (valid) {
;(this.form.id ? update : add)(this.form)
.then(() => {
this.msgSuccess('操作成功')
this.dialogVisible = false
this.getList()
// this.getList(!this.form.id && 1)
})
.catch(() => {
this.dialogVisible = false
})
}
})
},
// 删除和撤销 // 删除和撤销
removke(id, action, tip) { removke(id, action, tip) {
// const operIds = id || this.ids + '' // const operIds = id || this.ids + ''
...@@ -127,7 +111,7 @@ export default { ...@@ -127,7 +111,7 @@ export default {
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<el-button type="text" @click="edit(row, 'detail')">详情</el-button> <el-button type="text" @click="edit(row, 'detail')">详情</el-button>
<el-button v-if="[0, 1].includes(row.status)" type="text" @click="edit(row, 'edit')">编辑</el-button> <el-button v-if="['0', '1'].includes(row.status + '')" type="text" @click="edit(row, 'edit')">编辑</el-button>
<el-button v-if="row.status == 2" type="text" @click="removke(row.id, 'revoke', '撤回')">撤回</el-button> <el-button v-if="row.status == 2" type="text" @click="removke(row.id, 'revoke', '撤回')">撤回</el-button>
<el-button v-else @click="removke(row.id, 'remove', '删除')" type="text">删除</el-button> <el-button v-else @click="removke(row.id, 'remove', '删除')" type="text">删除</el-button>
<!-- v-hasPermi="['customerManage:tag:remove']" --> <!-- v-hasPermi="['customerManage:tag:remove']" -->
......
...@@ -29,6 +29,7 @@ export default { ...@@ -29,6 +29,7 @@ export default {
formMsg: {}, formMsg: {},
dialogVisibleHistoryMsg: false, dialogVisibleHistoryMsg: false,
dialogVisibleSendMsg: false, dialogVisibleSendMsg: false,
disabled: false,
} }
}, },
watch: {}, watch: {},
...@@ -179,7 +180,8 @@ export default { ...@@ -179,7 +180,8 @@ export default {
<el-button <el-button
type="text" type="text"
@click=" @click="
agentId = item.agentId formMsg.agentId = item.agentId
formMsg.agentName = item.name
dialogVisibleHistoryMsg = true dialogVisibleHistoryMsg = true
"> ">
历史消息 历史消息
...@@ -280,12 +282,13 @@ export default { ...@@ -280,12 +282,13 @@ export default {
<el-dialog title="历史消息" :visible.sync="dialogVisibleHistoryMsg" :close-on-click-modal="false"> <el-dialog title="历史消息" :visible.sync="dialogVisibleHistoryMsg" :close-on-click-modal="false">
<HistoryMsg <HistoryMsg
ref="historyMsg" ref="historyMsg"
:id="agentId" :id="formMsg.agentId"
v-if="dialogVisibleHistoryMsg" v-if="dialogVisibleHistoryMsg"
@edit=" @edit="
(data) => { (data, type) => {
dialogVisibleSendMsg = true dialogVisibleSendMsg = true
formMsg = data disabled = type === 'detail'
formMsg = Object.assign({ agentId: formMsg.agentId, agentName: formMsg.agentName }, data)
} }
" /> " />
</el-dialog> </el-dialog>
...@@ -301,7 +304,7 @@ export default { ...@@ -301,7 +304,7 @@ export default {
<!-- 编辑/详情发送消息 弹窗 --> <!-- 编辑/详情发送消息 弹窗 -->
<el-dialog title="发送消息" :visible.sync="dialogVisibleSendMsg" :close-on-click-modal="false"> <el-dialog title="发送消息" :visible.sync="dialogVisibleSendMsg" :close-on-click-modal="false">
<MsgForm v-if="dialogVisibleSendMsg" :data="formMsg" @submit="submitSendMsg" /> <MsgForm v-if="dialogVisibleSendMsg" :data="formMsg" :disabled="disabled" @submit="submitSendMsg" />
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
......
...@@ -14,6 +14,9 @@ export default { ...@@ -14,6 +14,9 @@ export default {
type: Object, type: Object,
default: () => ({}), default: () => ({}),
}, },
disabled: {
type: Boolean,
},
}, },
data() { data() {
...@@ -212,7 +215,7 @@ export default { ...@@ -212,7 +215,7 @@ export default {
</el-form> </el-form>
</div> </div>
<div class="mt20"> <div v-if="!disabled" class="mt20">
<el-button @click="$emit('submit')">取 消</el-button> <el-button @click="$emit('submit')">取 消</el-button>
<el-button type="primary" @click="submit">确 定</el-button> <el-button type="primary" @click="submit">确 定</el-button>
</div> </div>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!