From 90bc8df34f290907a3ee01d05a9df5ca62b2cacc Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期三, 05 七月 2023 17:47:39 +0800
Subject: [PATCH] 修改列表展示
---
Source/UBCS-WEB/src/views/modeling/status.vue | 106 +++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 78 insertions(+), 28 deletions(-)
diff --git a/Source/UBCS-WEB/src/views/modeling/status.vue b/Source/UBCS-WEB/src/views/modeling/status.vue
index b6fac49..63e257a 100644
--- a/Source/UBCS-WEB/src/views/modeling/status.vue
+++ b/Source/UBCS-WEB/src/views/modeling/status.vue
@@ -11,36 +11,41 @@
@row-del="rowDel"
@refresh-change="refreshChange"
@search-reset="searchChange"
- @search-change="searchChange">
+ @search-change="searchChange"
+ @row-click="rowClick">
<template slot="menuLeft">
- <el-tooltip class="item" effect="dark" content="鏌ユ壘鐘舵�佹睜浣跨敤鑼冨洿" placement="top">
+ <el-tooltip class="item" effect="dark" content="鏌ユ壘鐘舵�佷娇鐢ㄨ寖鍥�" placement="top">
<el-button size="small"
plain
type="primary"
icon="el-icon-zoom-in"
- @click="handleSearch">鏌ョ湅浣跨敤鑼冨洿
+ @click="applyRangeSearch">鏌ョ湅浣跨敤鑼冨洿
</el-button>
</el-tooltip>
- </template>>
+ </template>
+ <template slot="radio"
+ slot-scope="{row}">
+ <el-radio v-model="selectRow"
+ :label="row.$index">
+ </el-radio>
+ </template>
</avue-crud>
- <el-dialog title="鏌ョ湅浣跨敤鑼冨洿"
- append-to-body
- :visible.sync="packageSearchBox"
- width="1200px">
- <versionpackage></versionpackage>
- </el-dialog>
+ <versionpackage :rangeData="applyRangeData" ref="applyRange"></versionpackage>
</basic-container>
-
+
</template>
-
+
<script>
- import { getPage,add,update,remove } from '../../api/omd/status';
+ import { getPage,add,update,remove,getApplyRange } from '../../api/omd/status';
export default {
name: "status",
data(){
return {
//鏌ョ湅浣跨敤鑼冨洿
packageSearchBox:false,
+ // 鐐瑰嚮鏁版嵁
+ selectRow: '',
+ selectRowData: {},
//鍒嗛〉鏁版嵁
page: {
pageSize: 10,
@@ -56,29 +61,63 @@
border: true,
index: true,
searchMenuSpan:5,
+ highlightCurrentRow: true,
+ stripe:true,
column:[
+ {
+ label: '閫夋嫨',
+ prop: 'radio',
+ width: 120,
+ display: false
+ },
{
label:'鑻辨枃鍚嶇О',
prop: 'id',
- search: true
+ search: true,
+ rules: [{
+ required: true,
+ message: '鑻辨枃鍚嶇О涓嶈兘涓虹┖',
+ trigger: 'blur'
+ }]
},
{
- label:"涓枃鍚嶇О",
- prop:"name",
+ label:'涓枃鍚嶇О',
+ prop:'name',
search:true,
+ rules: [{
+ required: true,
+ message: '涓枃鍚嶇О涓嶈兘涓虹┖',
+ trigger: 'blur'
+ }]
},
{
- label: "鎻忚堪",
- prop:"description",
- type:"textarea"
+ label: '鎻忚堪',
+ prop:'description',
+ type:'textarea'
}
]
- }
+ },
+ applyRangeData: []
}
},
methods:{
- handleSearch(){
- this.packageSearchBox=true
+ rowClick(row){
+ this.selectRow = row.$index;
+ this.selectRowData = row;
+ },
+ applyRangeSearch(){
+ if (!this.selectRow && this.selectRow != 0){
+ console.log(this.selectRow);
+ this.$message({
+ type:"warning",
+ message: "璇峰厛閫夋嫨灞炴��"
+ })
+ }
+ getApplyRange(this.selectRowData.id).then(res => {
+ this.applyRangeData = res.data.data;
+ this.$refs.applyRange.rangeData = this.applyRangeData;
+ this.$refs.applyRange.showDialog = true;
+ })
},
getList() {
this.loading = true;
@@ -121,10 +160,22 @@
})
},
searchChange(params, done) {
- if (done) done();
- this.params = params;
+ this.loading = true;
this.page.currentPage = 1;
- this.getList();
+ const p = {};
+ if(params.id){
+ p["id_like"] = params.id;
+ }
+ if(params.name){
+ p["name_like"] = params.name
+ }
+ getPage(this.page.currentPage,this.page.pageSize,p).then(res => {
+ const data = res.data.data
+ this.loading = false;
+ this.page.total = data.total;
+ this.data = data.records;
+ done();
+ })
this.$message.success('鎼滅储鎴愬姛')
},
refreshChange() {
@@ -134,8 +185,7 @@
}
}
</script>
-
+
<style scoped>
-
+
</style>
-
\ No newline at end of file
--
Gitblit v1.9.3