|
@@ -9,14 +9,7 @@
|
|
<div class="terr-left">
|
|
<div class="terr-left">
|
|
<el-button size="medium" @click="add_class" type="primary">+ 添加规则分类</el-button>
|
|
<el-button size="medium" @click="add_class" type="primary">+ 添加规则分类</el-button>
|
|
<div class="rule_class_box">
|
|
<div class="rule_class_box">
|
|
- <el-tree
|
|
|
|
- accordion
|
|
|
|
- :data="rule_tree"
|
|
|
|
- class="cate-tree"
|
|
|
|
- :props="defaultProps"
|
|
|
|
- :highlight-current="true"
|
|
|
|
- @node-click="handleNodeClick"
|
|
|
|
- ></el-tree>
|
|
|
|
|
|
+ <el-tree accordion :data="rule_tree" class="cate-tree" :props="defaultProps" :highlight-current="true" @node-click="handleNodeClick"></el-tree>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="terr-right border-right flex-1">
|
|
<div class="terr-right border-right flex-1">
|
|
@@ -64,7 +57,6 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
<!-- <el-dialog
|
|
<!-- <el-dialog
|
|
width="280px"
|
|
width="280px"
|
|
@close="closeCode"
|
|
@close="closeCode"
|
|
@@ -75,7 +67,6 @@
|
|
<div @click.stop="downloadE">下载保存此二维码</div>
|
|
<div @click.stop="downloadE">下载保存此二维码</div>
|
|
</div>
|
|
</div>
|
|
</el-dialog> -->
|
|
</el-dialog> -->
|
|
-
|
|
|
|
<el-dialog @close="closeCode" :visible.sync="innerVisible" width="444px" append-to-body>
|
|
<el-dialog @close="closeCode" :visible.sync="innerVisible" width="444px" append-to-body>
|
|
<div style="border-radius: 15px;border: 1px solid #f1f1f1;padding: 10px; width: 346px;box-sizing: border-box;margin: 0 auto;">
|
|
<div style="border-radius: 15px;border: 1px solid #f1f1f1;padding: 10px; width: 346px;box-sizing: border-box;margin: 0 auto;">
|
|
<div id="qrcode" ref="qrcode"></div>
|
|
<div id="qrcode" ref="qrcode"></div>
|
|
@@ -84,7 +75,13 @@
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
<!-- 编辑添加分类 -->
|
|
<!-- 编辑添加分类 -->
|
|
- <el-dialog :title="class_type == 'add' ? '添加规则分类' : '编辑规则分类'" :visible.sync="class_show" @close="add_dept_close('dept_formdata')" :close-on-click-modal="false" width="500px">
|
|
|
|
|
|
+ <el-dialog
|
|
|
|
+ :title="class_type == 'add' ? '添加规则分类' : '编辑规则分类'"
|
|
|
|
+ :visible.sync="class_show"
|
|
|
|
+ @close="add_dept_close('dept_formdata')"
|
|
|
|
+ :close-on-click-modal="false"
|
|
|
|
+ width="500px"
|
|
|
|
+ >
|
|
<el-form :model="dept_formdata" ref="dept_formdata" :rules="dept_formdata_rules" label-width="80px">
|
|
<el-form :model="dept_formdata" ref="dept_formdata" :rules="dept_formdata_rules" label-width="80px">
|
|
<el-form-item label="规则分类" prop="name"><el-input v-model="dept_formdata.name"></el-input></el-form-item>
|
|
<el-form-item label="规则分类" prop="name"><el-input v-model="dept_formdata.name"></el-input></el-form-item>
|
|
<el-form-item label="上级分类">
|
|
<el-form-item label="上级分类">
|
|
@@ -148,9 +145,9 @@
|
|
</el-select>
|
|
</el-select>
|
|
</el-input>
|
|
</el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
-
|
|
|
|
|
|
+
|
|
<div v-if="rules_detail_form.range_type == 2" style="position: relative;bottom: 10px;padding: 0 10px;">至</div>
|
|
<div v-if="rules_detail_form.range_type == 2" style="position: relative;bottom: 10px;padding: 0 10px;">至</div>
|
|
- <el-form-item v-if="rules_detail_form.range_type == 2" class="form-right select_width">
|
|
|
|
|
|
+ <el-form-item v-if="rules_detail_form.range_type == 2" class="form-right select_width">
|
|
<el-input placeholder="请输入分值" v-model.number="rules_detail_form.max_point" type="age" class="input-with-select">
|
|
<el-input placeholder="请输入分值" v-model.number="rules_detail_form.max_point" type="age" class="input-with-select">
|
|
<el-select v-model="integral_select_name2" slot="prepend" placeholder="请选择类型">
|
|
<el-select v-model="integral_select_name2" slot="prepend" placeholder="请选择类型">
|
|
<el-option v-for="(item, index) in integral_select" :key="index" :label="item.name" :value="item.value"></el-option>
|
|
<el-option v-for="(item, index) in integral_select" :key="index" :label="item.name" :value="item.value"></el-option>
|
|
@@ -158,8 +155,8 @@
|
|
</el-input>
|
|
</el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
-<!-- <el-form-item prop="min_point">
|
|
|
|
|
|
+
|
|
|
|
+ <!-- <el-form-item prop="min_point">
|
|
<el-row :gutter="20" class="select_width">
|
|
<el-row :gutter="20" class="select_width">
|
|
<el-col :span="11">
|
|
<el-col :span="11">
|
|
<el-input
|
|
<el-input
|
|
@@ -186,13 +183,17 @@
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</el-form-item> -->
|
|
</el-form-item> -->
|
|
-
|
|
|
|
|
|
+
|
|
<div class="flex-box flex-v-ce">
|
|
<div class="flex-box flex-v-ce">
|
|
<el-button type="danger" @click="del_rule" :loading="delRule_loading" :disabled="delRule_loading" v-show="rule_type == 'edit'">删除规则</el-button>
|
|
<el-button type="danger" @click="del_rule" :loading="delRule_loading" :disabled="delRule_loading" v-show="rule_type == 'edit'">删除规则</el-button>
|
|
<div class="flex-1"></div>
|
|
<div class="flex-1"></div>
|
|
<el-button @click="rule_close('rules_detail_form')">取消</el-button>
|
|
<el-button @click="rule_close('rules_detail_form')">取消</el-button>
|
|
- <el-button type="primary" v-show="rule_type == 'add'" :loading="rule_loading2" :disabled="rule_loading2" @click="add_submit_rule('rules_detail_form')">确定</el-button>
|
|
|
|
- <el-button type="primary" v-show="rule_type == 'edit'" :loading="rule_loading2" :disabled="rule_loading2" @click="edit_submit_rule('rules_detail_form')">确定</el-button>
|
|
|
|
|
|
+ <el-button type="primary" v-show="rule_type == 'add'" :loading="rule_loading2" :disabled="rule_loading2" @click="add_submit_rule('rules_detail_form')">
|
|
|
|
+ 确定
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button type="primary" v-show="rule_type == 'edit'" :loading="rule_loading2" :disabled="rule_loading2" @click="edit_submit_rule('rules_detail_form')">
|
|
|
|
+ 确定
|
|
|
|
+ </el-button>
|
|
</div>
|
|
</div>
|
|
</el-form>
|
|
</el-form>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
@@ -221,7 +222,6 @@
|
|
ref="upload"
|
|
ref="upload"
|
|
:limit="1"
|
|
:limit="1"
|
|
:action="action"
|
|
:action="action"
|
|
- :on-preview="handlePreview"
|
|
|
|
:on-remove="handleRemove"
|
|
:on-remove="handleRemove"
|
|
:on-success="handleSuccess"
|
|
:on-success="handleSuccess"
|
|
:before-upload="beforeFilesUpload"
|
|
:before-upload="beforeFilesUpload"
|
|
@@ -243,12 +243,12 @@ import QRCode from 'qrcodejs2';
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- ruleDetails:{},
|
|
|
|
- innerVisible:false,
|
|
|
|
- bodyLoad: false,
|
|
|
|
- action:process.env.VUE_APP_BASE_API+'api/rule/import',
|
|
|
|
- downloadUrl:process.env.VUE_APP_BASE_API+'api/download/rule_item',
|
|
|
|
- ATOKEN: { 'A-TOKEN': this.$getToken(),'Accept':'application/vnd.test.v2+json' },
|
|
|
|
|
|
+ ruleDetails: {},
|
|
|
|
+ innerVisible: false,
|
|
|
|
+ bodyLoad: false,
|
|
|
|
+ action: process.env.VUE_APP_BASE_API + 'api/rule/import',
|
|
|
|
+ downloadUrl: process.env.VUE_APP_BASE_API + 'api/download/rule_item',
|
|
|
|
+ ATOKEN: { 'A-TOKEN': this.$getToken(), Accept: 'application/vnd.test.v2+json' },
|
|
tips_show: true,
|
|
tips_show: true,
|
|
rule_loading: false,
|
|
rule_loading: false,
|
|
rule_tree: [],
|
|
rule_tree: [],
|
|
@@ -262,7 +262,7 @@ export default {
|
|
selectItem: { name: '积分规则' }, //选择的分类
|
|
selectItem: { name: '积分规则' }, //选择的分类
|
|
//添加分类
|
|
//添加分类
|
|
class_show: false,
|
|
class_show: false,
|
|
- delRule_loading:false,
|
|
|
|
|
|
+ delRule_loading: false,
|
|
dept_formdata_rules: {
|
|
dept_formdata_rules: {
|
|
name: [
|
|
name: [
|
|
{
|
|
{
|
|
@@ -284,7 +284,7 @@ export default {
|
|
cycle_type: '1'
|
|
cycle_type: '1'
|
|
},
|
|
},
|
|
class_type: 'add',
|
|
class_type: 'add',
|
|
- dept_loading:false,
|
|
|
|
|
|
+ dept_loading: false,
|
|
|
|
|
|
// 规则相关
|
|
// 规则相关
|
|
del_item_id: [], //选择规则ID集合
|
|
del_item_id: [], //选择规则ID集合
|
|
@@ -318,7 +318,7 @@ export default {
|
|
message: '请选择分类',
|
|
message: '请选择分类',
|
|
trigger: 'change'
|
|
trigger: 'change'
|
|
}
|
|
}
|
|
- ],
|
|
|
|
|
|
+ ]
|
|
// min_point2:[{ required: true, message: '分值不能为空'},{ pattern: /^[1-9]\d*$/, message: '分值必须为数字值'}],
|
|
// min_point2:[{ required: true, message: '分值不能为空'},{ pattern: /^[1-9]\d*$/, message: '分值必须为数字值'}],
|
|
// max_point2:[{ required: true, message: '分值不能为空'},{ pattern: /^[1-9]\d*$/, message: '分值必须为数字值'}],
|
|
// max_point2:[{ required: true, message: '分值不能为空'},{ pattern: /^[1-9]\d*$/, message: '分值必须为数字值'}],
|
|
},
|
|
},
|
|
@@ -351,26 +351,26 @@ export default {
|
|
import_btn_show: false,
|
|
import_btn_show: false,
|
|
fileList: [],
|
|
fileList: [],
|
|
file: null,
|
|
file: null,
|
|
- flName:'',
|
|
|
|
|
|
+ flName: ''
|
|
};
|
|
};
|
|
},
|
|
},
|
|
components: {
|
|
components: {
|
|
noData
|
|
noData
|
|
},
|
|
},
|
|
- watch:{
|
|
|
|
|
|
+ watch: {
|
|
'dept_formdata.pid'(val, old_val) {
|
|
'dept_formdata.pid'(val, old_val) {
|
|
- this.$nextTick(()=>{
|
|
|
|
|
|
+ this.$nextTick(() => {
|
|
this.$refs.dept.dropDownVisible = false;
|
|
this.$refs.dept.dropDownVisible = false;
|
|
- })
|
|
|
|
- },
|
|
|
|
|
|
+ });
|
|
|
|
+ },
|
|
'rules_detail_form.rule_id'(val, old_val) {
|
|
'rules_detail_form.rule_id'(val, old_val) {
|
|
- this.$nextTick(()=>{
|
|
|
|
|
|
+ this.$nextTick(() => {
|
|
this.$refs.dept2.dropDownVisible = false;
|
|
this.$refs.dept2.dropDownVisible = false;
|
|
- })
|
|
|
|
|
|
+ });
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
- this.point_types = this.$getTyps().reverse()
|
|
|
|
|
|
+ this.point_types = this.$getTyps().reverse();
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
this.$nextTick(function() {
|
|
this.$nextTick(function() {
|
|
@@ -380,19 +380,19 @@ export default {
|
|
this.tips_show = true;
|
|
this.tips_show = true;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- var that=this;
|
|
|
|
|
|
+ var that = this;
|
|
// setTimeout(function(){
|
|
// setTimeout(function(){
|
|
- that.getData();
|
|
|
|
|
|
+ that.getData();
|
|
// },1000);
|
|
// },1000);
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
downloadE() {
|
|
downloadE() {
|
|
- let rule_remark = ''
|
|
|
|
- if(this.ruleDetails.remark.length > 10){
|
|
|
|
- rule_remark = this.ruleDetails.remark
|
|
|
|
|
|
+ let rule_remark = '';
|
|
|
|
+ if (this.ruleDetails.remark.length > 10) {
|
|
|
|
+ rule_remark = this.ruleDetails.remark;
|
|
rule_remark = rule_remark.slice(0, 10);
|
|
rule_remark = rule_remark.slice(0, 10);
|
|
- }else{
|
|
|
|
- rule_remark = this.ruleDetails.remark
|
|
|
|
|
|
+ } else {
|
|
|
|
+ rule_remark = this.ruleDetails.remark;
|
|
}
|
|
}
|
|
var canvasData = this.$refs.qrcode.getElementsByTagName('canvas')
|
|
var canvasData = this.$refs.qrcode.getElementsByTagName('canvas')
|
|
var a = document.createElement("a");
|
|
var a = document.createElement("a");
|
|
@@ -406,7 +406,7 @@ export default {
|
|
let appid = '?appId='+this.$appId
|
|
let appid = '?appId='+this.$appId
|
|
let corpId = '&corpId='+localStorage.getItem('corpId')
|
|
let corpId = '&corpId='+localStorage.getItem('corpId')
|
|
// let corpId = '&corpId=ding011f57ab048cf202ffe93478753d9884'
|
|
// let corpId = '&corpId=ding011f57ab048cf202ffe93478753d9884'
|
|
- let page = '&page='+encodeURIComponent(`pages/workbench/apply/apply?item=${encodeURIComponent(row)}`)//encodeURIComponent('小米')
|
|
|
|
|
|
+ let page = '&page='+encodeURIComponent(`pages/workbench/apply/apply?id=${encodeURIComponent(row)}`)//encodeURIComponent('小米')
|
|
let urls = url+appid+corpId+page
|
|
let urls = url+appid+corpId+page
|
|
var qrcode = new QRCode('qrcode', {
|
|
var qrcode = new QRCode('qrcode', {
|
|
text: urls, // 二维码内容
|
|
text: urls, // 二维码内容
|
|
@@ -418,21 +418,20 @@ export default {
|
|
correctLevel: QRCode.CorrectLevel.H // 容错等级,H是heigh,最高,所以二维码看起来很密
|
|
correctLevel: QRCode.CorrectLevel.H // 容错等级,H是heigh,最高,所以二维码看起来很密
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- ruleQRcode(row){
|
|
|
|
- this.ruleDetails = row
|
|
|
|
- console.log(row)
|
|
|
|
|
|
+ ruleQRcode(row) {
|
|
|
|
+ this.ruleDetails = row;
|
|
// 生成二维码
|
|
// 生成二维码
|
|
- this.innerVisible = true
|
|
|
|
|
|
+ this.innerVisible = true;
|
|
// 使用$nextTick确保数据渲染
|
|
// 使用$nextTick确保数据渲染
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
- this.payOrder(row)
|
|
|
|
- })
|
|
|
|
|
|
+ this.payOrder(row.id);
|
|
|
|
+ });
|
|
},
|
|
},
|
|
// 关闭弹框,清除已经生成的二维码
|
|
// 关闭弹框,清除已经生成的二维码
|
|
- closeCode () {
|
|
|
|
- setTimeout(()=>{
|
|
|
|
- this.$refs.qrcode.innerHTML = ''
|
|
|
|
- },150)
|
|
|
|
|
|
+ closeCode() {
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ this.$refs.qrcode.innerHTML = '';
|
|
|
|
+ }, 150);
|
|
},
|
|
},
|
|
|
|
|
|
// 导入相关
|
|
// 导入相关
|
|
@@ -446,7 +445,8 @@ export default {
|
|
let params = {
|
|
let params = {
|
|
file: this.file
|
|
file: this.file
|
|
};
|
|
};
|
|
- this.$axios('post','/api/rule/import', params,).then(res => {
|
|
|
|
|
|
+ this.$axios('post', '/api/rule/import', params)
|
|
|
|
+ .then(res => {
|
|
if (res.data.code == 1) {
|
|
if (res.data.code == 1) {
|
|
this.close_import();
|
|
this.close_import();
|
|
this.$message.success({ message: res.data.msg });
|
|
this.$message.success({ message: res.data.msg });
|
|
@@ -454,32 +454,33 @@ export default {
|
|
} else {
|
|
} else {
|
|
this.$message({ type: 'error', message: res.data.msg });
|
|
this.$message({ type: 'error', message: res.data.msg });
|
|
}
|
|
}
|
|
- }).finally(() => {
|
|
|
|
|
|
+ })
|
|
|
|
+ .finally(() => {
|
|
this.save_loading = false;
|
|
this.save_loading = false;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
handleSuccess(response) {
|
|
handleSuccess(response) {
|
|
if (response.code == 1) {
|
|
if (response.code == 1) {
|
|
- if(response.data.length>0){
|
|
|
|
- var htmls=response.data;
|
|
|
|
- var str="<div class='red'></div>";
|
|
|
|
- htmls.forEach(item=>{
|
|
|
|
- str+=`<div>${item.errors}</div>`;
|
|
|
|
- })
|
|
|
|
|
|
+ if (response.data.length > 0) {
|
|
|
|
+ var htmls = response.data;
|
|
|
|
+ var str = "<div class='red'></div>";
|
|
|
|
+ htmls.forEach(item => {
|
|
|
|
+ str += `<div>${item.errors}</div>`;
|
|
|
|
+ });
|
|
this.close_import();
|
|
this.close_import();
|
|
this.$notify.error({
|
|
this.$notify.error({
|
|
- title: '导入错误',
|
|
|
|
- dangerouslyUseHTMLString: true,
|
|
|
|
- message: str,
|
|
|
|
- duration:0,
|
|
|
|
- offset:50,
|
|
|
|
- customClass:'notifyBox',
|
|
|
|
|
|
+ title: '导入错误',
|
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
|
+ message: str,
|
|
|
|
+ duration: 0,
|
|
|
|
+ offset: 50,
|
|
|
|
+ customClass: 'notifyBox'
|
|
});
|
|
});
|
|
- }else{
|
|
|
|
- this.file = response.data;
|
|
|
|
- this.$message.success({ message: response.msg });
|
|
|
|
- this.getData();
|
|
|
|
- this.close_import();
|
|
|
|
|
|
+ } else {
|
|
|
|
+ this.file = response.data;
|
|
|
|
+ this.$message.success({ message: response.msg });
|
|
|
|
+ this.getData();
|
|
|
|
+ this.close_import();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -490,9 +491,6 @@ export default {
|
|
this.import_btn_show = false;
|
|
this.import_btn_show = false;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- handlePreview(file) {
|
|
|
|
- console.log(file);
|
|
|
|
- },
|
|
|
|
imgChange(file, fileList) {
|
|
imgChange(file, fileList) {
|
|
if (fileList !== null && fileList.length != 0) {
|
|
if (fileList !== null && fileList.length != 0) {
|
|
this.import_btn_show = true;
|
|
this.import_btn_show = true;
|
|
@@ -516,9 +514,9 @@ export default {
|
|
let self = this;
|
|
let self = this;
|
|
self.$refs[form].validate(valid => {
|
|
self.$refs[form].validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- if(self.rules_detail_form.min_point==0||!self.rules_detail_form.min_point){
|
|
|
|
|
|
+ if (self.rules_detail_form.min_point == 0 || !self.rules_detail_form.min_point) {
|
|
this.$message.error('请输入积分分值');
|
|
this.$message.error('请输入积分分值');
|
|
- return
|
|
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
// self.rules_detail_form.min_point=self.rules_detail_form.min_point2;
|
|
// self.rules_detail_form.min_point=self.rules_detail_form.min_point2;
|
|
// self.rules_detail_form.max_point=self.rules_detail_form.max_point2;
|
|
// self.rules_detail_form.max_point=self.rules_detail_form.max_point2;
|
|
@@ -531,8 +529,8 @@ export default {
|
|
if (self.rules_detail_form.range_type == 1) {
|
|
if (self.rules_detail_form.range_type == 1) {
|
|
self.rules_detail_form.max_point = self.rules_detail_form.min_point;
|
|
self.rules_detail_form.max_point = self.rules_detail_form.min_point;
|
|
}
|
|
}
|
|
- if(Array.isArray(self.rules_detail_form.rule_id)){
|
|
|
|
- self.rules_detail_form.rule_id=self.rules_detail_form.rule_id[self.rules_detail_form.rule_id.length-1];
|
|
|
|
|
|
+ if (Array.isArray(self.rules_detail_form.rule_id)) {
|
|
|
|
+ self.rules_detail_form.rule_id = self.rules_detail_form.rule_id[self.rules_detail_form.rule_id.length - 1];
|
|
}
|
|
}
|
|
if (parseFloat(self.rules_detail_form.min_point) > parseFloat(self.rules_detail_form.max_point)) {
|
|
if (parseFloat(self.rules_detail_form.min_point) > parseFloat(self.rules_detail_form.max_point)) {
|
|
this.$confirm(
|
|
this.$confirm(
|
|
@@ -551,52 +549,54 @@ export default {
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
type: 'warning'
|
|
}
|
|
}
|
|
- )
|
|
|
|
- .then(() => {
|
|
|
|
- this.rule_loading2=true;
|
|
|
|
- let min_point = self.rules_detail_form.min_point;
|
|
|
|
- self.rules_detail_form.min_point = self.rules_detail_form.max_point;
|
|
|
|
- self.rules_detail_form.max_point = min_point;
|
|
|
|
- let data = self.rules_detail_form;
|
|
|
|
- data.item_id = self.rules_detail_form.id;
|
|
|
|
- if (self.rules_detail_form.min_point == 0 && self.rules_detail_form.range_type == 1) {
|
|
|
|
- self.$message.error('积分不能为零');
|
|
|
|
- this.rule_loading2=false;
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
- this.$axios('post','/api/integral/rule/items/edit', data).then(res => {
|
|
|
|
- if (res.data.code == 1) {
|
|
|
|
- self.$message.success(res.data.msg);
|
|
|
|
- self.getData();
|
|
|
|
- self.rule_close(form);
|
|
|
|
- }
|
|
|
|
- }).finally(err=>{
|
|
|
|
- this.rule_loading2=false;
|
|
|
|
|
|
+ ).then(() => {
|
|
|
|
+ this.rule_loading2 = true;
|
|
|
|
+ let min_point = self.rules_detail_form.min_point;
|
|
|
|
+ self.rules_detail_form.min_point = self.rules_detail_form.max_point;
|
|
|
|
+ self.rules_detail_form.max_point = min_point;
|
|
|
|
+ let data = self.rules_detail_form;
|
|
|
|
+ data.item_id = self.rules_detail_form.id;
|
|
|
|
+ if (self.rules_detail_form.min_point == 0 && self.rules_detail_form.range_type == 1) {
|
|
|
|
+ self.$message.error('积分不能为零');
|
|
|
|
+ this.rule_loading2 = false;
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ this.$axios('post', '/api/integral/rule/items/edit', data)
|
|
|
|
+ .then(res => {
|
|
|
|
+ if (res.data.code == 1) {
|
|
|
|
+ self.$message.success(res.data.msg);
|
|
|
|
+ self.getData();
|
|
|
|
+ self.rule_close(form);
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ .finally(err => {
|
|
|
|
+ this.rule_loading2 = false;
|
|
});
|
|
});
|
|
-
|
|
|
|
- })
|
|
|
|
|
|
+ });
|
|
} else {
|
|
} else {
|
|
- this.rule_loading2=true;
|
|
|
|
|
|
+ this.rule_loading2 = true;
|
|
self.rules_detail_form.item_id = self.rules_detail_form.id;
|
|
self.rules_detail_form.item_id = self.rules_detail_form.id;
|
|
let data = self.rules_detail_form;
|
|
let data = self.rules_detail_form;
|
|
data.item_id = self.rules_detail_form.id;
|
|
data.item_id = self.rules_detail_form.id;
|
|
if (self.rules_detail_form.min_point == 0 && self.rules_detail_form.range_type == 1) {
|
|
if (self.rules_detail_form.min_point == 0 && self.rules_detail_form.range_type == 1) {
|
|
self.$message.error('积分不能为零');
|
|
self.$message.error('积分不能为零');
|
|
- this.rule_loading2=false;
|
|
|
|
|
|
+ this.rule_loading2 = false;
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
- this.$axios('post','/api/integral/rule/items/edit', data).then(res => {
|
|
|
|
|
|
+ this.$axios('post', '/api/integral/rule/items/edit', data)
|
|
|
|
+ .then(res => {
|
|
if (res.data.code == 1) {
|
|
if (res.data.code == 1) {
|
|
self.$message.success(res.data.msg);
|
|
self.$message.success(res.data.msg);
|
|
self.getData();
|
|
self.getData();
|
|
self.rule_close(form);
|
|
self.rule_close(form);
|
|
}
|
|
}
|
|
- }).finally(() => {
|
|
|
|
|
|
+ })
|
|
|
|
+ .finally(() => {
|
|
this.rule_loading2 = false;
|
|
this.rule_loading2 = false;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- this.rule_loading2=false;
|
|
|
|
|
|
+ this.rule_loading2 = false;
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -617,69 +617,81 @@ export default {
|
|
if (self.rules_detail_form.range_type == 1) {
|
|
if (self.rules_detail_form.range_type == 1) {
|
|
self.rules_detail_form.max_point = self.rules_detail_form.min_point;
|
|
self.rules_detail_form.max_point = self.rules_detail_form.min_point;
|
|
}
|
|
}
|
|
- if(self.rules_detail_form.min_point==0||!self.rules_detail_form.min_point||self.rules_detail_form.max_point==0||!self.rules_detail_form.max_point){
|
|
|
|
|
|
+ if (self.rules_detail_form.min_point == 0 || !self.rules_detail_form.min_point || self.rules_detail_form.max_point == 0 || !self.rules_detail_form.max_point) {
|
|
this.$message.error('请输入积分分值');
|
|
this.$message.error('请输入积分分值');
|
|
- return
|
|
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
- if(Array.isArray(self.rules_detail_form.rule_id)){
|
|
|
|
- self.rules_detail_form.rule_id=self.rules_detail_form.rule_id[self.rules_detail_form.rule_id.length-1];
|
|
|
|
|
|
+ if (Array.isArray(self.rules_detail_form.rule_id)) {
|
|
|
|
+ self.rules_detail_form.rule_id = self.rules_detail_form.rule_id[self.rules_detail_form.rule_id.length - 1];
|
|
}
|
|
}
|
|
if (parseFloat(self.rules_detail_form.min_point) > parseFloat(self.rules_detail_form.max_point)) {
|
|
if (parseFloat(self.rules_detail_form.min_point) > parseFloat(self.rules_detail_form.max_point)) {
|
|
this.$confirm(
|
|
this.$confirm(
|
|
- '填写的规则积分是' +self.rules_detail_form.min_point +' ~ ' +self.rules_detail_form.max_point +',应该是 ' +self.rules_detail_form.max_point +
|
|
|
|
- ' ~ ' +self.rules_detail_form.min_point +'吧?','提示',
|
|
|
|
|
|
+ '填写的规则积分是' +
|
|
|
|
+ self.rules_detail_form.min_point +
|
|
|
|
+ ' ~ ' +
|
|
|
|
+ self.rules_detail_form.max_point +
|
|
|
|
+ ',应该是 ' +
|
|
|
|
+ self.rules_detail_form.max_point +
|
|
|
|
+ ' ~ ' +
|
|
|
|
+ self.rules_detail_form.min_point +
|
|
|
|
+ '吧?',
|
|
|
|
+ '提示',
|
|
{
|
|
{
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
type: 'warning'
|
|
}
|
|
}
|
|
).then(() => {
|
|
).then(() => {
|
|
- this.rule_loading2=true;
|
|
|
|
|
|
+ this.rule_loading2 = true;
|
|
let min_point = self.rules_detail_form.min_point;
|
|
let min_point = self.rules_detail_form.min_point;
|
|
self.rules_detail_form.min_point = self.rules_detail_form.max_point;
|
|
self.rules_detail_form.min_point = self.rules_detail_form.max_point;
|
|
self.rules_detail_form.max_point = min_point;
|
|
self.rules_detail_form.max_point = min_point;
|
|
if (self.rules_detail_form.min_point == 0 && self.rules_detail_form.range_type == 1) {
|
|
if (self.rules_detail_form.min_point == 0 && self.rules_detail_form.range_type == 1) {
|
|
self.$message.error('积分不能为零');
|
|
self.$message.error('积分不能为零');
|
|
- this.rule_loading2=false;
|
|
|
|
|
|
+ this.rule_loading2 = false;
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
let data = {
|
|
let data = {
|
|
items: [self.rules_detail_form]
|
|
items: [self.rules_detail_form]
|
|
};
|
|
};
|
|
- this.$axios('post','/api/integral/rule/items', data).then(res => {
|
|
|
|
|
|
+ this.$axios('post', '/api/integral/rule/items', data)
|
|
|
|
+ .then(res => {
|
|
if (res.data.code == 1) {
|
|
if (res.data.code == 1) {
|
|
self.$message.success(res.data.msg);
|
|
self.$message.success(res.data.msg);
|
|
self.getData();
|
|
self.getData();
|
|
self.rule_close(form);
|
|
self.rule_close(form);
|
|
}
|
|
}
|
|
- }).finally(() => {
|
|
|
|
|
|
+ })
|
|
|
|
+ .finally(() => {
|
|
this.rule_loading2 = false;
|
|
this.rule_loading2 = false;
|
|
});
|
|
});
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
- this.rule_loading2=true;
|
|
|
|
|
|
+ this.rule_loading2 = true;
|
|
self.rules_detail_form.item_id = self.rules_detail_form.id;
|
|
self.rules_detail_form.item_id = self.rules_detail_form.id;
|
|
-
|
|
|
|
|
|
+
|
|
if (self.rules_detail_form.min_point == 0 && self.rules_detail_form.range_type == 1) {
|
|
if (self.rules_detail_form.min_point == 0 && self.rules_detail_form.range_type == 1) {
|
|
self.$message.error('积分不能为零');
|
|
self.$message.error('积分不能为零');
|
|
- this.rule_loading2=false;
|
|
|
|
|
|
+ this.rule_loading2 = false;
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
let data = {
|
|
let data = {
|
|
items: [self.rules_detail_form]
|
|
items: [self.rules_detail_form]
|
|
};
|
|
};
|
|
- this.$axios('post','/api/integral/rule/items', data).then(res => {
|
|
|
|
|
|
+ this.$axios('post', '/api/integral/rule/items', data)
|
|
|
|
+ .then(res => {
|
|
if (res.data.code == 1) {
|
|
if (res.data.code == 1) {
|
|
self.$message.success(res.data.msg);
|
|
self.$message.success(res.data.msg);
|
|
self.getData();
|
|
self.getData();
|
|
self.rule_close(form);
|
|
self.rule_close(form);
|
|
}
|
|
}
|
|
- }).finally(() => {
|
|
|
|
|
|
+ })
|
|
|
|
+ .finally(() => {
|
|
this.rule_loading2 = false;
|
|
this.rule_loading2 = false;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- this.rule_loading2=false;
|
|
|
|
|
|
+ this.rule_loading2 = false;
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -690,20 +702,25 @@ export default {
|
|
let data = {
|
|
let data = {
|
|
item_id: [this.rules_detail_form.id]
|
|
item_id: [this.rules_detail_form.id]
|
|
};
|
|
};
|
|
- this.delRule_loading=true;
|
|
|
|
- self.$confirm('此操作将永久删除该选项, 是否继续?', '提示').then(() => {
|
|
|
|
- this.$axios('post','/api/integral/rule/items/destroy', data).then(res => {
|
|
|
|
|
|
+ this.delRule_loading = true;
|
|
|
|
+ self.$confirm('此操作将永久删除该选项, 是否继续?', '提示').then(
|
|
|
|
+ () => {
|
|
|
|
+ this.$axios('post', '/api/integral/rule/items/destroy', data)
|
|
|
|
+ .then(res => {
|
|
if (res.data.code == 1) {
|
|
if (res.data.code == 1) {
|
|
self.$message.success(res.data.msg);
|
|
self.$message.success(res.data.msg);
|
|
self.rule_show = false;
|
|
self.rule_show = false;
|
|
self.getData(true);
|
|
self.getData(true);
|
|
}
|
|
}
|
|
- }).finally(() => {
|
|
|
|
|
|
+ })
|
|
|
|
+ .finally(() => {
|
|
this.delRule_loading = false;
|
|
this.delRule_loading = false;
|
|
- });
|
|
|
|
- },(err)=>{
|
|
|
|
- this.delRule_loading = false;
|
|
|
|
- });
|
|
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ err => {
|
|
|
|
+ this.delRule_loading = false;
|
|
|
|
+ }
|
|
|
|
+ );
|
|
},
|
|
},
|
|
//关闭规则弹窗
|
|
//关闭规则弹窗
|
|
rule_close(form) {
|
|
rule_close(form) {
|
|
@@ -716,9 +733,9 @@ export default {
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
type: 'warning'
|
|
}).then(() => {
|
|
}).then(() => {
|
|
- this.rule_show = false;
|
|
|
|
- this.class_show = true;
|
|
|
|
- })
|
|
|
|
|
|
+ this.rule_show = false;
|
|
|
|
+ this.class_show = true;
|
|
|
|
+ });
|
|
},
|
|
},
|
|
add_rule() {
|
|
add_rule() {
|
|
this.rule_show = true;
|
|
this.rule_show = true;
|
|
@@ -753,45 +770,45 @@ export default {
|
|
let data = {
|
|
let data = {
|
|
item_id: this.del_item_id
|
|
item_id: this.del_item_id
|
|
};
|
|
};
|
|
- this.$axios('post','/api/integral/rule/items/destroy', data).then(res => {
|
|
|
|
- if (res.data.code == 1) {
|
|
|
|
- this.$message.success(res.data.msg);
|
|
|
|
- this.getData();
|
|
|
|
- this.handleNodeClick(this.selectItem);
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ this.$axios('post', '/api/integral/rule/items/destroy', data).then(res => {
|
|
|
|
+ if (res.data.code == 1) {
|
|
|
|
+ this.$message.success(res.data.msg);
|
|
|
|
+ this.getData();
|
|
|
|
+ this.handleNodeClick(this.selectItem);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|
|
editDetails(val) {
|
|
editDetails(val) {
|
|
this.rules_detail_form = JSON.parse(JSON.stringify(val));
|
|
this.rules_detail_form = JSON.parse(JSON.stringify(val));
|
|
-
|
|
|
|
|
|
+
|
|
if (this.rules_detail_form.min_point == this.rules_detail_form.max_point) {
|
|
if (this.rules_detail_form.min_point == this.rules_detail_form.max_point) {
|
|
this.rules_detail_form.range_type = '1';
|
|
this.rules_detail_form.range_type = '1';
|
|
} else {
|
|
} else {
|
|
this.rules_detail_form.range_type = '2';
|
|
this.rules_detail_form.range_type = '2';
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
if (this.rules_detail_form.min_point < 0) {
|
|
if (this.rules_detail_form.min_point < 0) {
|
|
this.integral_select_name1 = '2';
|
|
this.integral_select_name1 = '2';
|
|
- let str=this.rules_detail_form.min_point;
|
|
|
|
- this.rules_detail_form.min_point=str.toString().substring(1);
|
|
|
|
|
|
+ let str = this.rules_detail_form.min_point;
|
|
|
|
+ this.rules_detail_form.min_point = str.toString().substring(1);
|
|
// this.rules_detail_form.min_point2=str.toString().substring(1);
|
|
// this.rules_detail_form.min_point2=str.toString().substring(1);
|
|
} else {
|
|
} else {
|
|
this.integral_select_name1 = '1';
|
|
this.integral_select_name1 = '1';
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
if (this.rules_detail_form.max_point < 0) {
|
|
if (this.rules_detail_form.max_point < 0) {
|
|
this.integral_select_name2 = '2';
|
|
this.integral_select_name2 = '2';
|
|
- let str=this.rules_detail_form.max_point;
|
|
|
|
- this.rules_detail_form.max_point=str.toString().substring(1);
|
|
|
|
|
|
+ let str = this.rules_detail_form.max_point;
|
|
|
|
+ this.rules_detail_form.max_point = str.toString().substring(1);
|
|
// this.rules_detail_form.max_point2=str.toString().substring(1);
|
|
// this.rules_detail_form.max_point2=str.toString().substring(1);
|
|
} else {
|
|
} else {
|
|
this.integral_select_name2 = '1';
|
|
this.integral_select_name2 = '1';
|
|
}
|
|
}
|
|
// this.rules_detail_form.min_point2=this.rules_detail_form.min_point;
|
|
// this.rules_detail_form.min_point2=this.rules_detail_form.min_point;
|
|
// this.rules_detail_form.max_point2=this.rules_detail_form.max_point;
|
|
// this.rules_detail_form.max_point2=this.rules_detail_form.max_point;
|
|
-
|
|
|
|
|
|
+
|
|
this.rule_show = true;
|
|
this.rule_show = true;
|
|
this.rule_type = 'edit';
|
|
this.rule_type = 'edit';
|
|
},
|
|
},
|
|
@@ -807,10 +824,10 @@ export default {
|
|
this.selectItem = {
|
|
this.selectItem = {
|
|
child: e.child,
|
|
child: e.child,
|
|
id: e.id,
|
|
id: e.id,
|
|
- name:e.name,
|
|
|
|
- pid: e.pid,
|
|
|
|
|
|
+ name: e.name,
|
|
|
|
+ pid: e.pid
|
|
};
|
|
};
|
|
- this.flName=e.name;
|
|
|
|
|
|
+ this.flName = e.name;
|
|
this.item_list = items;
|
|
this.item_list = items;
|
|
},
|
|
},
|
|
getItemData(e) {
|
|
getItemData(e) {
|
|
@@ -851,86 +868,91 @@ export default {
|
|
getData(is) {
|
|
getData(is) {
|
|
this.rule_loading = true;
|
|
this.rule_loading = true;
|
|
var that = this;
|
|
var that = this;
|
|
- this.$axios('get','/api/integral/rule/trees', {cycle_type: 1}).then(res => {
|
|
|
|
- var item_list = res.data.data.item_list || [];
|
|
|
|
- var list = [];
|
|
|
|
- for (let i in item_list) {
|
|
|
|
- for (let k in item_list[i]) {
|
|
|
|
- item_list[i][k].pt_Obj = that.$getTyps(item_list[i][k].pt_id);
|
|
|
|
- list.push(item_list[i][k]);
|
|
|
|
|
|
+ this.$axios('get', '/api/integral/rule/trees', { cycle_type: 1 })
|
|
|
|
+ .then(res => {
|
|
|
|
+ var item_list = res.data.data.item_list || [];
|
|
|
|
+ var list = [];
|
|
|
|
+ for (let i in item_list) {
|
|
|
|
+ for (let k in item_list[i]) {
|
|
|
|
+ item_list[i][k].pt_Obj = that.$getTyps(item_list[i][k].pt_id);
|
|
|
|
+ list.push(item_list[i][k]);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- }
|
|
|
|
- that.rule_tree = res.data.data.rule_tree || [];
|
|
|
|
- that.item_list = list;
|
|
|
|
- that.all_item_list = list;
|
|
|
|
- if (is) {
|
|
|
|
- that.handleNodeClick(that.selectItem);
|
|
|
|
- } else {
|
|
|
|
- this.selectItem = { name: '积分规则' }; //选择的分类
|
|
|
|
- }
|
|
|
|
- }).finally(() => {
|
|
|
|
- this.rule_loading = false;
|
|
|
|
- });
|
|
|
|
|
|
+ that.rule_tree = res.data.data.rule_tree || [];
|
|
|
|
+ that.item_list = list;
|
|
|
|
+ that.all_item_list = list;
|
|
|
|
+ if (is) {
|
|
|
|
+ that.handleNodeClick(that.selectItem);
|
|
|
|
+ } else {
|
|
|
|
+ this.selectItem = { name: '积分规则' }; //选择的分类
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ .finally(() => {
|
|
|
|
+ this.rule_loading = false;
|
|
|
|
+ });
|
|
},
|
|
},
|
|
//编辑分组
|
|
//编辑分组
|
|
edit_class() {
|
|
edit_class() {
|
|
this.class_show = true;
|
|
this.class_show = true;
|
|
this.class_type = 'edit';
|
|
this.class_type = 'edit';
|
|
- this.dept_formdata={
|
|
|
|
|
|
+ this.dept_formdata = {
|
|
child: this.selectItem.child,
|
|
child: this.selectItem.child,
|
|
id: this.selectItem.id,
|
|
id: this.selectItem.id,
|
|
name: this.selectItem.name,
|
|
name: this.selectItem.name,
|
|
- pid: this.selectItem.pid,
|
|
|
|
- }
|
|
|
|
|
|
+ pid: this.selectItem.pid
|
|
|
|
+ };
|
|
},
|
|
},
|
|
//添加分组
|
|
//添加分组
|
|
submit_add_dept(form) {
|
|
submit_add_dept(form) {
|
|
- this.dept_loading=true;
|
|
|
|
|
|
+ this.dept_loading = true;
|
|
let that = this;
|
|
let that = this;
|
|
that.$refs[form].validate(valid => {
|
|
that.$refs[form].validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
if (that.class_type == 'edit') {
|
|
if (that.class_type == 'edit') {
|
|
delete that.dept_formdata.child;
|
|
delete that.dept_formdata.child;
|
|
that.dept_formdata.rule_id = that.dept_formdata.id;
|
|
that.dept_formdata.rule_id = that.dept_formdata.id;
|
|
- if(typeof(that.dept_formdata.pid)=='number'){
|
|
|
|
- }else{
|
|
|
|
- if(that.dept_formdata.pid.length>0){
|
|
|
|
- that.dept_formdata.pid =that.dept_formdata.pid[that.dept_formdata.pid.length - 1];
|
|
|
|
- }else{
|
|
|
|
- that.dept_formdata.pid=0;
|
|
|
|
|
|
+ if (typeof that.dept_formdata.pid == 'number') {
|
|
|
|
+ } else {
|
|
|
|
+ if (that.dept_formdata.pid.length > 0) {
|
|
|
|
+ that.dept_formdata.pid = that.dept_formdata.pid[that.dept_formdata.pid.length - 1];
|
|
|
|
+ } else {
|
|
|
|
+ that.dept_formdata.pid = 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- this.$axios('post','/api/integral/rule/edit', that.dept_formdata).then(res => {
|
|
|
|
- if (res.data.code == 1) {
|
|
|
|
- that.selectItem.name=that.dept_formdata.name;
|
|
|
|
- that.$message.success('修改积分分类成功');
|
|
|
|
- this.getData(true);
|
|
|
|
- this.add_dept_close('dept_formdata');
|
|
|
|
- }
|
|
|
|
- }).finally(() => {
|
|
|
|
- this.dept_loading = false;
|
|
|
|
- });
|
|
|
|
|
|
+ this.$axios('post', '/api/integral/rule/edit', that.dept_formdata)
|
|
|
|
+ .then(res => {
|
|
|
|
+ if (res.data.code == 1) {
|
|
|
|
+ that.selectItem.name = that.dept_formdata.name;
|
|
|
|
+ that.$message.success('修改积分分类成功');
|
|
|
|
+ this.getData(true);
|
|
|
|
+ this.add_dept_close('dept_formdata');
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ .finally(() => {
|
|
|
|
+ this.dept_loading = false;
|
|
|
|
+ });
|
|
} else {
|
|
} else {
|
|
if (that.dept_formdata.pid !== null && that.dept_formdata.pid.length == 0) {
|
|
if (that.dept_formdata.pid !== null && that.dept_formdata.pid.length == 0) {
|
|
that.dept_formdata.pid = 0;
|
|
that.dept_formdata.pid = 0;
|
|
} else {
|
|
} else {
|
|
that.dept_formdata.pid = that.dept_formdata.pid[that.dept_formdata.pid.length - 1];
|
|
that.dept_formdata.pid = that.dept_formdata.pid[that.dept_formdata.pid.length - 1];
|
|
}
|
|
}
|
|
- this.$axios('post','/api/integral/rule', that.dept_formdata).then(res => {
|
|
|
|
- if (res.data.code == 1) {
|
|
|
|
- that.$message.success('添加积分分类成功');
|
|
|
|
- this.getData(true);
|
|
|
|
- this.add_dept_close('dept_formdata');
|
|
|
|
- }
|
|
|
|
- }).finally(() => {
|
|
|
|
- this.dept_loading = false;
|
|
|
|
- });
|
|
|
|
|
|
+ this.$axios('post', '/api/integral/rule', that.dept_formdata)
|
|
|
|
+ .then(res => {
|
|
|
|
+ if (res.data.code == 1) {
|
|
|
|
+ that.$message.success('添加积分分类成功');
|
|
|
|
+ this.getData(true);
|
|
|
|
+ this.add_dept_close('dept_formdata');
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ .finally(() => {
|
|
|
|
+ this.dept_loading = false;
|
|
|
|
+ });
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- this.dept_loading=false;
|
|
|
|
|
|
+ this.dept_loading = false;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
-
|
|
|
|
},
|
|
},
|
|
//删除分组
|
|
//删除分组
|
|
del_dept() {
|
|
del_dept() {
|
|
@@ -939,7 +961,7 @@ export default {
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
type: 'warning'
|
|
}).then(() => {
|
|
}).then(() => {
|
|
- this.$axios('post','/api/integral/rule/destroy', { rule_id: this.selectItem.id }).then(res => {
|
|
|
|
|
|
+ this.$axios('post', '/api/integral/rule/destroy', { rule_id: this.selectItem.id }).then(res => {
|
|
if (res.data.code == 1) {
|
|
if (res.data.code == 1) {
|
|
this.$message.success(res.data.msg);
|
|
this.$message.success(res.data.msg);
|
|
this.getData();
|
|
this.getData();
|
|
@@ -1028,7 +1050,7 @@ $red: #f56c6c;
|
|
white-space: nowrap;
|
|
white-space: nowrap;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-.form-right ::v-deep .el-form-item__content{
|
|
|
|
|
|
+.form-right ::v-deep .el-form-item__content {
|
|
margin-left: 0px !important;
|
|
margin-left: 0px !important;
|
|
}
|
|
}
|
|
.terr-left button {
|
|
.terr-left button {
|
|
@@ -1038,36 +1060,36 @@ $red: #f56c6c;
|
|
}
|
|
}
|
|
|
|
|
|
.el-dropdown-links {
|
|
.el-dropdown-links {
|
|
- font-size: 20px;
|
|
|
|
- cursor: pointer;
|
|
|
|
- color: #686a6d;
|
|
|
|
|
|
+ font-size: 20px;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ color: #686a6d;
|
|
}
|
|
}
|
|
-.color-red{
|
|
|
|
- color: $red;
|
|
|
|
- &:hover{
|
|
|
|
- color: #f14141;
|
|
|
|
- }
|
|
|
|
|
|
+.color-red {
|
|
|
|
+ color: $red;
|
|
|
|
+ &:hover {
|
|
|
|
+ color: #f14141;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-.qrcodesave{
|
|
|
|
|
|
+.qrcodesave {
|
|
text-align: center;
|
|
text-align: center;
|
|
margin-top: 15px;
|
|
margin-top: 15px;
|
|
font-size: 18px;
|
|
font-size: 18px;
|
|
- span{
|
|
|
|
|
|
+ span {
|
|
color: #606266;
|
|
color: #606266;
|
|
- cursor:pointer;
|
|
|
|
- transition: all .3s;
|
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ transition: all 0.3s;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-.qrcodesave span:hover{
|
|
|
|
|
|
+.qrcodesave span:hover {
|
|
color: #2490fd;
|
|
color: #2490fd;
|
|
}
|
|
}
|
|
-.lookQrcode{
|
|
|
|
|
|
+.lookQrcode {
|
|
color: #606266;
|
|
color: #606266;
|
|
- cursor:pointer;
|
|
|
|
- transition: all .3s;
|
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ transition: all 0.3s;
|
|
}
|
|
}
|
|
-.lookQrcode:hover{
|
|
|
|
|
|
+.lookQrcode:hover {
|
|
color: #2490fd;
|
|
color: #2490fd;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|