| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245 |
- <template>
- <el-row class="el-row-container" v-loading="loading">
- <el-col
- :span="24"
- style="padding: 16px; height: 100%"
- >
- <el-card style="height: 100%; overflow-y: auto">
- <el-col :span="24" class="elrow-main__col-top">
- <div>
- <el-select
- placeholder="行政区域(全国)"
- >
- </el-select>
- <el-select
- style="margin:0 20px"
- placeholder="全部"
- >
- </el-select>
- <el-button
- type="primary"
- size="small"
- @click="handleSearch"
- >查询</el-button
- >
- </div>
- <!-- <div class="top-left">
- <el-button
- type="primary"
- size="small"
- @click="addAssociation"
- >新增
- </el-button
- ></div> -->
- </el-col>
- <el-col :span="24" class="elrow-main__col-bottom">
- <img v-if="imgUrl" :src="imgUrl" />
- <b-table
- ref="tableRef"
- :args="{ 'highlight-current-row': true }"
- :data="loadData"
- :columns="columns"
- isShowIndex
- :showPagination="loadData.length"
- >
- <template #styleImg="scope">
- <el-image
- :src="scope.row.imgPreview"
- :preview-src-list="[scope.row.imgPreview]"
- slot="error"
- class="image-slot"
- style="width: 100px; height: 50px"
- >
- <div slot="error" class="image-slot"></div>
- </el-image>
- </template>
- <template #codeNo="scope">
- <el-link
- type="primary"
- :underline="false"
- @click="goDetail(scope.row)"
- >{{ scope.row.traceCodeApplyConcat }}</el-link
- >
- </template>
- <template #useNumber="scope">
- {{ scope.row.useNumber + '/' + scope.row.totalNumber }}
- </template>
- <template #finishGoodName="scope">
- {{ scope.row.finishGoodName&&scope.row.finishgoodNo?scope.row.finishGoodName + '-' + scope.row.finishgoodNo:'' }}
- </template>
- <template #operate="scope">
- <el-link
- size="small"
- :underline="false"
- type="primary"
- style="margin-right: 10px"
- @click="editAssociation(scope.row)"
- >修改</el-link
- >
- <el-link
- size="small"
- :underline="false"
- type="danger"
- style="margin-right: 10px"
- @click="download(scope.row)"
- >删除</el-link
- >
- </template>
- </b-table>
- </el-col>
- </el-card>
- </el-col>
- <set-annual-water-right :visible.sync="associationManageShow"/>
- </el-row>
- </template>
- <script>
- import BTable from '@/components/Table/index.vue';
- import { assign, omit } from 'lodash-es';
- import setAnnualWaterRight from './components/setAnnualWaterRight.vue'
- export default {
- name: 'waterElectricityPriceSetting',
- components: { BTable,setAnnualWaterRight },
- data() {
- return {
- dateValue:"",
- imgUrl: '',
- baseImageUrl: process.env.VUE_APP_BASE_RESOURCE_PREFIX,
- form: {
- productName: ''
- },
- loading: false,
- associationManageShow: false,
- columns: [
- {
- label: '行政区',
- prop: 'person',
- customRender: '',
- align: 'center'
- },
- {
- label: '是否阶梯水价',
- prop: 'area',
- customRender: '',
- align: 'center'
- },
- {
- label: '水价名称',
- prop: 'name',
- customRender: '',
- align: 'center'
- },
- {
- label: '水量(吨)',
- prop: 'phone',
- customRender: '',
- align: 'center'
- },{
- label: '水价(元/吨)',
- prop: 'phone',
- customRender: '',
- align: 'center'
- },{
- label: '是否阶梯电价',
- prop: 'phone',
- customRender: '',
- align: 'center'
- },{
- label: '电价名称',
- prop: 'phone',
- customRender: '',
- align: 'center'
- },{
- label: '电量(度)',
- prop: 'phone',
- customRender: '',
- align: 'center'
- },{
- label: '电价(元/度)',
- prop: 'phone',
- customRender: '',
- align: 'center'
- },
- {
- label: '操作',
- customRender: 'operate',
- align: 'center'
- }
- ]
- };
- },
- created() {},
- methods: {
- editAssociation() {
- this.associationManageShow = true
- },
- loadData(parameter) {
- const queryform = this.form;
- const payload = omit(assign({}, parameter, queryform, {orderByColumn:'tarcecodeapplyCreateddate',isAsc:'desc'}), []);
- return this.getTableData(payload);
- },
- getTableData(payload) {
- return Promise.resolve({
- data: [{
- person:"王大虎",
- area: '2016-05-02',
- name: '王小虎',
- phone: 1588888888,
- address: '上海市普陀区金沙江路 1518 弄'
- }, {
- person:"王大虎",
- area: '2016-05-04',
- name: '王小虎',
- phone: 1588888888,
- address: '上海市普陀区金沙江路 1517 弄'
- }, {
- person:"王大虎",
- area: '2016-05-01',
- name: '王小虎',
- phone: 1588888888,
- address: '上海市普陀区金沙江路 1519 弄'
- }, {
- person:"王大虎",
- area: '2016-05-03',
- name: '王小虎',
- phone: 1588888888,
- address: '上海市普陀区金沙江路 1516 弄'
- }]
- })
- },
- handleSearch() {
- this.$refs.tableRef.refresh(true);
- },
- goDetail(row) {
- this.$refs.sourceCodeDetail.open(row.tarcecodeapplyBatchno)
- },
- download(row) {
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .el-row-container{
- height: 100%;
- }
- .elrow-main__col-top {
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-bottom: 15px;
- .top-left {
- height: 100%;
- display: flex;
- align-items: center;
- i {
- background-color: #40d5ec;
- height: 45%;
- width: 5px;
- margin-right: 5px;
- }
- }
- }
- </style>
|