|
@@ -12,9 +12,8 @@
|
|
|
</el-autocomplete>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="所属客户" prop="clientId" v-if="userinfo.tenantType == 1" >
|
|
|
- <!-- <el-form-item label="所属客户" prop="clientId"> -->
|
|
|
<!-- <el-select v-model="formData[0].clientId" :disabled="(formData[0].id && !this.row) ? true : false" -->
|
|
|
- <el-select v-model="formData[0].clientId" clearable
|
|
|
+ <el-select ref="select" v-model="formData[0].clientId" clearable
|
|
|
style="width: 100%;" placeholder="请选择客户">
|
|
|
<el-option
|
|
|
v-for="item in clientList"
|
|
@@ -35,7 +34,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="事件场景" prop="scenarioId">
|
|
|
<!-- <el-select v-model="formData[0].applicationScenarios[0]" :disabled="(formData[0].id && !this.row) ? true : false" -->
|
|
|
- <el-select v-model="formData[0].scenarioId"
|
|
|
+ <el-select ref="select2" v-model="formData[0].scenarioId"
|
|
|
style="width: 100%;" placeholder="请选择事件场景">
|
|
|
<el-option
|
|
|
v-for="item in commonData.ENTERPRISE_APPLICATION_SCENARIO ? commonData.ENTERPRISE_APPLICATION_SCENARIO : []"
|
|
@@ -191,9 +190,7 @@ export default {
|
|
|
this.type = type
|
|
|
if (data) {
|
|
|
this.title = '编辑事件'
|
|
|
- let form = JSON.parse(JSON.stringify(data))
|
|
|
- this.$set(this.formData, 0, form)
|
|
|
- // console.log(this.formData);
|
|
|
+ this.$set(this.formData, 0, data)
|
|
|
} else {
|
|
|
if (this.type == 1) {
|
|
|
this.title='新增事件'
|
|
@@ -213,8 +210,9 @@ export default {
|
|
|
},
|
|
|
//关闭弹窗
|
|
|
handleClose() {
|
|
|
- if (this.type=='1') {
|
|
|
- console.log(this.type);
|
|
|
+ if (this.type == '1') {
|
|
|
+ this.$refs.select.blur()
|
|
|
+ this.$refs.select2.blur()
|
|
|
this.$refs.ruleForm.resetFields()
|
|
|
}
|
|
|
this.dialogVisible = false
|
|
@@ -285,11 +283,12 @@ export default {
|
|
|
},
|
|
|
//提交保存、编辑事件接口
|
|
|
addInterface(forms) {
|
|
|
+ this.$emit('isAddEdit',forms)
|
|
|
let formData = new FormData()
|
|
|
// formData.append('file')//文件数据
|
|
|
formData.append('event', JSON.stringify(forms[0]))
|
|
|
if (forms[0].id) {//编辑
|
|
|
- this.$api.eventEditEvent(formData).then(res => {
|
|
|
+ this.$api.updateEvent(formData).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.$emit('isSuccess','编辑成功')
|
|
|
this.$message.success('事件编辑成功')
|
|
@@ -372,7 +371,6 @@ export default {
|
|
|
async querySearchQuestion(queryString, cb) {
|
|
|
this.eventInput=queryString
|
|
|
await this.questionEventList()
|
|
|
- console.log(this.questionNameArr, cb);
|
|
|
var records=[]
|
|
|
this.questionNameArr.forEach(item => {
|
|
|
item.value = item.name
|