Browse Source

信息发布

wangqin
王钦 7 months ago
parent
commit
f0217885ec
  1. 44
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/ReleaseInformation/index.vue

44
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/ReleaseInformation/index.vue

@ -25,7 +25,7 @@
</Descriptions> --> </Descriptions> -->
<div class="bottom"> <div class="bottom">
<ButtonGradient @click="confirm" class="title-button special-button"> <ButtonGradient @click.native="handleSubmit" :loading="submitting" class="title-button special-button">
一键发布 一键发布
</ButtonGradient> </ButtonGradient>
<!-- <ButtonGradient class="title-button special-button"> <!-- <ButtonGradient class="title-button special-button">
@ -42,7 +42,7 @@ import Form from '@screen/components/FormConfig';
import CheckboxGroup from '@screen/components/FormConfig/components/ElCheckboxGroup.vue'; import CheckboxGroup from '@screen/components/FormConfig/components/ElCheckboxGroup.vue';
import Descriptions from '@screen/components/Descriptions.vue'; import Descriptions from '@screen/components/Descriptions.vue';
import { provideMixin } from "./../../mixin" import { provideMixin } from "./../../mixin"
import { method, result } from "lodash"; import request from "@/utils/request";
export default { export default {
name: 'ReleaseInformation', name: 'ReleaseInformation',
@ -70,6 +70,7 @@ export default {
{ key: '3', label: '网站' }, { key: '3', label: '网站' },
{ key: '4', label: '新浪' }, { key: '4', label: '新浪' },
], ],
submitting: false,
formList: [{ formList: [{
label: "发布内容:", label: "发布内容:",
key: "content", key: "content",
@ -90,13 +91,44 @@ export default {
} }
}, },
methods: { methods: {
async confirm(){ async handleSubmit(){
await this.$refs.FormMsgRef.validate() await this.$refs.FormMsgRef.validate()
.then((res) => { .then(async (res) => {
console.log(res) const {content,type} = res;
if(content === null){
this.$message.warning(`未输入发布内容`);
return;
}
if(type.length === 0){
this.$message.warning(`未选择发布平台`);
return;
}
// res.eventid =
if(type.indexOf('1') !== -1){
res.phone = '13589019062'
}
res.eventId = this.detailData.id;
this.submitting = true;
await request({
url: `/business/sms/pushAll`,
method: "post",
data: res,
})
.then((result) => {
if (result.code != 200) return this.$message.error(result?.msg);
this.$message.success("提交成功");
this.modelVisible = false;
})
.catch(() => {
this.$message.error("提交失败");
})
.finally(() => {
this.submitting = false;
});
}) })
.catch((err) => { .catch((err) => {
console.log("catch"); console.log("catch"+err);
}); });
} }
} }

Loading…
Cancel
Save