Commit a262e2c3 authored by 黄奎's avatar 黄奎

页面修改

parent 3d0deb39
......@@ -24,7 +24,8 @@
</el-table-column>
<el-table-column prop="CoverImage" label="封面图">
<template slot-scope="scope">
<div class="app-image" :style="{backgroundImage:'url(' + scope.row.CoverImage + ')',backgroundSize:'cover'}">
<div class="app-image"
:style="{backgroundImage:'url(' + scope.row.CoverImage + ')',backgroundSize:'cover'}">
</div>
</template>
</el-table-column>
......@@ -35,7 +36,8 @@
alt="">
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top-start">
<img @click="delType(scope.row)" style="width:32px;height:32px;margin:0 10px" src="../../assets/img/userman/del.png" alt="">
<img @click="delType(scope.row)" style="width:32px;height:32px;margin:0 10px"
src="../../assets/img/userman/del.png" alt="">
</el-tooltip>
</template>
</el-table-column>
......@@ -51,9 +53,9 @@
style="margin:0 9px;color:#C0C4CC">/</span><span>修改活动类型</span>
</div>
<div class="content">
<el-form label-width="120px">
<el-form-item label="类型名称">
<el-input type="text" class="w400" v-model="addMsg.TypeName" size="small"></el-input>
<el-form label-width="120px" :model="addMsg" :rules="rules" ref="addMsg">
<el-form-item label="类型名称" prop="TypeName" class="is-required">
<el-input type="text" class="w400" v-model="addMsg.TypeName" size="small" maxlength="20"></el-input>
</el-form-item>
<el-form-item label="封面图" size="small">
<el-button @click="isShowImage=true" size="small">选择文件</el-button>
......@@ -65,7 +67,7 @@
</el-form-item>
</el-form>
</div>
<el-button size="small" style="margin-top:20px;padding:9px 25px;" type="primary" @click="submitform()">保存
<el-button size="small" style="margin-top:20px;padding:9px 25px;" type="primary" @click="submitform('addMsg')">保存
</el-button>
</template>
<!-- 选择文件 -->
......@@ -82,9 +84,16 @@
},
data() {
return {
rules: {
TypeName: [{
required: true,
message: '请输入类型名称',
trigger: 'blur'
}],
},
msg: {
pageIndex: 1,
pageSize: 15,
pageSize: 10,
TypeName: '',
},
total: 0,
......@@ -149,7 +158,7 @@
that.Confirm("是否删除?", function () {
that.apipost(
"/api/Trade/RemoveCommerceActivityType", {
Id: item.CompanyId,
Id: item.Id,
Status: 1
},
res => {
......@@ -163,18 +172,24 @@
);
});
},
//新增修改
submitform() {
this.apipost("/api/Trade/SetCommerceActivityType", this.addMsg, res => {
if (res.data.resultCode == 1) {
this.isShowAdd = true;
this.getList();
this.clearMsg();
this.Success(res.data.message);
//新增活动类型
submitform(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.apipost("/api/Trade/SetCommerceActivityType", this.addMsg, res => {
if (res.data.resultCode == 1) {
this.isShowAdd = true;
this.getList();
this.clearMsg();
this.Success(res.data.message);
} else {
this.Error(res.data.message);
}
})
} else {
this.Error(res.data.message);
return false;
}
})
});
}
},
mounted() {}
......
......@@ -51,7 +51,7 @@
return {
msg: {
pageIndex: 1,
pageSize: 15,
pageSize: 10,
CompanyName: '',
},
total: 0,
......
......@@ -59,14 +59,14 @@
<div class="content">
<el-form label-width="120px" :model="addMsg" :rules="rules" ref="addMsg">
<el-form-item label="新闻标题" class="is-required" prop="Title">
<el-input type="text" class="w400" v-model="addMsg.Title" size="small"></el-input>
<el-input type="text" class="w400" v-model="addMsg.Title" size="small" placeholder="新闻标题"></el-input>
</el-form-item>
<el-form-item label="发布时间" class="is-required" prop="PublishTime">
<el-date-picker class="w400" v-model="addMsg.PublishTime" size="small" type="date" placeholder="发布时间">
</el-date-picker>
</el-form-item>
<el-form-item label="行业" class="is-required" prop="Industry">
<el-input type="text" class="w400" v-model="addMsg.Industry" size="small"></el-input>
<el-input type="text" class="w400" v-model="addMsg.Industry" size="small" placeholder="行业"></el-input>
</el-form-item>
<el-form-item label="封面图" size="small">
<el-button @click="isShowImage=true" size="small">选择文件</el-button>
......@@ -107,7 +107,7 @@
},
msg: {
pageIndex: 1,
pageSize: 15,
pageSize: 1,
Title: '',
},
total: 0,
......@@ -157,6 +157,7 @@
this.addMsg.Industry = "";
this.addMsg.PublishTime = "";
this.addMsg.NewsInfo = "";
this.defaultMsg="";
},
getList() {
this.loading = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment