积分规则
This commit is contained in:
		| @@ -22,11 +22,11 @@ | ||||
|               <span>{{ row.integral > 0 ? "+" : "" }}{{ row.integral }}</span> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
|           <el-table-column slot="options" label="操作" align="center" fixed="right" width="200"> | ||||
|           <el-table-column slot="options" label="操作" align="center" fixed="right" width="100"> | ||||
|             <template slot-scope="{ row }"> | ||||
|               <div class="table-options"> | ||||
|                 <el-button type="text" @click="changeStatus(row.id)" v-if="row.status == 1">停用</el-button> | ||||
|                 <el-button type="text" @click="changeStatus(row.id)" v-else>启用</el-button> | ||||
|                 <el-button type="text" @click="changeStatus(row.id, row.status)" v-if="row.status == 1">停用</el-button> | ||||
|                 <el-button type="text" @click="changeStatus(row.id, row.status)" v-else>启用</el-button> | ||||
|               </div> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
| @@ -70,38 +70,18 @@ export default { | ||||
|       }, | ||||
|       page: {current: 1, size: 10, total: 0}, | ||||
|       colConfigs: [ | ||||
|         { | ||||
|           prop: "type", | ||||
|           label: "类型", | ||||
|           dict: "srType", | ||||
|         }, | ||||
|         {prop: "category", label: "事件", dict: "srCategory"}, | ||||
|         {prop: "score", label: "规则"}, | ||||
|         { | ||||
|           prop: "cycle", | ||||
|           label: "周期范围", | ||||
|           dict: "srCycle", | ||||
|         }, | ||||
|         // {slot: "integral", label: "积分分值", align: "center"}, | ||||
|         // { | ||||
|         //   prop: "validRangeType", | ||||
|         //   label: "有效范围", | ||||
|         //   formart: (v) => (v == 0 ? "全局" : "指定网格"), | ||||
|         // }, | ||||
|         { | ||||
|           prop: "status", | ||||
|           label: "状态", | ||||
|           align: "center", | ||||
|           width: 96, | ||||
|           dict: "srStatus", | ||||
|         }, | ||||
|         {slot: "options", label: "操作", align: "center"}, | ||||
|         {prop: "type", label: "类型", dict: "srType", width: 220}, | ||||
|         {prop: "category", label: "事件", dict: "srCategory", align: "center", width: 200}, | ||||
|         {prop: "remark", label: "规则"}, | ||||
|         {prop: "cycle", label: "周期范围", dict: "srCycle", align: "center", width: 100}, | ||||
|         {prop: "status", label: "状态", align: "center", width: 100, dict: "srStatus",}, | ||||
|         {slot: "options", label: "操作", align: "center", width: 100}, | ||||
|       ], | ||||
|       tableData: [], | ||||
|     }; | ||||
|   }, | ||||
|   created() { | ||||
|     this.$dict.load('srStatus', 'srCategory', 'srType').then(() => { | ||||
|     this.$dict.load('srStatus', 'srCategory', 'srType', 'srCycle').then(() => { | ||||
|       this.getList(); | ||||
|     }); | ||||
|   }, | ||||
| @@ -122,7 +102,7 @@ export default { | ||||
|       }); | ||||
|     }, | ||||
|     changeStatus(id, status) { | ||||
|       let text = status == 1 ? "启用" : "停用"; | ||||
|       let text = status == 1 ? "停用" : "启用" | ||||
|       this.$confirm(`确定${text}该条规则?`).then(() => { | ||||
|         this.instance.post(`/app/appscorerule/enable?id=${id}`).then((res) => { | ||||
|           if (res.code == 0) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user