|
@@ -49,9 +49,9 @@
|
|
</view> -->
|
|
</view> -->
|
|
<view class="bind-btn-row">
|
|
<view class="bind-btn-row">
|
|
<button type="default" size="mini" class="kc-bind-btn phone-green-btn"
|
|
<button type="default" size="mini" class="kc-bind-btn phone-green-btn"
|
|
- @click.stop="toDelete(item)">重置</button>
|
|
|
|
|
|
+ @click="toReset(item)">重置</button>
|
|
<button type="default" size="mini" class="kc-bind-btn phone-white-btn"
|
|
<button type="default" size="mini" class="kc-bind-btn phone-white-btn"
|
|
- @click.stop="toDelete(item)">删除</button>
|
|
|
|
|
|
+ @click="toDelete(item)">删除</button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -75,7 +75,8 @@
|
|
jiazhengKcList,
|
|
jiazhengKcList,
|
|
jiazhengKcAdd,
|
|
jiazhengKcAdd,
|
|
jiazhengKcDelete,
|
|
jiazhengKcDelete,
|
|
- getAdminClassify
|
|
|
|
|
|
+ getAdminClassify,
|
|
|
|
+ kechengReset
|
|
} from "@/api/jiazheng.js";
|
|
} from "@/api/jiazheng.js";
|
|
import commonDialog from '@/components/dialog/commonDialog.vue';
|
|
import commonDialog from '@/components/dialog/commonDialog.vue';
|
|
import kechengLeixingVue from "./common/kechengLeixing.vue";
|
|
import kechengLeixingVue from "./common/kechengLeixing.vue";
|
|
@@ -123,7 +124,25 @@
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
toReset(data){
|
|
toReset(data){
|
|
-
|
|
|
|
|
|
+ let req = {
|
|
|
|
+ kcId: data.kcId,
|
|
|
|
+ id: this.id
|
|
|
|
+ }
|
|
|
|
+ kechengReset(req).then(res => {
|
|
|
|
+ if (res.code == 0) {
|
|
|
|
+ this.getList()
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '成功',
|
|
|
|
+ icon: 'success'
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '失败',
|
|
|
|
+ icon: 'success'
|
|
|
|
+ });
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ })
|
|
},
|
|
},
|
|
searchBtn() {
|
|
searchBtn() {
|
|
this.$refs.searchRef.handleShow()
|
|
this.$refs.searchRef.handleShow()
|
|
@@ -157,32 +176,36 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
toAdd(data) {
|
|
toAdd(data) {
|
|
- debounce(()=>{
|
|
|
|
- let req = {
|
|
|
|
- kcIds: [data.kcId],
|
|
|
|
- id: this.id
|
|
|
|
- }
|
|
|
|
- jiazhengKcAdd(req).then(res => {
|
|
|
|
- if (res.code == 0) {
|
|
|
|
- this.getList()
|
|
|
|
- uni.showToast({
|
|
|
|
- title: '添加成功',
|
|
|
|
- icon: 'success'
|
|
|
|
- });
|
|
|
|
- } else {
|
|
|
|
- uni.showToast({
|
|
|
|
- title: '添加失败',
|
|
|
|
- icon: 'success'
|
|
|
|
- });
|
|
|
|
- return false
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },500)
|
|
|
|
|
|
+ debounce(
|
|
|
|
+ this.jzAdd(data)
|
|
|
|
+ ,500)
|
|
|
|
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ jzAdd(data){
|
|
|
|
+ let req = {
|
|
|
|
+ kcIds: [data.kcId],
|
|
|
|
+ id: this.id
|
|
|
|
+ }
|
|
|
|
+ jiazhengKcAdd(req).then(res => {
|
|
|
|
+ if (res.code == 0) {
|
|
|
|
+ this.getList()
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '添加成功',
|
|
|
|
+ icon: 'success'
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '添加失败',
|
|
|
|
+ icon: 'success'
|
|
|
|
+ });
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
deleteQuerenBtn() {
|
|
deleteQuerenBtn() {
|
|
let req = {
|
|
let req = {
|
|
- kcId: this.kcId,
|
|
|
|
|
|
+ kcIds: this.kcId,
|
|
id: this.id
|
|
id: this.id
|
|
}
|
|
}
|
|
jiazhengKcDelete(req).then(res => {
|
|
jiazhengKcDelete(req).then(res => {
|