将"发货"相关术语统一改为"发出",包括订单状态、按钮文字、提示信息等 将"收货"相关术语统一改为"收件",包括地址信息、表单标签、提示信息等 新增心理论坛模块,包含列表和新增/修改功能 调整订单状态显示为"待发出"和"已发出" 修改地址相关字段为"收件人"和"收件地址" 添加psychologicalForum.vue和psychologicalForum-add-or-update.vue文件
115 lines
2.9 KiB
Vue
115 lines
2.9 KiB
Vue
<template>
|
|
<el-dialog
|
|
width="1260px"
|
|
:title="!dataForm.id ? '新增' : '修改'"
|
|
:close-on-click-modal="false"
|
|
:visible.sync="visible"
|
|
@close="handlereset"
|
|
style="height: auto;"
|
|
>
|
|
<div style="margin-bottom: 60px;">
|
|
<el-form
|
|
style="height: auto;"
|
|
class="addFormBox"
|
|
:model="dataForm"
|
|
:rules="dataRule"
|
|
ref="dataForm"
|
|
label-width="80px"
|
|
>
|
|
<el-form-item label="链接地址" prop="url">
|
|
<el-input
|
|
v-model="dataForm.url"
|
|
placeholder="链接地址"
|
|
:rows="3"
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
</div>
|
|
|
|
<span slot="footer" class="dialog-footer">
|
|
<el-button @click="handlereset">取消</el-button>
|
|
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
|
</span>
|
|
</el-dialog>
|
|
</template>
|
|
|
|
<script>
|
|
import global from "../../common/common.vue"; //引入共用组间
|
|
export default {
|
|
data() {
|
|
return {
|
|
baseUrl: global.baseUrl,
|
|
visible: false,
|
|
dialogImageUrl: "",
|
|
dialogVisible: false,
|
|
dataForm: {
|
|
id: null,
|
|
title: '',
|
|
url: ''
|
|
},
|
|
dataRule: {
|
|
url: [
|
|
{ required: true, message: "链接地址不能为空", trigger: "blur" }
|
|
]
|
|
},
|
|
urlList: {
|
|
info: "/master/message/getMessageById",
|
|
add: "/common/wxPublicAccount/addWxPublicAccountArticle",
|
|
update: "/common/wxPublicAccount/updateWxPublicAccountArticle"
|
|
}
|
|
};
|
|
},
|
|
methods: {
|
|
init(row) {
|
|
this.dataForm = {
|
|
id: row && row.id || null,
|
|
url: row && row.url || ''
|
|
};
|
|
this.visible = true;
|
|
},
|
|
// 表单提交
|
|
dataFormSubmit() {
|
|
this.$refs["dataForm"].validate(valid => {
|
|
if (valid) {
|
|
// 这里应该是提交数据的逻辑
|
|
this.$http
|
|
.request({
|
|
url: this.dataForm.id ? this.$http.adornUrl(this.urlList.update) : this.$http.adornUrl(this.urlList.add),
|
|
method: "POST",
|
|
data: this.dataForm,
|
|
header: {
|
|
//默认 无 说明:请求头
|
|
"Content-Type": "application/json"
|
|
}
|
|
})
|
|
.then(({ data }) => {
|
|
if (data && data.code === 0) {
|
|
this.$message({
|
|
message: "操作成功",
|
|
type: "success",
|
|
duration: 1500,
|
|
onClose: () => {
|
|
this.visible = false;
|
|
this.$emit("refreshDataList");
|
|
}
|
|
});
|
|
} else {
|
|
this.$message.error(data.msg);
|
|
}
|
|
});
|
|
}
|
|
});
|
|
},
|
|
handlereset() {
|
|
this.visible = false;
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
/deep/ .addFormBox.el-form-item {
|
|
margin-bottom: 10px !important;
|
|
}
|
|
</style>
|