Browse Source

格式化代码

pull/127/head
xuxiaoming 3 years ago
parent
commit
129e9e2dbf
1 changed files with 18 additions and 16 deletions
  1. +18
    -16
      src/views/productionPlanning/customerForecastDemandReview/demandPlanning/articleDemand/public.vue

+ 18
- 16
src/views/productionPlanning/customerForecastDemandReview/demandPlanning/articleDemand/public.vue View File

@ -10,22 +10,24 @@
<el-col :span="24">
<el-form-item :label="getColumnName('PlanOrderVersion-Version')"
prop="PlanOrderVersion-Version">
<el-input v-model="formData['version']" placeholder="请输入" />
<el-input v-model="formData['version']"
placeholder="请输入" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="消息" >
<span>{{message}}</span>
<el-form-item label="消息">
<span>{{message}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="本周已发布版本ID" >
<el-form-item label="本周已发布版本ID">
<ul style="height:200px;white-space: nowrap; overflow-y: scroll;">
<li v-for="(history,index) in historyList" :key="index">{{history}}</li>
<li v-for="(history,index) in historyList"
:key="index">{{history}}</li>
</ul>
</el-form-item>
</el-col>
@ -43,7 +45,7 @@
</el-dialog>
</template>
<script>
import { publishIdentify,publicData } from '@/server/productionPlanning/customerForecastDemandReview'
import { publishIdentify, publicData } from '@/server/productionPlanning/customerForecastDemandReview'
export default {
emits: ["cancelHandle"],
@ -62,39 +64,39 @@
message: "此项不能为空",
trigger: "blur",
}, ],
},
loading: false,
message:"",
historyList:[],
message: "",
historyList: [],
formData: {}, //
};
},
created () {
created() {
this.publishIdentify();
},
methods: {
publishIdentify(){
publishIdentify() {
this.loading = true
publishIdentify().then( ({data = []}) => {
publishIdentify().then(({ data = [] }) => {
this.formData["version"] = data.version
this.message = data.message
this.historyList = data.publishedVersionNr
this.loading = false
}).catch((e) => {
this.$message({ type: "error", message: "获取发布信息失败"+e });
this.$message({ type: "error", message: "获取发布信息失败" + e });
this.loading = false
});
},
cancelHandle() {
this.$emit("cancelHandle",false)
this.$emit("cancelHandle", false)
},
submitForm() {
this.loading = true
publicData(this.formData).then( ({data = []}) => {
publicData(this.formData).then(({ data = [] }) => {
this.loading = false
this.$message({ type: "success", message: "发布成功" });
this.$emit("cancelHandle","submit")
this.$emit("cancelHandle", "submit")
}).catch(() => {
this.loading = false
this.$message({ type: "error", message: "发布失败" });


Loading…
Cancel
Save