|
@ -162,13 +162,17 @@ |
|
|
prop="channel" |
|
|
prop="channel" |
|
|
label-width="150px" |
|
|
label-width="150px" |
|
|
style="display: block"> |
|
|
style="display: block"> |
|
|
<el-checkbox-group v-model="formData.channel"> |
|
|
|
|
|
|
|
|
<el-checkbox v-model="formData.isSelChannel" |
|
|
|
|
|
key="0" |
|
|
|
|
|
label="0">小程序通知</el-checkbox> |
|
|
|
|
|
<!-- <el-checkbox-group v-model="formData.channel"> |
|
|
<el-checkbox key="0" |
|
|
<el-checkbox key="0" |
|
|
label="0">小程序通知</el-checkbox> |
|
|
label="0">小程序通知</el-checkbox> |
|
|
<!-- <el-checkbox key="1" |
|
|
<el-checkbox key="1" |
|
|
label="1">短信通知</el-checkbox> --> |
|
|
label="1">短信通知</el-checkbox> |
|
|
|
|
|
|
|
|
</el-checkbox-group> |
|
|
</el-checkbox-group> --> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
<el-form-item label="通知内容" |
|
|
<el-form-item label="通知内容" |
|
@ -244,6 +248,7 @@ export default { |
|
|
natTime: '', |
|
|
natTime: '', |
|
|
natAddress: '', |
|
|
natAddress: '', |
|
|
natResult: '', |
|
|
natResult: '', |
|
|
|
|
|
isSelChannel: false, |
|
|
channel: [], |
|
|
channel: [], |
|
|
content: '', |
|
|
content: '', |
|
|
|
|
|
|
|
@ -270,7 +275,7 @@ export default { |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
|
|
|
async initForm (type, icNatId) { |
|
|
async initForm (type, icNatId) { |
|
|
|
|
|
this.startLoading() |
|
|
this.formData.agencyId = this.agencyId |
|
|
this.formData.agencyId = this.agencyId |
|
|
|
|
|
|
|
|
this.$refs['ref_form'].resetFields(); |
|
|
this.$refs['ref_form'].resetFields(); |
|
@ -284,6 +289,8 @@ export default { |
|
|
await this.loadFormData() |
|
|
await this.loadFormData() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.endLoading() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -354,7 +361,14 @@ export default { |
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
if (code === 0) { |
|
|
if (code === 0) { |
|
|
this.formData = data |
|
|
this.formData = data |
|
|
|
|
|
this.formData.channel = [] |
|
|
|
|
|
this.formData.content = '' |
|
|
this.formData.icNatId = this.icNatId |
|
|
this.formData.icNatId = this.icNatId |
|
|
|
|
|
if (this.formData.userId) { |
|
|
|
|
|
this.isFromResi = true |
|
|
|
|
|
} else { |
|
|
|
|
|
this.isFromResi = false |
|
|
|
|
|
} |
|
|
this.fileList = [] |
|
|
this.fileList = [] |
|
|
if (data.fileName) { |
|
|
if (data.fileName) { |
|
|
let obj = { |
|
|
let obj = { |
|
@ -378,10 +392,19 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
handleComfirm () { |
|
|
|
|
|
this.$refs['ref_form'].validate((valid, messageObj) => { |
|
|
|
|
|
if (!valid) { |
|
|
|
|
|
app.util.validateRule(messageObj) |
|
|
|
|
|
|
|
|
async handleComfirm () { |
|
|
} else { |
|
|
|
|
|
this.addNat() |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
async addNat () { |
|
|
const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //手机号码 |
|
|
const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //手机号码 |
|
|
if (regPhone.test(this.formData.mobile) === false) { |
|
|
if (regPhone.test(this.formData.mobile) === false) { |
|
|
this.btnDisable = false |
|
|
this.btnDisable = false |
|
@ -401,12 +424,19 @@ export default { |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (this.formData.channel.length > 0 && !this.formData.content) { |
|
|
if (this.formData.isSelChannel) { |
|
|
this.$message({ |
|
|
if (!this.formData.content) { |
|
|
type: 'warning', |
|
|
this.$message({ |
|
|
message: '请填写通知内容' |
|
|
type: 'warning', |
|
|
}) |
|
|
message: '请填写通知内容' |
|
|
return false; |
|
|
}) |
|
|
|
|
|
return false; |
|
|
|
|
|
} else { |
|
|
|
|
|
this.formData.channel = ['0'] |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
this.formData.channel = [] |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
this.btnDisable = true |
|
|
this.btnDisable = true |
|
@ -518,6 +548,7 @@ export default { |
|
|
natTime: '', |
|
|
natTime: '', |
|
|
natAddress: '', |
|
|
natAddress: '', |
|
|
natResult: '', |
|
|
natResult: '', |
|
|
|
|
|
isSelChannel: false, |
|
|
channel: [], |
|
|
channel: [], |
|
|
content: '', |
|
|
content: '', |
|
|
|
|
|
|
|
@ -565,9 +596,7 @@ export default { |
|
|
natResult: [ |
|
|
natResult: [ |
|
|
{ required: true }, |
|
|
{ required: true }, |
|
|
], |
|
|
], |
|
|
natAddress: [ |
|
|
|
|
|
{ required: false }, |
|
|
|
|
|
], |
|
|
|
|
|
channel: [ |
|
|
channel: [ |
|
|
{ required: false }, |
|
|
{ required: false }, |
|
|
], |
|
|
], |
|
|