刘翔宇-旅管家 3 years ago
parent dd1bb3a6f0
commit ffba5902ee

@ -101,12 +101,12 @@
</template> </template>
<template v-slot:activity_list_id> <template v-slot:activity_list_id>
<div class="xy-table-item"> <div class="xy-table-item" >
<div class="xy-table-item-label"> <div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>相关项目 <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>相关项目
</div> </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
<el-select clearable v-model="detail.activity_list_id"> <el-select clearable v-model="detail.activity_list_id" :disabled="!sysInfo">
<el-option v-for="(item,index) of listActivity" :key="item.id" :value="item.id" :label="item.name"> <el-option v-for="(item,index) of listActivity" :key="item.id" :value="item.id" :label="item.name">
</el-option> </el-option>
</el-select> </el-select>
@ -146,6 +146,7 @@
data() { data() {
return { return {
sysInfo: null,
isShow: false, isShow: false,
id: "", id: "",
type: "add", type: "add",
@ -160,7 +161,7 @@
total: 0, total: 0,
has_total: 0, has_total: 0,
image_id_url: "", image_id_url: "",
sort:1, sort: 1,
money: 0, money: 0,
}, },
action: process.env.VUE_APP_UPLOAD_API, action: process.env.VUE_APP_UPLOAD_API,
@ -186,8 +187,8 @@
} else { } else {
this.id = '' this.id = ''
this.type = ''; this.type = '';
this.detail.image_id=''; this.detail.image_id = '';
this.detail.image_id_url=''; this.detail.image_id_url = '';
this.$refs['addActivity'].reset() this.$refs['addActivity'].reset()
@ -238,6 +239,13 @@
}, },
mounted() { mounted() {
let that = this; let that = this;
let sysInfo = sessionStorage.getItem('sys_info');
console.log(sysInfo)
if (sysInfo && sysInfo != "") {
let _sys = JSON.parse(sysInfo);
that.detail.activity_list_id = _sys.id;
}
} }
} }
</script> </script>

@ -4,7 +4,7 @@
<div slot="content"></div> <div slot="content"></div>
<slot> <slot>
<div class="selects"> <div class="selects">
<div style="display: flex;align-items: center;" v-show="!sysInfo"> <div style="display: flex;align-items: center;" v-show="!sysInfo">
<span style="padding: 0 6px;word-break: keep-all;"> <span style="padding: 0 6px;word-break: keep-all;">
项目 项目
</span> </span>
@ -29,7 +29,8 @@
</lx-header> </lx-header>
<xy-table :list="list" :table-item="table" @pageSizeChange="pageSizeChange" @pageIndexChange="pageChange" :total="total" @delete="deleteitem" <xy-table :list="list" :table-item="table" @pageSizeChange="pageSizeChange" @pageIndexChange="pageChange"
:total="total" @delete="deleteitem"
@editor="(row)=>{$refs['addDrawPrize'].id = row.id;$refs['addDrawPrize'].isShow = true;$refs['addDrawPrize'].type = 'editor'}"> @editor="(row)=>{$refs['addDrawPrize'].id = row.id;$refs['addDrawPrize'].isShow = true;$refs['addDrawPrize'].type = 'editor'}">
<template v-slot:btns v-if="type==0 "> <template v-slot:btns v-if="type==0 ">
@ -37,22 +38,21 @@
<template v-slot:btns v-else> <template v-slot:btns v-else>
<el-table-column fixed="right" header-align="center" label="操作" width="200"> <el-table-column fixed="right" header-align="center" label="操作" width="200">
<template #default="{ row }"> <template #default="{ row }">
<Poptip :transfer="true" confirm placement="bottom" title="确认要删除吗" <Poptip :transfer="true" confirm placement="bottom" title="确认要删除吗" @on-ok="deleteitem(row)">
@on-ok="deleteitem(row)">
<Button ghost size="small" type="error">删除 <Button ghost size="small" type="error">删除
</Button> </Button>
</Poptip> </Poptip>
<Button style="margin-left: 4px;" size="small" type="primary" ghost <Button style="margin-left: 4px;" size="small" type="primary" ghost
@click="$refs['addDrawPrize'].id = row.id,$refs['addDrawPrize'].isShow = true,$refs['addDrawPrize'].type = 'editor'">编辑 @click="$refs['addDrawPrize'].id = row.id,$refs['addDrawPrize'].isShow = true,$refs['addDrawPrize'].type = 'editor'">编辑
</Button> </Button>
<Button v-if="row.activity_list_id === 8" style="margin-left: 4px;" size="small" type="primary" ghost <Button v-if="row.activity_list_id === 8" style="margin-left: 4px;" size="small" type="primary" ghost
@click="$router.push('/mdLotteryDraw/'+row.id)">抽奖 @click="$router.push('/mdLotteryDraw/'+row.id)">抽奖
</Button> </Button>
<Button v-if="row.activity_list_id === 8" style="margin-left: 4px;" size="small" type="primary" ghost <Button v-if="row.activity_list_id === 8" style="margin-left: 4px;" size="small" type="primary" ghost
@click="$router.push('/mdLotteryDraw/'+row.id+'?result=1')">中奖结果 @click="$router.push('/mdLotteryDraw/'+row.id+'?result=1')">中奖结果
</Button> </Button>
</template> </template>
@ -81,7 +81,7 @@
}, },
data() { data() {
return { return {
sysInfo:null, sysInfo: null,
select: { select: {
page: 1, page: 1,
page_size: 20, page_size: 20,
@ -182,12 +182,13 @@
let type = parseInt(this.$route.path.split("_")[1]); let type = parseInt(this.$route.path.split("_")[1]);
this.type = this.select.is_auth = type; this.type = this.select.is_auth = type;
let that = this;
let sysInfo = sessionStorage.getItem('sys_info') let sysInfo = sessionStorage.getItem('sys_info');
console.log(sysInfo)
if (sysInfo && sysInfo != "") { if (sysInfo && sysInfo != "") {
let _sys = JSON.parse(sysInfo); let _sys = JSON.parse(sysInfo);
that.select.activity_list_id = _sys.id; that.select.activity_list_id = _sys.id;
that.sysInfo=_sys; that.sysInfo = _sys;
} }
} }
} }

@ -218,6 +218,8 @@
created() { created() {
let type = parseInt(this.$route.path.split("_")[1]); let type = parseInt(this.$route.path.split("_")[1]);
this.type = this.select.is_auth = type; this.type = this.select.is_auth = type;
let that = this;
let sysInfo = sessionStorage.getItem('sys_info') let sysInfo = sessionStorage.getItem('sys_info')
if (sysInfo && sysInfo != "") { if (sysInfo && sysInfo != "") {
let _sys = JSON.parse(sysInfo); let _sys = JSON.parse(sysInfo);

Loading…
Cancel
Save