|
@@ -30,7 +30,7 @@
|
|
|
style="margin-left: 16px;"
|
|
style="margin-left: 16px;"
|
|
|
type="primary"
|
|
type="primary"
|
|
|
size="small"
|
|
size="small"
|
|
|
- @click="handleSearch"
|
|
|
|
|
|
|
+ @click="getWaterrightList"
|
|
|
>查询</el-button
|
|
>查询</el-button
|
|
|
>
|
|
>
|
|
|
</div>
|
|
</div>
|
|
@@ -45,7 +45,7 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="24" class="elrow-main__col-bottom">
|
|
<el-col :span="24" class="elrow-main__col-bottom">
|
|
|
<!-- -->
|
|
<!-- -->
|
|
|
- <b-table
|
|
|
|
|
|
|
+ <!-- <b-table
|
|
|
ref="tableRef"
|
|
ref="tableRef"
|
|
|
:args="{ 'highlight-current-row': true }"
|
|
:args="{ 'highlight-current-row': true }"
|
|
|
:data="tableData"
|
|
:data="tableData"
|
|
@@ -60,19 +60,51 @@
|
|
|
>修改</el-link
|
|
>修改</el-link
|
|
|
>
|
|
>
|
|
|
</template>
|
|
</template>
|
|
|
- </b-table>
|
|
|
|
|
|
|
+ </b-table> -->
|
|
|
|
|
+ <el-table
|
|
|
|
|
+ ref="tableRef"
|
|
|
|
|
+ :args="{ 'highlight-current-row': true }"
|
|
|
|
|
+ :data="tableData"
|
|
|
|
|
+ row-key="id"
|
|
|
|
|
+ :columns="columns"
|
|
|
|
|
+ isShowIndex
|
|
|
|
|
+ :tree-props="{children: 'children',hasChildren: 'hasChildren'}"
|
|
|
|
|
+ :header-row-style="{ background: '#E5EEED' }"
|
|
|
|
|
+ :header-cell-style="{ background: '#E5EEED' }"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ v-for="item in columns"
|
|
|
|
|
+ :key="item.id"
|
|
|
|
|
+ :prop="item.prop"
|
|
|
|
|
+ :label="item.label"
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="操作">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <el-link
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ :underline="false"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ style="margin-right: 10px"
|
|
|
|
|
+ @click="handlerRecompose(scope.row)"
|
|
|
|
|
+ >修改</el-link
|
|
|
|
|
+ >
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ </el-table>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-card>
|
|
</el-card>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<set-annual-water-right :visible.sync="associationManageShow"/>
|
|
<set-annual-water-right :visible.sync="associationManageShow"/>
|
|
|
- <recompose :visible.sync="recomposeShow"/>
|
|
|
|
|
- <water-price-setting :visible.sync="waterprice" @refresh="handleSearch"/>
|
|
|
|
|
|
|
+ <recompose :visible.sync="recomposeShow" :editRow="editRow" @resetEdit="resetEdit"/>
|
|
|
|
|
+ <water-price-setting :visible.sync="waterprice" @refresh="getWaterrightList"/>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import { getTree } from '@/api/tree.js'
|
|
import { getTree } from '@/api/tree.js'
|
|
|
-import { getWaterrightList,addWaterright,editWaterright,getWaterrightUpareaInfo } from '@/api/waterright/index.js'
|
|
|
|
|
|
|
+import { getWaterrightList,editWaterright,getWaterrightUpareaInfo } from '@/api/waterright/index.js'
|
|
|
import SelectTree from '@/components/SelectTree';
|
|
import SelectTree from '@/components/SelectTree';
|
|
|
import BTable from '@/components/Table/index.vue';
|
|
import BTable from '@/components/Table/index.vue';
|
|
|
import setAnnualWaterRight from './components/setAnnualWaterRight.vue'
|
|
import setAnnualWaterRight from './components/setAnnualWaterRight.vue'
|
|
@@ -90,10 +122,6 @@ export default {
|
|
|
},
|
|
},
|
|
|
options:[
|
|
options:[
|
|
|
{
|
|
{
|
|
|
- value: '',
|
|
|
|
|
- label: '全部'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
value: '2023',
|
|
value: '2023',
|
|
|
label: '2023'
|
|
label: '2023'
|
|
|
}, {
|
|
}, {
|
|
@@ -116,19 +144,14 @@ export default {
|
|
|
associationManageShow: false,
|
|
associationManageShow: false,
|
|
|
waterprice: false,
|
|
waterprice: false,
|
|
|
cusareaName:'',
|
|
cusareaName:'',
|
|
|
- waterrightYear: '',
|
|
|
|
|
|
|
+ waterrightYear: '2023',
|
|
|
areaId:'',
|
|
areaId:'',
|
|
|
|
|
+ editRow: {},
|
|
|
columns: [
|
|
columns: [
|
|
|
{
|
|
{
|
|
|
- label: '年度',
|
|
|
|
|
- prop: 'waterrightYear',
|
|
|
|
|
- customRender: '',
|
|
|
|
|
- align: 'center'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
label: '行政区',
|
|
label: '行政区',
|
|
|
prop: 'cusareaName',
|
|
prop: 'cusareaName',
|
|
|
- customRender: '',
|
|
|
|
|
|
|
+ customRender: 'cusareaName',
|
|
|
align: 'center'
|
|
align: 'center'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -147,31 +170,33 @@ export default {
|
|
|
prop: 'phone',
|
|
prop: 'phone',
|
|
|
customRender: 'Permuarea',
|
|
customRender: 'Permuarea',
|
|
|
align: 'center'
|
|
align: 'center'
|
|
|
- },{
|
|
|
|
|
- label: '操作',
|
|
|
|
|
- customRender: 'operate',
|
|
|
|
|
- width: 200,
|
|
|
|
|
- align: 'center'
|
|
|
|
|
}
|
|
}
|
|
|
],
|
|
],
|
|
|
|
|
+ tableData: []
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
|
|
+ mounted() {
|
|
|
|
|
+ this.getWaterrightList()
|
|
|
|
|
+ },
|
|
|
methods: {
|
|
methods: {
|
|
|
- async tableData() {
|
|
|
|
|
|
|
+ resetEdit() {
|
|
|
|
|
+ this.editRow = {}
|
|
|
|
|
+ },
|
|
|
|
|
+ async getWaterrightList() {
|
|
|
if(!this.areaId) {
|
|
if(!this.areaId) {
|
|
|
const res = await getTree()
|
|
const res = await getTree()
|
|
|
this.treeData = res?.data
|
|
this.treeData = res?.data
|
|
|
this.cusareaName ||= this.treeData[0].cusareaName
|
|
this.cusareaName ||= this.treeData[0].cusareaName
|
|
|
this.areaId = this.treeData[0].cusareaId
|
|
this.areaId = this.treeData[0].cusareaId
|
|
|
}
|
|
}
|
|
|
- return this.getWaterrightListHandler()
|
|
|
|
|
|
|
+ this.getWaterrightListHandler()
|
|
|
},
|
|
},
|
|
|
- getWaterrightListHandler() {
|
|
|
|
|
- return getWaterrightList({
|
|
|
|
|
|
|
+ async getWaterrightListHandler() {
|
|
|
|
|
+ const res = await getWaterrightList({
|
|
|
areaId: this.areaId,
|
|
areaId: this.areaId,
|
|
|
waterrightYear: this.waterrightYear
|
|
waterrightYear: this.waterrightYear
|
|
|
})
|
|
})
|
|
|
|
|
+ this.tableData = res?.data
|
|
|
},
|
|
},
|
|
|
handlerClick(value) {
|
|
handlerClick(value) {
|
|
|
this.areaId = value?.cusareaId
|
|
this.areaId = value?.cusareaId
|
|
@@ -187,11 +212,9 @@ export default {
|
|
|
getTableData(payload) {
|
|
getTableData(payload) {
|
|
|
return {}
|
|
return {}
|
|
|
},
|
|
},
|
|
|
- handleSearch() {
|
|
|
|
|
- this.$refs.tableRef.refresh(true);
|
|
|
|
|
-
|
|
|
|
|
- },
|
|
|
|
|
- handlerRecompose() {
|
|
|
|
|
|
|
+ handlerRecompose(row) {
|
|
|
|
|
+ console.log(row,'rowrworowo')
|
|
|
|
|
+ this.editRow = row
|
|
|
this.recomposeShow = true
|
|
this.recomposeShow = true
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|