shish пре 2 година
родитељ
комит
bd4f53f45c
3 измењених фајлова са 16 додато и 1 уклоњено
  1. 7 0
      pt/src/service/pt-cp-class/index.js
  2. 8 0
      pt/src/views/cp/pt-cp-class.vue
  3. 1 1
      pt/src/views/cp/pt-list.vue

+ 7 - 0
pt/src/service/pt-cp-class/index.js

@@ -9,5 +9,12 @@ export class CpService extends BaseService {
 		});
 		});
 	}
 	}
 
 
+	delClass(data) {
+		return this.request({
+			url: '/del-class',
+			params: data
+		});
+	}
+
 }
 }
 export default new CpService();
 export default new CpService();

+ 8 - 0
pt/src/views/cp/pt-cp-class.vue

@@ -34,6 +34,7 @@
 
 
 			<template #slot-item-list="{scope}">
 			<template #slot-item-list="{scope}">
 				<el-button type="text" @click.native.stop="getCpList(scope.row)">名下产品</el-button>
 				<el-button type="text" @click.native.stop="getCpList(scope.row)">名下产品</el-button>
+				<el-button type="text" @click.native.stop="del(scope.row)">删除</el-button>
 			</template>
 			</template>
 		</x-crud>
 		</x-crud>
 	</div>
 	</div>
@@ -68,6 +69,13 @@ export default {
 		handleClick(tab, e) {
 		handleClick(tab, e) {
 			this.app.refresh({ type: this.tabIndex });
 			this.app.refresh({ type: this.tabIndex });
 		},
 		},
+		del(info){
+			this.$confirm('确认删除?', '提示', {confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning'}).then(() => {
+				this.$service.ptCpClass.delClass({id:info.id}).then(res=>{
+					this.app.refresh({ type: 0 })
+				})
+			})
+		},
 		getCpList(info) {
 		getCpList(info) {
 			let query = {classId:info.id,className:info.name}
 			let query = {classId:info.id,className:info.name}
 			this.$router.push({ path: '/cp/pt-list', query })
 			this.$router.push({ path: '/cp/pt-list', query })

+ 1 - 1
pt/src/views/cp/pt-list.vue

@@ -67,7 +67,7 @@
 
 
 			<template #table-column-delStatus="{scope}">
 			<template #table-column-delStatus="{scope}">
 				<div v-if="scope.row.delStatus==0">
 				<div v-if="scope.row.delStatus==0">
-					<div v-if="scope.row.auth == 1" style="color:green;font-weight:bold;">已认证</div>
+					<div v-if="scope.row.auth == 1" style="color:green;font-weight:bold;"><i class="el-icon-success" size="medium" style="margin-right:2px;"></i>已认证</div>
 				</div>
 				</div>
 				<div v-else style="color:red;font-weight:bold;">已删除</div>
 				<div v-else style="color:red;font-weight:bold;">已删除</div>
 			</template>
 			</template>