Commit 8e438c75 authored by 吴春's avatar 吴春

提交抖音代码

parent 6857be2e
This diff is collapsed.
<style>
.LM_mainDiv {
overflow-y: auto;
}
.LP_table {
margin-top: 10px;
background-color: #fff;
border-top: 1px solid #d1d1d1;
/*border-left: 1px solid #d1d1d1;*/
/* border-right: 1px solid #d1d1d1; */
font-size: 14px;
width:100%;
min-width: 1200px;
padding-bottom: 5px;
}
.LP_table tr {
height: 40px;
}
.LP_table tr th {
border-left: 1px solid #d1d1d1;
border-bottom: 1px solid #d1d1d1;
/* border-right: 1px solid #d1d1d1; */
position: relative;
background-color: #E6E6E6;
}
.LP_table tr th:last-child{
border-right: 1px solid #d1d1d1;
}
.LP_table td {
border-left: 1px solid #d1d1d1;
border-bottom: 1px solid #d1d1d1;
/* border-right: 1px solid #d1d1d1; */
text-align: center;
padding: 5px 0;
}
.LP_table td:last-child{
border-right: 1px solid #d1d1d1;
}
.LP_table .el-button--primary {
padding: 5px;
}
.Lp_role {
position: absolute;
top: 15px;
left: 30px;
}
.Lp_company {
position: absolute;
right: 30px;
top: 5px;
}
.comLessDiv{
width:100%;
height:40px;
margin-top:5px;
padding-bottom:5px;
border-bottom:1px solid #d1d1d1;
display: flex;
justify-content: center;
align-items: center;
}
.comLessDiv:last-child{
border:0;
padding-bottom:0;
}
.comLessDiv input{
padding: 0 5px;
}
.comLessDiv .el-input-group__append,.comLessDiv .el-input-group__append button{
padding: 0 8px;
cursor: pointer;
}
.addLessPrice{
margin-left:10px;
color:seagreen;
cursor: pointer;
}
.lessBtn{
margin-top:5px;
}
</style>
<template>
<div>
<!-- <el-row>
<el-col :offset="23">
<input type='button' class="normalBtn lessBtn" @click="SaveLessPrice(null)" :value="$t('pub.saveBtn')"></input>
</el-col>
</el-row> -->
<div class="LM_mainDiv">
<!--保存-->
<table border="0" cellspacing="0" cellpadding="0" class="LP_table" v-loading="this.loading">
<tr>
<th width="150">标记</th>
<th width="40%">标记名称</th>
<th width="150">{{$t('hotel.table_operat')}}</th>
</tr>
<tr >
<td>
<i class="iconfont icon-bumenguanli-tianjia addLessPrice" @click="addLessPrice(item)"></i>
</td>
<td>
<div v-for="subItem in dataList" class="comLessDiv">
<el-input placeholder="名称" v-model="subItem.Name" @keyup.native=""> </el-input>
</div>
</td>
<td>
<div v-for="(subItem,subIndex) in dataList" class="comLessDiv">
<input type='button' class="normalBtn lessBtn" @click="SaveLessPrice(subItem)" :value="$t('pub.saveBtn')"></input>
<input type='button' class="normalBtn lessBtn" @click="RemoveItem( subItem, subIndex)" value="删除"></input>
</div>
</td>
</tr>
</table>
</div>
</div>
</template>
<script>
export default {
data() {
return {
//列表
dataList: [],
//角色列表
RoleList: [],
loading:false,
LineList: [],
commonSelect:0,
};
},
methods: {
//保存少价管理
SaveLessPrice(subItem) {
if (subItem) {
if (subItem.Name.length==0) {
return this.Error('请填写标记信息');
}
}
this.apipost(
"dict_post_Set",subItem ,
res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.getList();
}else{
this.Error(res.data.message);
}
},
err => {}
);
},
//获取列表
getList() {
this.loading = true;
var that=this;
that.apipost(
"dict_post_GetList", {Key:'DouYin_MainOrder'},
res => {
that.loading = false;
if (res.data.resultCode == 1) {
var data = res.data.data;
that.dataList=data;
}else{
that.Error(res.data.message);
}
},
err => {}
);
},
//获取列表
RemoveItem(subItem, index) {
if(subItem.ID==0){
this.dataList.splice(index,1);
return;
}
var that = this;
this.Confirm("是否删除此标记信息?", function () {
if (subItem.ID > 0) {
that.apipost(
"dict_post_Remove", {dictID:subItem.ID},
res => {
if (res.data.resultCode == 1) {
that.Success("操作成功!");
that.getList();
} else {
that.Error(res.data.message);
}
},
err => {}
);
}
});
},
//点击添加
addLessPrice(){
var obj = {
Name: '',
DictKey: 'DouYin_MainOrder',
ID: 0,
}
this.dataList.push(obj);
this.$forceUpdate()
}
},
mounted() {
this.getList();
},
};
</script>
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