feat(代理政策页面): 搜索栏新增“国家”选项

This commit is contained in:
hzj 2026-02-02 10:46:24 +08:00
parent 235f84c7ee
commit 1fb6611b8f

View File

@ -1,6 +1,8 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索框 -->
<div class="filter-container"> <div class="filter-container">
<!-- 系统选择框 -->
<el-select <el-select
v-model="listQuery.sysOrigin" v-model="listQuery.sysOrigin"
placeholder="系统" placeholder="系统"
@ -14,11 +16,14 @@
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
> >
<span style="float: left;"> <sys-origin-icon :icon="item.value" :desc="item.value" /></span> <span style="float: left;">
<sys-origin-icon :icon="item.value" :desc="item.value"
/></span>
<span style="float: left;margin-left:10px">{{ item.label }}</span> <span style="float: left;margin-left:10px">{{ item.label }}</span>
</el-option> </el-option>
</el-select> </el-select>
<!-- 区域选择框 -->
<div class="filter-item"> <div class="filter-item">
<select-system-region <select-system-region
ref="regionSelectPolicy" ref="regionSelectPolicy"
@ -30,6 +35,33 @@
/> />
</div> </div>
<!-- 国家 -->
<el-select
v-model="listQuery.countryCode"
v-loading="loadingCountry"
placeholder="国家"
style="width: 200px"
class="filter-item"
clearable
collapse-tags
@change="changeCountry"
>
<el-option
v-for="item in countryList"
:key="item.id"
:label="item.country.aliasName || item.country.enName"
:value="item.country.alphaTwo"
>
<span style="float: left;">
<img :src="item.country.nationalFlag" width="30"
/></span>
<span style="float: left;margin-left:10px">{{
item.country.aliasName || item.country.enName
}}</span>
</el-option>
</el-select>
<!-- 搜索按钮 -->
<el-button <el-button
class="filter-item" class="filter-item"
type="primary" type="primary"
@ -39,25 +71,43 @@
> >
搜索 搜索
</el-button> </el-button>
<!-- 政策创建按钮 -->
<el-dropdown> <el-dropdown>
<el-button class="filter-item" type="primary" :disabled="!listQuery.region"> <el-button
class="filter-item"
type="primary"
:disabled="!listQuery.region"
>
政策<i class="el-icon-arrow-down el-icon--right" /> 政策<i class="el-icon-arrow-down el-icon--right" />
</el-button> </el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="handleCreate(false)">历史政策</el-dropdown-item> <el-dropdown-item @click.native="handleCreate(false)"
<el-dropdown-item @click.native="handleCreate(true)">创建政策</el-dropdown-item> >历史政策</el-dropdown-item
>
<el-dropdown-item @click.native="handleCreate(true)"
>创建政策</el-dropdown-item
>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</div> </div>
<!-- 浏览框 v-loading="listLoading"-->
<!-- 表单 v-loading="listLoading"-->
<div v-if="!isEditing"> <div v-if="!isEditing">
<!-- 标题 -->
<div v-if="data.title" style="margin-bottom: 30px;"> <div v-if="data.title" style="margin-bottom: 30px;">
标题: {{ data.title }} 标题: {{ data.title }}
</div> </div>
<!-- 政策类型 -->
<div v-if="data.policyType" style="margin-bottom: 30px;color: #d42724;"> <div v-if="data.policyType" style="margin-bottom: 30px;color: #d42724;">
<div v-if="data.policyType === 'MONEY'">政策类型: 美金政策</div> <div v-if="data.policyType === 'MONEY'">政策类型: 美金政策</div>
<div v-if="data.policyType === 'SALARY_DIAMOND'">政策类型: 工资钻石政策</div> <div v-if="data.policyType === 'SALARY_DIAMOND'">
政策类型: 工资钻石政策
</div>
</div> </div>
<!-- 表单表格 -->
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"
:data="policys" :data="policys"
@ -65,27 +115,84 @@
fit fit
highlight-current-row highlight-current-row
> >
<el-table-column label="Lv" prop="level" min-width="50" align="center" /> <!-- Lv -->
<el-table-column label="在线(Hour)" prop="onlineTime" min-width="80" align="center" /> <el-table-column
<el-table-column label="有效天(当天满60分钟计有效)" prop="effectiveDay" min-width="80" align="center" /> label="Lv"
<el-table-column label="目标" prop="target" min-width="80" align="center" /> prop="level"
<el-table-column label="主播工资" prop="memberSalary" min-width="80" align="center" /> min-width="50"
<el-table-column label="代理工资" prop="ownSalary" min-width="80" align="center" /> align="center"
/>
<!-- 在线(Hour) -->
<el-table-column
label="在线(Hour)"
prop="onlineTime"
min-width="80"
align="center"
/>
<!-- 有效天数 -->
<el-table-column
label="有效天(当天满60分钟计有效)"
prop="effectiveDay"
min-width="80"
align="center"
/>
<!-- 目标 -->
<el-table-column
label="目标"
prop="target"
min-width="80"
align="center"
/>
<!-- 主播工资 -->
<el-table-column
label="主播工资"
prop="memberSalary"
min-width="80"
align="center"
/>
<!-- 代理工资 -->
<el-table-column
label="代理工资"
prop="ownSalary"
min-width="80"
align="center"
/>
<!-- 总工资 -->
<el-table-column label="总工资" min-width="80" align="center"> <el-table-column label="总工资" min-width="80" align="center">
<template scope="scope"> <template scope="scope">
{{ getTotalSalary(scope.row) }} {{ getTotalSalary(scope.row) }}
</template> </template>
</el-table-column> </el-table-column>
<!-- 道具 -->
<el-table-column label="道具" min-width="200" align="center"> <el-table-column label="道具" min-width="200" align="center">
<template scope="scope"> <template scope="scope">
<div v-if="scope.row.propsRewards && scope.row.propsRewards.length > 0"> <div
v-if="scope.row.propsRewards && scope.row.propsRewards.length > 0"
>
<props-row :list="scope.row.propsRewards" /> <props-row :list="scope.row.propsRewards" />
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<!-- 操作列表 -->
<el-table-column label="操作" min-width="80" align="center"> <el-table-column label="操作" min-width="80" align="center">
<template scope="scope"> <template scope="scope">
<el-button type="text" :disabled="!(scope.row.propsRewards && scope.row.propsRewards.length > 0)" @click="handleCreatePropsGroup(scope.row, false, index)">道具明细</el-button> <!-- 道具明细 按钮 -->
<el-button
type="text"
:disabled="
!(scope.row.propsRewards && scope.row.propsRewards.length > 0)
"
@click="handleCreatePropsGroup(scope.row, false, index)"
>道具明细</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -93,7 +200,6 @@
<!-- 编辑框 --> <!-- 编辑框 -->
<div v-if="isEditing"> <div v-if="isEditing">
<div style="margin-bottom: 30px;"> <div style="margin-bottom: 30px;">
<el-tag type="danger">标题</el-tag> <el-tag type="danger">标题</el-tag>
<el-input <el-input
@ -112,40 +218,69 @@
fit fit
highlight-current-row highlight-current-row
> >
<el-table-column label="等级" min-width="50" align="center"> <el-table-column label="等级" min-width="50" align="center">
<template scope="scope"> <template scope="scope">
<el-input v-model.number="scope.row.level" size="small" placeholder="等级" /> <el-input
v-model.number="scope.row.level"
size="small"
placeholder="等级"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="时间(Hour)" min-width="80" align="center"> <el-table-column label="时间(Hour)" min-width="80" align="center">
<template scope="scope"> <template scope="scope">
<el-input v-model.number="scope.row.onlineTime" size="small" placeholder="时间" /> <el-input
v-model.number="scope.row.onlineTime"
size="small"
placeholder="时间"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="有效天(当天满60分钟计有效)" min-width="80" align="center"> <el-table-column
label="有效天(当天满60分钟计有效)"
min-width="80"
align="center"
>
<template scope="scope"> <template scope="scope">
<el-input v-model.number="scope.row.effectiveDay" size="small" placeholder="时间" /> <el-input
v-model.number="scope.row.effectiveDay"
size="small"
placeholder="时间"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="目标" min-width="80" align="center"> <el-table-column label="目标" min-width="80" align="center">
<template scope="scope"> <template scope="scope">
<el-input v-model.number="scope.row.target" size="small" placeholder="目标" /> <el-input
v-model.number="scope.row.target"
size="small"
placeholder="目标"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="主播工资" min-width="80" align="center"> <el-table-column label="主播工资" min-width="80" align="center">
<template scope="scope"> <template scope="scope">
<el-input v-model="scope.row.memberSalary" type="number" size="small" placeholder="主播工资" /> <el-input
v-model="scope.row.memberSalary"
type="number"
size="small"
placeholder="主播工资"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="代理工资" min-width="80" align="center"> <el-table-column label="代理工资" min-width="80" align="center">
<template scope="scope"> <template scope="scope">
<el-input v-model="scope.row.ownSalary" type="number" size="small" placeholder="代理工资" /> <el-input
v-model="scope.row.ownSalary"
type="number"
size="small"
placeholder="代理工资"
/>
</template> </template>
</el-table-column> </el-table-column>
@ -157,17 +292,37 @@
<el-table-column label="道具" min-width="80" align="center"> <el-table-column label="道具" min-width="80" align="center">
<template scope="scope"> <template scope="scope">
<props-row v-if="scope.row.propsRewards && scope.row.propsRewards.length > 0" :list="scope.row.propsRewards" /> <props-row
<el-button type="text" @click="handleCreatePropsGroup(scope.row, true, scope.$index)">编辑道具</el-button> v-if="scope.row.propsRewards && scope.row.propsRewards.length > 0"
:list="scope.row.propsRewards"
/>
<el-button
type="text"
@click="handleCreatePropsGroup(scope.row, true, scope.$index)"
>编辑道具</el-button
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" min-width="100" align="center"> <el-table-column label="操作" min-width="100" align="center">
<template scope="scope"> <template scope="scope">
<el-button type="text" @click="clickUp(scope.$index)">上移</el-button> <el-button type="text" @click="clickUp(scope.$index)"
<el-button type="text" @click="clickDown(scope.$index)">下移</el-button> >上移</el-button
<el-button v-if="policys.length > 1" type="text" @click="removeRow(scope.$index)">删除</el-button> >
<el-button type="text" @click="handleShowAddRowBoxAndIndex(scope.$index)">增加行</el-button> <el-button type="text" @click="clickDown(scope.$index)"
>下移</el-button
>
<el-button
v-if="policys.length > 1"
type="text"
@click="removeRow(scope.$index)"
>删除</el-button
>
<el-button
type="text"
@click="handleShowAddRowBoxAndIndex(scope.$index)"
>增加行</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -189,7 +344,14 @@
:visible.sync="addRowsBoxVisible" :visible.sync="addRowsBoxVisible"
:before-close="handleAddRowClose" :before-close="handleAddRowClose"
> >
<el-input v-model.number="addRowsNumber" maxlength="2" max="2" min="1" minlength="1" placeholder="请输入新增行数" /> <el-input
v-model.number="addRowsNumber"
maxlength="2"
max="2"
min="1"
minlength="1"
placeholder="请输入新增行数"
/>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="handleAddRowClose()"> </el-button> <el-button @click="handleAddRowClose()"> </el-button>
<el-button type="primary" @click="addRows()"> </el-button> <el-button type="primary" @click="addRows()"> </el-button>
@ -212,8 +374,18 @@
<el-row v-for="(item, index) in historyReleases" :key="index"> <el-row v-for="(item, index) in historyReleases" :key="index">
<el-card style="margin: 10px;"> <el-card style="margin: 10px;">
<div class="ops"> <div class="ops">
<el-tag v-if="item.historyRelease" size="mini" :type="item.historyRelease ? 'success': 'info'">发布过: {{ item.historyRelease ? 'Yes' : 'No' }}</el-tag> <el-tag
<el-tag v-if="item.release" size="mini" :type="item.release ? 'success' : 'info'">使用: {{ item.release ? 'Yes':'No' }}</el-tag> v-if="item.historyRelease"
size="mini"
:type="item.historyRelease ? 'success' : 'info'"
>发布过: {{ item.historyRelease ? "Yes" : "No" }}</el-tag
>
<el-tag
v-if="item.release"
size="mini"
:type="item.release ? 'success' : 'info'"
>使用: {{ item.release ? "Yes" : "No" }}</el-tag
>
</div> </div>
<div class="bottom clearfix"> <div class="bottom clearfix">
{{ item.title }} {{ item.title }}
@ -225,8 +397,15 @@
<div class="time">创建时间:{{ item.createTime }}</div> <div class="time">创建时间:{{ item.createTime }}</div>
</div> </div>
<div class="clearfix"> <div class="clearfix">
<el-button type="text" @click.native="handleUpdate(item)">修改</el-button> <el-button type="text" @click.native="handleUpdate(item)"
<el-button v-if="!item.historyRelease" type="text" @click.native="handleDelete(item.id)">删除</el-button> >修改</el-button
>
<el-button
v-if="!item.historyRelease"
type="text"
@click.native="handleDelete(item.id)"
>删除</el-button
>
</div> </div>
</el-card> </el-card>
</el-row> </el-row>
@ -249,25 +428,32 @@
</template> </template>
<script> <script>
import { mapGetters } from "vuex";
import { teamPolicyReleases, teamPolicyHistoryReleases, teamPolicyAdd, deleteTeamPolicy } from '@/api/team' import {
import { mapGetters } from 'vuex' teamPolicyReleases,
import PropsFormEdit from './props-form-edit' teamPolicyHistoryReleases,
import PropsRow from '@/components/data/PropsRow' teamPolicyAdd,
deleteTeamPolicy
} from "@/api/team";
import { listPayOpenCountry } from "@/api/sys-pay";
import PropsFormEdit from "./props-form-edit";
import PropsRow from "@/components/data/PropsRow";
function getFormData() { function getFormData() {
return { return {
id: '', id: "",
sysOrigin: '', sysOrigin: "",
region: '', region: "",
release: false, release: false,
title: '', title: "",
policy: [], policy: [],
policyType: 'MONEY' policyType: "MONEY"
} };
} }
export default { export default {
name: 'TeamPolicyManager', name: "TeamPolicyManager",
components: { PropsFormEdit, PropsRow }, components: { PropsFormEdit, PropsRow },
data() { data() {
return { return {
@ -290,118 +476,180 @@ export default {
formData: getFormData(), formData: getFormData(),
isEditing: false, isEditing: false,
listQuery: { listQuery: {
sysOrigin: 'HALAR', sysOrigin: "HALAR",
region: '', region: "",
type: 'WEEK', type: "WEEK",
policyType: '' policyType: "",
countryCode: ""
}, },
sysOrigins: [], sysOrigins: [],
listLoading: false, listLoading: false,
historyReleasesLoading: false historyReleasesLoading: false,
}
selectedCountry: {}, //
countryList: [],
loadingCountry: false
};
}, },
computed: { computed: {
...mapGetters(['permissionsSysOriginPlatforms']) ...mapGetters(["permissionsSysOriginPlatforms"])
}, },
created() { created() {
const that = this const that = this;
const querySystem = this.permissionsSysOriginPlatforms[0] const querySystem = this.permissionsSysOriginPlatforms[0];
if (!querySystem) { if (!querySystem) {
return return;
} }
that.listQuery.sysOrigin = querySystem.value that.listQuery.sysOrigin = querySystem.value;
this.loadOpenCountry(); //
}, },
methods: { methods: {
// //
renderData() { renderData() {
const that = this const that = this;
that.listLoading = true that.listLoading = true;
teamPolicyReleases(that.listQuery).then(res => { teamPolicyReleases(that.listQuery)
that.listLoading = false .then(res => {
const { body } = res that.listLoading = false;
that.data = body || {} const { body } = res;
that.policys = [] that.data = body || {};
if (that.data) { that.policys = [];
that.policys = that.data.policy || [] if (that.data) {
} that.policys = that.data.policy || [];
}).catch(er => { }
that.listLoading = false })
}) .catch(er => {
that.listLoading = false;
});
}, },
//
changeCountry(val) {
const that = this;
console.log("val", val);
if (!val) {
//
that.listQuery.countryCode = "";
that.selectedCountry = {};
} else {
//
that.selectedCountry =
this.countryList.find(item => item.country.alphaTwo === val) || {};
// 使访
that.listQuery.countryCode = that.selectedCountry.country
? that.selectedCountry.country.alphaTwo
: "";
}
this.renderData();
},
//
loadOpenCountry() {
const that = this;
that.loadingCountry = true;
listPayOpenCountry()
.then(res => {
that.loadingCountry = false;
that.countryList = res.body || [];
that.listQuery.countryCode = "";
that.selectedCountry = {};
// that.renderData();
})
.catch(er => {
that.loadingCountry = false;
console.error(er);
});
},
// //
clickUp(index) { clickUp(index) {
const arr = this.policys const arr = this.policys;
arr.splice(index - 1, 1, ...arr.splice(index, 1, arr[index - 1])) arr.splice(index - 1, 1, ...arr.splice(index, 1, arr[index - 1]));
}, },
// //
clickDown(index) { clickDown(index) {
const arr = this.policys const arr = this.policys;
arr.splice(index, 1, ...arr.splice(index + 1, 1, arr[index])) arr.splice(index, 1, ...arr.splice(index + 1, 1, arr[index]));
}, },
// //
handleCreatePropsGroup(row, _isAllowEdit, _index) { handleCreatePropsGroup(row, _isAllowEdit, _index) {
const that = this const that = this;
that.isAllowEdit = _isAllowEdit that.isAllowEdit = _isAllowEdit;
that.thisPolicysIndex = _index that.thisPolicysIndex = _index;
if (!row.propsRewards) { if (!row.propsRewards) {
that.thisPropsRow = {} that.thisPropsRow = {};
that.propsFormEditVisable = true that.propsFormEditVisable = true;
return return;
} }
that.thisPropsRow = row that.thisPropsRow = row;
that.propsFormEditVisable = true that.propsFormEditVisable = true;
}, },
handleSearch() { handleSearch() {
this.formData = getFormData() this.formData = getFormData();
this.isEditing = false this.isEditing = false;
this.renderData() this.renderData();
}, },
// //
changeSysOrigin() { changeSysOrigin() {
this.$refs.regionSelectPolicy.clearValue() this.$refs.regionSelectPolicy.clearValue();
}, },
// //
loadHistoryReleases() { loadHistoryReleases() {
const that = this const that = this;
that.historyReleasesLoading = true that.historyReleasesLoading = true;
teamPolicyHistoryReleases(that.listQuery).then(res => { teamPolicyHistoryReleases(that.listQuery)
that.historyReleasesLoading = false .then(res => {
const { body } = res that.historyReleasesLoading = false;
that.historyReleases = body || [] const { body } = res;
}).catch(er => { that.historyReleases = body || [];
that.historyReleasesLoading = false })
}) .catch(er => {
that.historyReleasesLoading = false;
});
}, },
// //
handleCreate(isNew) { handleCreate(isNew) {
const that = this const that = this;
if (!isNew) { if (!isNew) {
that.historyReleases = [] that.historyReleases = [];
that.loadHistoryReleases() that.loadHistoryReleases();
that.historyReleasesBoxVisible = true that.historyReleasesBoxVisible = true;
return return;
} }
that.formData.id = '' that.formData.id = "";
that.formData.region = '' that.formData.region = "";
that.formData.title = '' that.formData.title = "";
that.formData.release = false that.formData.release = false;
that.policys = [] that.policys = [];
that.addRowsNumber = 1 that.addRowsNumber = 1;
that.addRowsBoxVisible = true that.addRowsBoxVisible = true;
that.isClickNewPolicyButton = true that.isClickNewPolicyButton = true;
}, },
// //
handleShowAddRowBoxAndIndex(_index) { handleShowAddRowBoxAndIndex(_index) {
const that = this const that = this;
that.addRowsNumber = 1 that.addRowsNumber = 1;
that.addRowsBoxVisible = true that.addRowsBoxVisible = true;
that.currentAddRowIndex = _index that.currentAddRowIndex = _index;
that.isClickNewPolicyButton = false that.isClickNewPolicyButton = false;
}, },
// ,index // ,index
addRows() { addRows() {
const that = this const that = this;
that.isEditing = true that.isEditing = true;
for (var i = 0; i < that.addRowsNumber; i++) { for (var i = 0; i < that.addRowsNumber; i++) {
var policy = { var policy = {
level: 0, level: 0,
@ -412,140 +660,167 @@ export default {
ownSalary: 0, ownSalary: 0,
totalSalary: 0, totalSalary: 0,
propsRewards: [] propsRewards: []
} };
that.policys.splice(that.currentAddRowIndex + 1, 0, policy) that.policys.splice(that.currentAddRowIndex + 1, 0, policy);
} }
that.currentAddRowIndex = -1 that.currentAddRowIndex = -1;
that.addRowsBoxVisible = false that.addRowsBoxVisible = false;
}, },
// //
removeRow(_index) { removeRow(_index) {
const that = this const that = this;
that.policys.splice(_index, 1) that.policys.splice(_index, 1);
}, },
// //
handleUpdate(row) { handleUpdate(row) {
const that = this const that = this;
that.policys = row.policy that.policys = row.policy;
that.formData.id = row.id that.formData.id = row.id;
that.formData.region = row.region that.formData.region = row.region;
that.formData.title = row.title that.formData.title = row.title;
that.formData.release = row.release that.formData.release = row.release;
that.currentAddRowIndex = -1 that.currentAddRowIndex = -1;
that.historyReleasesBoxVisible = false that.historyReleasesBoxVisible = false;
that.isEditing = true that.isEditing = true;
}, },
// //
save(_release) { save(_release) {
const that = this const that = this;
that.formData.sysOrigin = that.listQuery.sysOrigin that.formData.sysOrigin = that.listQuery.sysOrigin;
that.formData.policy = that.policys that.formData.policy = that.policys;
that.formData.region = that.listQuery.region that.formData.region = that.listQuery.region;
if (!that.formData.region) { if (!that.formData.region) {
that.$opsMessage.warn('请选择区域!') that.$opsMessage.warn("请选择区域!");
return return;
} }
if (!that.formData.title) { if (!that.formData.title) {
that.$opsMessage.warn('请输入政策标题!') that.$opsMessage.warn("请输入政策标题!");
return return;
} }
if (!_release) { if (!_release) {
that.listLoading = true that.listLoading = true;
that.formData.release = _release that.formData.release = _release;
teamPolicyAdd(that.formData).then(res => { teamPolicyAdd(that.formData)
that.listLoading = false .then(res => {
// that.isEditing = false that.listLoading = false;
// that.renderData() // that.isEditing = false
that.$opsMessage.success() // that.renderData()
}).catch(er => { that.$opsMessage.success();
that.listLoading = false })
that.$opsMessage.fail() .catch(er => {
}) that.listLoading = false;
return that.$opsMessage.fail();
});
return;
} }
that.$confirm('确定对外发布当政策吗?', '提示', { that
type: 'warning' .$confirm("确定对外发布当政策吗?", "提示", {
}).then(() => { type: "warning"
that.listLoading = true
that.formData.release = _release
teamPolicyAdd(that.formData).then(res => {
that.listLoading = false
// that.isEditing = false
// that.renderData()
that.$opsMessage.success()
}).catch(er => {
that.listLoading = false
that.$opsMessage.fail()
}) })
}).catch(() => {}) .then(() => {
that.listLoading = true;
that.formData.release = _release;
teamPolicyAdd(that.formData)
.then(res => {
that.listLoading = false;
// that.isEditing = false
// that.renderData()
that.$opsMessage.success();
})
.catch(er => {
that.listLoading = false;
that.$opsMessage.fail();
});
})
.catch(() => {});
}, },
// //
handleDelete(id) { handleDelete(id) {
const that = this const that = this;
that.$confirm('确定删除选择的政策吗?', '提示', { that
type: 'warning' .$confirm("确定删除选择的政策吗?", "提示", {
}).then(() => { type: "warning"
that.listLoading = true
deleteTeamPolicy(id).then(res => {
that.$opsMessage.success()
//
that.historyReleases = that.historyReleases.filter(function(history) {
return history.id !== id
})
that.listLoading = false
}).catch(er => {
that.$opsMessage.fail()
that.listLoading = false
}) })
}).catch(() => {}) .then(() => {
that.listLoading = true;
deleteTeamPolicy(id)
.then(res => {
that.$opsMessage.success();
//
that.historyReleases = that.historyReleases.filter(function(
history
) {
return history.id !== id;
});
that.listLoading = false;
})
.catch(er => {
that.$opsMessage.fail();
that.listLoading = false;
});
})
.catch(() => {});
}, },
// //
handleClose() { handleClose() {
this.$emit('close') this.$emit("close");
}, },
// //
handlePropsSuccess(propsRewards) { handlePropsSuccess(propsRewards) {
this.policys[this.thisPolicysIndex].propsRewards = propsRewards this.policys[this.thisPolicysIndex].propsRewards = propsRewards;
this.propsFormEditVisable = false this.propsFormEditVisable = false;
}, },
// //
getTotalSalary(item) { getTotalSalary(item) {
item.totalSalary = (Number(item.memberSalary) + Number(item.ownSalary)).toFixed(2) item.totalSalary = (
return item.totalSalary Number(item.memberSalary) + Number(item.ownSalary)
).toFixed(2);
return item.totalSalary;
}, },
// //
handleNewpolicyClose() { handleNewpolicyClose() {
this.isEditing = false this.isEditing = false;
this.renderData() this.renderData();
}, },
// //
handleAddRowClose() { handleAddRowClose() {
this.addRowsBoxVisible = false this.addRowsBoxVisible = false;
if (!this.isClickNewPolicyButton) { if (!this.isClickNewPolicyButton) {
return return;
} }
this.isEditing = false this.isEditing = false;
}, },
// //
handleHistoryReleasesClose() { handleHistoryReleasesClose() {
this.historyReleasesBoxVisible = false this.historyReleasesBoxVisible = false;
}, },
selectSystemRegion() { selectSystemRegion() {
this.isEditing = false this.isEditing = false;
if (!this.listQuery.region) { if (!this.listQuery.region) {
this.policys = [] this.policys = [];
this.data = [] this.data = [];
this.formData = getFormData() this.formData = getFormData();
return return;
} }
this.renderData() this.renderData();
} }
} }
} };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.app-container { .app-container {
@ -569,34 +844,34 @@ export default {
} }
} }
.time { .time {
font-size: 13px; font-size: 13px;
color: #999; color: #999;
} }
.bottom { .bottom {
margin-top: 13px; margin-top: 13px;
line-height: 12px; line-height: 12px;
} }
.button { .button {
padding: 0; padding: 0;
float: right; float: right;
} }
.image { .image {
width: 30%; width: 30%;
margin-top: 10px; margin-top: 10px;
display: block; display: block;
} }
.clearfix:before, .clearfix:before,
.clearfix:after { .clearfix:after {
display: table; display: table;
content: ""; content: "";
} }
.clearfix:after { .clearfix:after {
clear: both clear: both;
} }
</style> </style>