From 57b7e93baf35afbb9e1c569477052daa01de4699 Mon Sep 17 00:00:00 2001
From: zhaoxiaoqiang <287285524@qq.com>
Date: Wed, 06 Sep 2023 17:56:20 +0800
Subject: [PATCH] 编辑器,项目新增,管理员订单管理
---
src/views/qyp-project-management/index.vue | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/src/views/qyp-project-management/index.vue b/src/views/qyp-project-management/index.vue
index d9398b0..c13b62b 100644
--- a/src/views/qyp-project-management/index.vue
+++ b/src/views/qyp-project-management/index.vue
@@ -13,7 +13,6 @@
<el-input
v-model.trim="formInline.projName"
style="width: 240px"
- @keyup.native="keyupEvent($event)"
type="tel"
clearable
placeholder="请输入"
@@ -71,7 +70,7 @@
}"
></Etable>
</div>
- <el-dialog top="2vh" :title="title" :visible.sync="addProd" width="60%">
+ <el-dialog top="2vh" :title="title" :visible.sync="addProd" width="1000px">
<!-- 新增商品名称 -->
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" size="small" label-width="120px" class="demo-ruleForm">
<el-form-item label="项目名称" prop="projName">
@@ -100,23 +99,19 @@
<el-form-item label="项目优惠券图片" ref="titleFilePath" prop="titleFilePath">
<uploadImg v-if="addProd" @sendList="imgSet($event,'titleFilePath')" :disabled="disabled" :defaultList="ruleForm.titleFilePath"></uploadImg>
</el-form-item>
- <el-form-item label="会员权益" ref="qyFilePath" prop="qyFilePath">
+ <el-form-item label="会员权益" ref="qyFilePath">
<uploadImg v-if="addProd" @sendList="imgSet($event,'qyFilePath')" :disabled="disabled" :defaultList="ruleForm.qyFilePath"></uploadImg>
</el-form-item>
- <!-- <el-form-item label="活动规则" ref="ruleFilePath" prop="ruleFilePath">
- <uploadImg v-if="addProd" @sendList="imgSet($event,'ruleFilePath')" :disabled="disabled" :defaultList="ruleForm.ruleFilePath"></uploadImg>
- </el-form-item> -->
<el-form-item label="活动规则" prop="ruleContent">
- <el-input type="textarea" v-model="ruleForm.ruleContent" :disabled="disabled"></el-input>
- <!-- <uploadImg v-if="addProd" @sendList="imgSet($event,'ruleFilePath')" :disabled="disabled" :defaultList="ruleForm.ruleFilePath"></uploadImg> -->
+ <tinymce v-model="ruleForm.ruleContent" :disabled="disabled" :height="300" />
</el-form-item>
<el-form-item style="text-align:right;" v-if="!disabled">
<el-button type="primary" @click="submitForm('ruleForm')">保存</el-button>
<!-- <el-button @click="resetForm('ruleForm')">重置</el-button> -->
</el-form-item>
</el-form>
-
</el-dialog>
+
</div>
</template>
@@ -124,9 +119,10 @@
import Etable from "../../components/table.vue";
import {projectInit,projectAdd,projectDtl,projectUpdata} from "@/api/credit";
import uploadImg from "@/components/upload.vue";
+ import Tinymce from '@/components/Tinymce'
export default {
name: "order",
- components: { Etable,uploadImg },
+ components: { Etable,uploadImg,Tinymce },
data() {
let backFilePathImage = (rule, value, callback) => { //验证器
if (!this.ruleForm.backFilePath.length) { //为true代表图片在 false报错
@@ -301,6 +297,9 @@
],
ruleFilePath: [
{ required: true, trigger: 'change',validator: ruleFilePathImage }
+ ],
+ ruleContent:[
+ { required: true, message: '请输入活动规则', trigger: 'blur', }
]
},
title:"新增项目"
@@ -368,7 +367,7 @@
}
let objForm = JSON.parse(JSON.stringify(this.formInline));
for (let key in objForm) {
- if (objForm[key] === "all") {
+ if (objForm[key] === "all"||objForm[key] === "") {
delete objForm[key];
}
}
@@ -431,7 +430,7 @@
body.backFilePath = this.setDefaultImg(backFilePath,'backFilePath');
body.logoFilePath = this.setDefaultImg(logoFilePath,'logoFilePath');
body.titleFilePath = this.setDefaultImg(titleFilePath,"titleFilePath");
- body.qyFilePath = this.setDefaultImg(qyFilePath,"qyFilePath");
+ body.qyFilePath =qyFilePath? this.setDefaultImg(qyFilePath,"qyFilePath"):[];
body.ruleFilePath = this.setDefaultImg(ruleFilePath,"ruleFilePath");
this.ruleForm = body;
this.$nextTick(()=>{
--
Gitblit v1.8.0