|
@@ -1,1005 +0,0 @@
|
|
|
-<template xmlns:v-model="http://www.w3.org/1999/xhtml">
|
|
|
- <div id="districHotline">
|
|
|
- <div id="districHotline-top">
|
|
|
- <div class="div-container">
|
|
|
- <el-form ref="form" :model="form" label-position="left" label-width="120px">
|
|
|
- <el-row class="el-row">
|
|
|
- <div class="el-row-3-left">
|
|
|
- <el-form-item label="显示本模块" class="el-form-item">
|
|
|
- <span>:</span>
|
|
|
- <span v-if="form.isDisplay==0"> 是 </span>
|
|
|
- <span v-else> 否 </span>
|
|
|
- <el-switch
|
|
|
- v-model="form.isDisplay"
|
|
|
- :active-value="0"
|
|
|
- :inactive-value="1"
|
|
|
- active-color="#13ce66"
|
|
|
- inactive-color="#cdcdcd"
|
|
|
- >
|
|
|
- </el-switch>
|
|
|
- </el-form-item>
|
|
|
- </div>
|
|
|
- <div class="el-row-3-right">
|
|
|
- <div class="container-button">
|
|
|
- <el-button @click="preview" style="width:100px">预览</el-button>
|
|
|
- <el-button type="primary" @click="confirm ">确认设置</el-button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-row>
|
|
|
- <!--<el-row>-->
|
|
|
- <!--<div class="el-row-3-left">-->
|
|
|
- <!--<el-form-item label="数据显示形式" class="el-form-item" style="">-->
|
|
|
- <!--<span>: </span>-->
|
|
|
- <!--<el-radio-group v-model="form.dataShowType">-->
|
|
|
- <!--<el-radio :label="1">数量</el-radio>-->
|
|
|
- <!--<el-radio :label="0">百分比</el-radio>-->
|
|
|
- <!--</el-radio-group>-->
|
|
|
- <!--</el-form-item>-->
|
|
|
- <!--</div>-->
|
|
|
- <!---->
|
|
|
- <!--</el-row>-->
|
|
|
- <!--<el-row>-->
|
|
|
- <!--<div class="el-row-3-left">-->
|
|
|
- <!--<el-form-item label="大屏显示时间" class="el-form-item" style="display: inline-block; ">-->
|
|
|
- <!--<span>: </span>-->
|
|
|
-
|
|
|
- <!--<el-radio-group v-model="form.dateType" @change="showTime" style="">-->
|
|
|
- <!--<el-radio-button style="border-radius:0" :label="0">今天</el-radio-button>-->
|
|
|
- <!--<el-radio-button :label="1">本月</el-radio-button>-->
|
|
|
- <!--<el-radio-button :label="2">本季度</el-radio-button>-->
|
|
|
- <!--<el-radio-button :label="3">本年</el-radio-button>-->
|
|
|
- <!--</el-radio-group>-->
|
|
|
- <!--</el-form-item>-->
|
|
|
- <!--<div class="displayTime" style="width: 180px;" >-->
|
|
|
- <!--{{ form.displayTime }}-->
|
|
|
- <!--</div>-->
|
|
|
- <!--</div>-->
|
|
|
- <!--<div class="el-row-3-right">-->
|
|
|
- <!--<div class="container-button">-->
|
|
|
- <!--<el-button @click="preview" style="width:100px">预览</el-button>-->
|
|
|
- <!--<el-button type="primary" @click="confirm ">确认设置</el-button>-->
|
|
|
- <!--</div>-->
|
|
|
- <!--</div>-->
|
|
|
- <!--</el-row>-->
|
|
|
- </el-form>
|
|
|
- </div>
|
|
|
-
|
|
|
- </div>
|
|
|
- <br/>
|
|
|
- <div id="districHotline-main">
|
|
|
- <div class="div-container">
|
|
|
- <div style="padding-top: 1px;margin-right: 1%">
|
|
|
- <el-form :inline="true" ref="tableForm" :model="tableForm" label-width="100px">
|
|
|
- <el-form-item label="表格时间选择">
|
|
|
- <span>: </span>
|
|
|
- <el-radio-group v-model="tableForm.choice">
|
|
|
- <el-radio :label="1">快捷选择</el-radio>
|
|
|
- <el-radio :label="2">某时间</el-radio>
|
|
|
- <el-radio :label="3">某时间段</el-radio>
|
|
|
- </el-radio-group>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- <!--快捷选择部分-->
|
|
|
- <el-form-item style=" " v-show="tableForm.choice=='1'">
|
|
|
- <el-select v-model="tableForm.fastSelect" @change="showFastTime" style="width: 150px;">
|
|
|
- <el-option v-for="item in options"
|
|
|
- :label="item.text"
|
|
|
- :key="item.value"
|
|
|
- :value="item.value"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- <div class="displayTime" style=" top: 0px; width: 169px; margin-left:5px">
|
|
|
- {{ tableForm.time }}
|
|
|
- </div>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- <!--某时间-->
|
|
|
- <el-form-item v-show="tableForm.choice == '2'" style=" ">
|
|
|
-
|
|
|
- <el-select v-model="tableForm.someTimeSelect" style=" width: 140px; ">
|
|
|
- <el-option v-for="item in somtTimesOpt"
|
|
|
- :label="item.text"
|
|
|
- :key="item.value"
|
|
|
- :value="item.value"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
-
|
|
|
- <el-date-picker style=" margin-left: 10px;width: 180px;"
|
|
|
- v-show="tableForm.someTimeSelect === 0"
|
|
|
- v-model="tableForm.chooseDayTime"
|
|
|
- type="date"
|
|
|
- placeholder="请选择日期"
|
|
|
- format="yyyy/MM/dd"
|
|
|
- value-format="yyyy/MM/dd"
|
|
|
- :picker-options="chooseDatePicker">
|
|
|
- </el-date-picker>
|
|
|
-
|
|
|
- <el-date-picker style=" margin-left: 10px;width: 180px;"
|
|
|
- v-show="tableForm.someTimeSelect === 1"
|
|
|
- v-model="tableForm.chooseMonthTime"
|
|
|
- type="month"
|
|
|
- placeholder="选择月"
|
|
|
- value-format="yyyy/MM/dd"
|
|
|
- :picker-options="chooseDatePicker">
|
|
|
- </el-date-picker>
|
|
|
-
|
|
|
- <el-date-picker style=" margin-left: 10px;width: 180px;"
|
|
|
- v-show="tableForm.someTimeSelect === 3"
|
|
|
- v-model="tableForm.chooseYearTime"
|
|
|
- type="year"
|
|
|
- placeholder="选择年"
|
|
|
- value-format="yyyy/MM/dd"
|
|
|
- :picker-options="chooseDatePicker">
|
|
|
- </el-date-picker>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- <!--某段时间-->
|
|
|
- <el-form-item v-show="tableForm.choice=='3'" style=" ">
|
|
|
- <el-date-picker style="margin-left: 10px;width: 180px;"
|
|
|
- v-model="tableForm.startTime"
|
|
|
- type="date"
|
|
|
- placeholder="开始时间"
|
|
|
- format="yyyy/MM/dd"
|
|
|
- value-format="yyyy/MM/dd"
|
|
|
- :picker-options="startDatePicker">
|
|
|
- </el-date-picker>
|
|
|
- <el-date-picker style="margin-left: 6px;width: 180px;"
|
|
|
- v-model="tableForm.endTime"
|
|
|
- type="date"
|
|
|
- placeholder="结束时间"
|
|
|
- format="yyyy/MM/dd"
|
|
|
- value-format="yyyy/MM/dd"
|
|
|
- :picker-options="endDatePicker">
|
|
|
- </el-date-picker>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- <el-form-item style="margin-left: 10px;width: 180px;">
|
|
|
- <el-select v-model="tableForm.distric" style=" width: 140px; ">
|
|
|
- <el-option v-for="item in districOpt"
|
|
|
- :label="item.text"
|
|
|
- :key="item.value"
|
|
|
- :value="item.value"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <!--<el-form-item v-show="tableForm.distric === 0" style="margin-left: 10px;width: 180px;">-->
|
|
|
- <!--<el-select v-model="tableForm.districType" style=" width: 140px; ">-->
|
|
|
- <!--<el-option v-for="item in districTypeOpt"-->
|
|
|
- <!--:label="item.text"-->
|
|
|
- <!--:key="item.value"-->
|
|
|
- <!--:value="item.value"-->
|
|
|
- <!-->-->
|
|
|
- <!--</el-option>-->
|
|
|
- <!--</el-select>-->
|
|
|
- <!--</el-form-item>-->
|
|
|
-
|
|
|
- <el-form-item style=" float: right;">
|
|
|
- <el-button type="primary" @click="confirmTime ">确认时间</el-button>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- </el-form>
|
|
|
-
|
|
|
- </div>
|
|
|
-
|
|
|
- <div style=" padding-top: 15px;">
|
|
|
- <!--表格部分-->
|
|
|
- <el-card style=" width: 97.7%;margin-left: 1%;">
|
|
|
- <el-table
|
|
|
- :data="tableData"
|
|
|
- style="width: 100%;padding-left: 20px"
|
|
|
- :row-style="tableRowClassName"
|
|
|
- :default-sort="{prop: 'districtHandleTreatedAmount', order: 'descending'}"
|
|
|
- :header-cell-style="{color:'#333333'}"
|
|
|
- >
|
|
|
- <el-table-column
|
|
|
- prop="districtHandleType"
|
|
|
- label="类别"
|
|
|
- align="left"
|
|
|
- width="189">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="districtHandleTreatedAmount"
|
|
|
- label="已办理数量"
|
|
|
- align="center"
|
|
|
- sortable>
|
|
|
-
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="districtHandleTreatedIncrement"
|
|
|
- label="已办理调整"
|
|
|
- align="center"
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- <span v-if="scope.row.districtHandleTreatedIncrement > 0" style="color: #f65e6e;">+{{scope.row.districtHandleTreatedIncrement}}
|
|
|
- <img style=" margin-top: 2px;margin-left: 5px;position: absolute; right:20%;" src="../../../../assets/images/edit.png"
|
|
|
- @click="showTreatedChange(scope.row.districtHandleTreatedAmount,scope.row.districtHandleUntreatedAmount,scope.row.districtHandleTreatedIncrement,scope.row.districtHandleUntreatedIncrement,scope.row.districtHandleId,0)"></span>
|
|
|
- <span v-else style="color: #3448a1;">{{scope.row.districtHandleTreatedIncrement}}
|
|
|
- <img style="margin-top: 2px;margin-left: 5px;position: absolute; right:20%;" src="../../../../assets/images/edit.png"
|
|
|
- @click="showTreatedChange(scope.row.districtHandleTreatedAmount,scope.row.districtHandleUntreatedAmount,scope.row.districtHandleTreatedIncrement,scope.row.districtHandleUntreatedIncrement,scope.row.districtHandleId,0)"
|
|
|
- ></span>
|
|
|
- </template>
|
|
|
-
|
|
|
- <!--<template slot-scope="scope">-->
|
|
|
- <!--<!–<div v-if="scope.row.districtHandleTreatedIncrement >0" style="display: table-cell; color: #ea4353">–>-->
|
|
|
- <!--<span v-if="scope.row.districtHandleTreatedIncrement >0" style=" color: #ea4353">+{{ scope.row.districtHandleTreatedIncrement }} </span>-->
|
|
|
- <!--<!–</div>–>-->
|
|
|
- <!--<!–<div v-else style="display: table-cell; color: deepskyblue">–>-->
|
|
|
- <!--<span v-else style="color: deepskyblue">{{ scope.row.districtHandleTreatedIncrement }} </span>-->
|
|
|
- <!--<!–</div>–>-->
|
|
|
-
|
|
|
- <!--<!–<div style="display: table-cell;">–>-->
|
|
|
- <!--<img style="" src="../../../../assets/images/edit.png"-->
|
|
|
- <!--@click="showTreatedChange(scope.row.districtHandleTreatedAmount,scope.row.districtHandleUntreatedAmount,scope.row.districtHandleTreatedIncrement,scope.row.districtHandleUntreatedIncrement,scope.row.districtHandleId,0)">-->
|
|
|
- <!--<!–</div>–>-->
|
|
|
- <!--</template>-->
|
|
|
-
|
|
|
-
|
|
|
- <!--<template slot-scope="scope">-->
|
|
|
- <!--<span v-if="scope.row.districtHandleTreatedIncrement > 0" style="color: #f65e6e"><span style="width: 55%;text-align: right;float: left;display: inline">+{{scope.row.districtHandleTreatedIncrement}}</span>-->
|
|
|
- <!--<img style="margin-left: -50px" src="../../../../assets/images/edit.png" @click="showTreatedChange(scope.row.districtHandleTreatedAmount,scope.row.districtHandleUntreatedAmount,scope.row.districtHandleTreatedIncrement,scope.row.districtHandleUntreatedIncrement,scope.row.districtHandleId,0)" ></span>-->
|
|
|
- <!--<span v-else style="color: #3448a1"><span style="width: 55%;text-align: right;float: left;display: inline">{{scope.row.districtHandleTreatedIncrement}}</span>-->
|
|
|
- <!--<img style="margin-left: -50px" src="../../../../assets/images/edit.png" @click="showTreatedChange(scope.row.districtHandleTreatedAmount,scope.row.districtHandleUntreatedAmount,scope.row.districtHandleTreatedIncrement,scope.row.districtHandleUntreatedIncrement,scope.row.districtHandleId,0)" ></span>-->
|
|
|
- <!--</template>-->
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="已办理占比"
|
|
|
- align="center"
|
|
|
- sortable>
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>{{scope.row.districtHandleRate}}%</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="districtHandleUntreatedAmount"
|
|
|
- label="待办理数量"
|
|
|
- align="center"
|
|
|
- sortable>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="districtHandleUntreatedIncrement"
|
|
|
- label="待办理调整"
|
|
|
- align="center">
|
|
|
-
|
|
|
- <template slot-scope="scope">
|
|
|
- <span v-if="scope.row.districtHandleUntreatedIncrement > 0" style="color: #f65e6e;">+{{scope.row.districtHandleUntreatedIncrement}}
|
|
|
- <img style=" margin-top: 2px;margin-left: 5px;position: absolute; right:20%;" src="../../../../assets/images/edit.png"
|
|
|
- @click="showTreatedChange(scope.row.districtHandleTreatedAmount,scope.row.districtHandleUntreatedAmount,scope.row.districtHandleTreatedIncrement,scope.row.districtHandleUntreatedIncrement,scope.row.districtHandleId,1)"></span>
|
|
|
- <span v-else style="color: #3448a1;">{{scope.row.districtHandleUntreatedIncrement}}
|
|
|
- <img style="margin-top: 2px;margin-left: 5px;position: absolute; right:20%;" src="../../../../assets/images/edit.png"
|
|
|
- @click="showTreatedChange(scope.row.districtHandleTreatedAmount,scope.row.districtHandleUntreatedAmount,scope.row.districtHandleTreatedIncrement,scope.row.districtHandleUntreatedIncrement,scope.row.districtHandleId,1)"
|
|
|
- ></span>
|
|
|
- </template>
|
|
|
-
|
|
|
-
|
|
|
- <!--<template slot-scope="scope">-->
|
|
|
- <!--<!–<div v-if="scope.row.districtHandleUntreatedIncrement >0" style="display: table-cell; color: #ea4353">–>-->
|
|
|
- <!--<span v-if="scope.row.districtHandleUntreatedIncrement >0" style="color: #ea4353">+{{ scope.row.districtHandleUntreatedIncrement }}</span>-->
|
|
|
- <!--<!–</div>–>-->
|
|
|
- <!--<!–<div v-else style="display: table-cell; color: deepskyblue">–>-->
|
|
|
- <!--<span v-else style=" color: deepskyblue">{{ scope.row.districtHandleUntreatedIncrement }}</span>-->
|
|
|
- <!--<!–</div>–>-->
|
|
|
-
|
|
|
- <!--<!–<div style="display: table-cell;">–>-->
|
|
|
- <!--<img style="" src="../../../../assets/images/edit.png"-->
|
|
|
- <!--@click="showTreatedChange(scope.row.districtHandleTreatedAmount,scope.row.districtHandleUntreatedAmount,scope.row.districtHandleTreatedIncrement,scope.row.districtHandleUntreatedIncrement,scope.row.districtHandleId,1)">-->
|
|
|
- <!--<!–</div>–>-->
|
|
|
- <!--</template>-->
|
|
|
-
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="待办理占比"
|
|
|
- align="center"
|
|
|
- sortable>
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>{{scope.row.districtHandleUntreatedRate}}%</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column
|
|
|
- prop="districtHandleTotalAmount"
|
|
|
- label="办理总数"
|
|
|
- align="center">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="是否显示"
|
|
|
- align="left"
|
|
|
- :formatter="formatter"
|
|
|
- >
|
|
|
-
|
|
|
- <template slot-scope="scope">
|
|
|
- <span v-if="scope.row.isDisplay==0">是</span>
|
|
|
- <span v-else>否</span>
|
|
|
- <el-switch
|
|
|
- v-model="scope.row.isDisplay"
|
|
|
- :active-value="0"
|
|
|
- :inactive-value="1"
|
|
|
- active-color="#13ce66"
|
|
|
- inactive-color="#cdcdcd"
|
|
|
- @change="changeSwitch(scope.row.districtHandleId,scope.row.isDisplay)">
|
|
|
- </el-switch>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </el-card>
|
|
|
- </div>
|
|
|
-
|
|
|
- </div>
|
|
|
-
|
|
|
- <el-dialog
|
|
|
- title="已办理数量调整"
|
|
|
- :visible.sync="showUpateNum"
|
|
|
- width="30%"
|
|
|
- >
|
|
|
- <div>
|
|
|
- <el-form ref="formInputData" :model="formInputData" label-width="80px">
|
|
|
- <el-form-item label="数量调整" prop="treatedamount"
|
|
|
- :rules="rule1"
|
|
|
- >
|
|
|
- <el-input v-model.number="formInputData.treatedamount" type="number"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- </div>
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="showUpateNum = false">取 消</el-button>
|
|
|
- <el-button type="primary" @click="updateAmount()">确 定</el-button>
|
|
|
- </span>
|
|
|
- </el-dialog>
|
|
|
-
|
|
|
-
|
|
|
- <el-dialog
|
|
|
- title="待办理数量调整"
|
|
|
- :visible.sync="showUpateNum1"
|
|
|
- width="30%"
|
|
|
- >
|
|
|
- <div>
|
|
|
- <el-form ref="formInputData" :model="formInputData" label-width="80px">
|
|
|
- <el-form-item label="数量调整" prop="untreatedAmount"
|
|
|
- :rules="rule2"
|
|
|
- >
|
|
|
- <el-input v-model.number="formInputData.untreatedAmount" type="number"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- </div>
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="showUpateNum1 = false">取 消</el-button>
|
|
|
- <el-button type="primary" @click="updateAmount1()">确 定</el-button>
|
|
|
- </span>
|
|
|
- </el-dialog>
|
|
|
-
|
|
|
-
|
|
|
- <!--预览大屏弹窗-->
|
|
|
- <el-dialog
|
|
|
- :visible.sync="screenDialogVisible"
|
|
|
- :fullscreen="true"
|
|
|
- :close-on-press-escape="true"
|
|
|
- >
|
|
|
- <screenIndex v-if="hackReset">
|
|
|
- </screenIndex>
|
|
|
- </el-dialog>
|
|
|
-
|
|
|
- </div>
|
|
|
- <div>
|
|
|
-
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-</template>
|
|
|
-
|
|
|
-<script>
|
|
|
- import {districHotline} from './districHotlineApi'
|
|
|
- import screenIndex from '../../screenIndex'
|
|
|
-
|
|
|
- export default {
|
|
|
- name: "index",
|
|
|
- data() {
|
|
|
- var checkChange1 = (rule, value, callback) => {
|
|
|
- if (value + this.formInputData.amount1 < 0) {
|
|
|
- return callback(new Error('数量调整数额不能小于' + -this.formInputData.amount1));
|
|
|
- }
|
|
|
- else {
|
|
|
- return callback();
|
|
|
- }
|
|
|
- };
|
|
|
- var checkChange2 = (rule, value, callback) => {
|
|
|
- if (value + this.formInputData.amount2 < 0) {
|
|
|
- return callback(new Error('数量调整数额不能小于' + -this.formInputData.amount2));
|
|
|
- }
|
|
|
- else {
|
|
|
- return callback();
|
|
|
- }
|
|
|
- };
|
|
|
- return {
|
|
|
- hackReset: false,
|
|
|
- screenDialogVisible: false,
|
|
|
- showUpateNum: false,
|
|
|
- showUpateNum1: false,
|
|
|
- formInputData: {
|
|
|
- treatedamount: 1,
|
|
|
- untreatedAmount: 0,
|
|
|
- treatedIncrementId: 0,
|
|
|
- amount1: 0,
|
|
|
- amount2: 0
|
|
|
- },
|
|
|
- isSuccess: false,
|
|
|
- form: {
|
|
|
- isDisplay: 0,
|
|
|
- dataShowType: 1,
|
|
|
- dateType: 3,
|
|
|
- displayTime: ""
|
|
|
- },
|
|
|
- tableFormData: [1, 2, 3],
|
|
|
- currentTime: {
|
|
|
- year: '',
|
|
|
- month: '',
|
|
|
- day: ''
|
|
|
- },
|
|
|
- tableForm: {
|
|
|
- choice: 1,
|
|
|
- fastSelect: 0, //快速时间选择
|
|
|
- someTimeSelect: 0, //某时间选择
|
|
|
- distric: 0, // 是否展示附属区县
|
|
|
- // districType: '巴州区',
|
|
|
- time: '',
|
|
|
- chooseDayTime: '',
|
|
|
- chooseMonthTime: '',
|
|
|
- chooseYearTime: '',
|
|
|
- startTime: '',
|
|
|
- endTime: '',
|
|
|
- },
|
|
|
- //快速时间选择下拉框
|
|
|
- options: [
|
|
|
- {value: 0, text: "今天"},
|
|
|
- {value: 1, text: "本月"},
|
|
|
- // {value: 2, text: "本季度"},
|
|
|
- {value: 3, text: "本年"}
|
|
|
- ],
|
|
|
- somtTimesOpt: [
|
|
|
- {value: 0, text: "某日"},
|
|
|
- {value: 1, text: "某月"},
|
|
|
- {value: 3, text: "某年"}
|
|
|
- ],
|
|
|
- districOpt: [
|
|
|
- {value: 1, text: "所有情况"},
|
|
|
- {value: 0, text: "六个区县"},
|
|
|
- ],
|
|
|
- // districTypeOpt: [
|
|
|
- // {value: "巴州区", text: "巴州区"},
|
|
|
- // {value: "恩阳区", text: "恩阳区"},
|
|
|
- // {value: "通江县", text: "通江县"},
|
|
|
- // {value: "南江县", text: "南江县"},
|
|
|
- // {value: "平昌县", text: "平昌县"},
|
|
|
- // {value: "经开区", text: "经开区"},
|
|
|
- // ],
|
|
|
-
|
|
|
- chooseDatePicker: this.beginDate(),
|
|
|
- startDatePicker: this.beginDate(),
|
|
|
- endDatePicker: this.processDate(),
|
|
|
- tableData: [],
|
|
|
- rule1: [{required: true, message: '请输入数量调整数额', trigger: 'blur'}
|
|
|
- ,
|
|
|
- {
|
|
|
- type: 'number', message: '输入必须为数字', trigger: 'blur'
|
|
|
- },
|
|
|
- {validator: checkChange1, trigger: 'blur'},
|
|
|
-
|
|
|
- ], rule2: [
|
|
|
- {required: true, message: '请输入数量调整数额', trigger: 'blur'}
|
|
|
- ,
|
|
|
- {
|
|
|
- type: 'number', message: '输入必须为数字', trigger: 'blur'
|
|
|
- },
|
|
|
- {validator: checkChange2, trigger: 'blur'},
|
|
|
- ]
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- components: {
|
|
|
- screenIndex
|
|
|
- },
|
|
|
- mounted() {
|
|
|
- //设置默认时间为今天
|
|
|
- this.getTime();
|
|
|
-
|
|
|
- //获取大屏设置信息
|
|
|
- this.getSetupInfo();
|
|
|
- },
|
|
|
- methods: {
|
|
|
- // /**获取表格数据*/
|
|
|
- // getDistricHotlineTableData: function () {
|
|
|
- // let param = {
|
|
|
- // dateType:0,
|
|
|
- // date:'2019-02-24'
|
|
|
- // }
|
|
|
- // districHotline.GetDistrictList(param).then((res) => {
|
|
|
- // // console.log(res.data.data);
|
|
|
- // this.tableData = res.data.data;
|
|
|
- // })
|
|
|
- // },
|
|
|
- /** 区县热线大屏设置信息获取*/
|
|
|
- getSetupInfo: function () {
|
|
|
- districHotline.GetDistrictSetupInformation().then((res) => {
|
|
|
- var data = res.data.data;
|
|
|
- this.form.dateType = data.dateType;
|
|
|
- this.form.isDisplay = data.isDisplay;
|
|
|
- this.form.dataShowType = data.dataShowType;
|
|
|
-
|
|
|
- //默认设置显示的时间
|
|
|
- this.showTime(this.form.dateType);
|
|
|
-
|
|
|
- //默认快速选择的数据
|
|
|
- // this.showFastTime(this.form.dateType)
|
|
|
- //默认表格显示的数据
|
|
|
- this.confirmTime();
|
|
|
- })
|
|
|
- },
|
|
|
- getPreviewData() {
|
|
|
- sessionStorage.setItem('HotlineDistricFile', JSON.stringify({
|
|
|
- dateType: this.form.dateType,
|
|
|
- isDisplay: this.form.isDisplay,
|
|
|
- dataShowType: this.form.dataShowType
|
|
|
- }))
|
|
|
-
|
|
|
- },
|
|
|
- //预览设置
|
|
|
- preview() {
|
|
|
- this.getPreviewData();
|
|
|
- this.screenDialogVisible = true;
|
|
|
- this.hackReset = false;
|
|
|
- this.$nextTick(() => {
|
|
|
- this.hackReset = true
|
|
|
- })
|
|
|
- }
|
|
|
- ,
|
|
|
- //确认设置
|
|
|
- confirm: function () {
|
|
|
- let param = {
|
|
|
- dateType: this.form.dateType,
|
|
|
- isDisplay: this.form.isDisplay,
|
|
|
- dataShowType: this.form.dataShowType
|
|
|
- }
|
|
|
- districHotline.EditDistrictSetting(param).then((res) => {
|
|
|
- this.isSuccess = res.data.data;
|
|
|
- if (res.data.data) {
|
|
|
- this.$message({
|
|
|
- message: '修改成功',
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.$message.error('修改失败');
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- //区域开关变化,提交
|
|
|
- changeSwitch: function (id, isDisplay) {
|
|
|
- let param = {
|
|
|
- districtHandleId: id,
|
|
|
- isDisplay: isDisplay
|
|
|
- }
|
|
|
- districHotline.ChangeDistrictStatus(param).then((res) => {
|
|
|
- var success = res.data.data;
|
|
|
-
|
|
|
- if (res.data.data) {
|
|
|
- this.$message({
|
|
|
- message: '修改成功',
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.$message.error('修改失败');
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- //选择大屏显示时间
|
|
|
- showTime: function (label) {
|
|
|
- //改变显示的时间的选项
|
|
|
- this.form.dateType = label;
|
|
|
-
|
|
|
- //改变表格快速选择时间
|
|
|
- this.tableForm.fastSelect = label;
|
|
|
-
|
|
|
- //保存显示的时间
|
|
|
- let time = "";
|
|
|
- switch (label) {
|
|
|
- //选择显示时间是今天
|
|
|
- case 0:
|
|
|
- time = this.getCurrentDay();
|
|
|
- break;
|
|
|
- //选择显示时间是本月
|
|
|
- case 1:
|
|
|
- time = this.getCurrentMonth();
|
|
|
- break;
|
|
|
- //选择显示时间是本季度
|
|
|
- case 2:
|
|
|
- time = this.getCurrentQuarter();
|
|
|
- break;
|
|
|
- case 3:
|
|
|
- time = this.getCurrentYear();
|
|
|
- }
|
|
|
- //显示时间
|
|
|
- this.form.displayTime = time;
|
|
|
-
|
|
|
- this.tableForm.time = time;
|
|
|
- },
|
|
|
- //获取显示的时间
|
|
|
- getTime: function () {
|
|
|
- var myDate = new Date();//获取系统当前时间
|
|
|
- this.currentTime.year = myDate.getFullYear(); //获取完整的年份
|
|
|
- this.currentTime.month = myDate.getMonth() + 1; //获取当前月份(0-11,0代表1月)
|
|
|
- this.currentTime.day = myDate.getDate(); //获取当前日(1-31)
|
|
|
-
|
|
|
- // let time = this.getCurrentDay();
|
|
|
- //大屏显示时间
|
|
|
- this.showTime(this.form.dateType);
|
|
|
- //表格显示时间
|
|
|
- // this.tableForm.time = time;
|
|
|
- },
|
|
|
- //获取今天的时间
|
|
|
- getCurrentDay: function () {
|
|
|
- let time = this.currentTime.year + "/0" + this.currentTime.month + "/" + this.currentTime.day;
|
|
|
- return time;
|
|
|
- },
|
|
|
- //获取本月的时间
|
|
|
- getCurrentMonth: function () {
|
|
|
- let time = this.currentTime.year + "/0" + this.currentTime.month;
|
|
|
- return time;
|
|
|
- },
|
|
|
- //获取本季度时间
|
|
|
- getCurrentQuarter: function () {
|
|
|
- //根据月份判断季度
|
|
|
- let month = this.currentTime.month;
|
|
|
- //第一季度
|
|
|
- if (month <= 3) {
|
|
|
- let startTime = this.currentTime.year + "/01/01";
|
|
|
- let endTime = this.currentTime.year + "/0" + this.currentTime.month + "/" + this.currentTime.day;
|
|
|
- return startTime + "-" + endTime;
|
|
|
- } else if (month <= 6) {//第二季度
|
|
|
- let startTime = this.currentTime.year + "/04/01";
|
|
|
- let endTime = this.currentTime.year + "/0" + this.currentTime.month + "/" + this.currentTime.day;
|
|
|
- return startTime + "-" + endTime;
|
|
|
- }
|
|
|
- else if (month <= 9) {//第三季度
|
|
|
- let startTime = this.currentTime.year + "/07/01";
|
|
|
- let endTime = this.currentTime.year + "/0" + this.currentTime.month + "/" + this.currentTime.day;
|
|
|
- return startTime + "-" + endTime;
|
|
|
- } else {//第四季度
|
|
|
- let startTime = this.currentTime.year + "/10/01";
|
|
|
- let endTime = this.currentTime.year + "/0" + this.currentTime.month + "/" + this.currentTime.day;
|
|
|
- return startTime + "-" + endTime;
|
|
|
- }
|
|
|
-
|
|
|
- },
|
|
|
- //获取本年
|
|
|
- getCurrentYear: function () {
|
|
|
- let time = this.currentTime.year;
|
|
|
- return time;
|
|
|
- },
|
|
|
- //快捷选择的时间显示
|
|
|
- showFastTime: function (value) {
|
|
|
- this.tableForm.fastSelect = value;
|
|
|
- switch (value) {
|
|
|
- //选择显示时间是今天
|
|
|
- case 0:
|
|
|
- this.tableForm.time = this.getCurrentDay();
|
|
|
- break;
|
|
|
- //选择显示时间是本月
|
|
|
- case 1:
|
|
|
- this.tableForm.time = this.getCurrentMonth();
|
|
|
- break;
|
|
|
- //选择显示时间是本季度
|
|
|
- case 2:
|
|
|
- this.tableForm.time = this.getCurrentQuarter();
|
|
|
- break;
|
|
|
- case 3:
|
|
|
- this.tableForm.time = this.getCurrentYear();
|
|
|
- }
|
|
|
- },
|
|
|
- //确认时间
|
|
|
- confirmTime: function () {
|
|
|
- //判断表格选择的时间类型
|
|
|
- //快速选择
|
|
|
- if (this.tableForm.choice === 1) {
|
|
|
- let param = {}
|
|
|
- if(this.tableForm.distric === 0) {
|
|
|
- param = {
|
|
|
- dateType: this.tableForm.fastSelect,
|
|
|
- date: this.getCurrentDay(),
|
|
|
- isFuzzy: 0,
|
|
|
- }
|
|
|
- } else {
|
|
|
- param = {
|
|
|
- dateType: this.tableForm.fastSelect,
|
|
|
- date: this.getCurrentDay(),
|
|
|
- isFuzzy: 1
|
|
|
- }
|
|
|
- }
|
|
|
- console.log(param);
|
|
|
-
|
|
|
- districHotline.GetDistrictList(param).then((res) => {
|
|
|
-
|
|
|
- this.tableData = res.data.data;
|
|
|
- console.log('区县table数据');
|
|
|
- console.log(this.tableData);
|
|
|
- })
|
|
|
-
|
|
|
- }
|
|
|
- //某时间
|
|
|
- else if (this.tableForm.choice == 2) {
|
|
|
-
|
|
|
-
|
|
|
- let datetime = '';
|
|
|
- switch (this.tableForm.someTimeSelect) {
|
|
|
- //选择某日
|
|
|
- case 0:
|
|
|
- datetime = this.tableForm.chooseDayTime;
|
|
|
- break;
|
|
|
- //某月
|
|
|
- case 1:
|
|
|
- datetime = this.tableForm.chooseMonthTime;
|
|
|
- break;
|
|
|
- //某年
|
|
|
- case 3:
|
|
|
- datetime = this.tableForm.chooseYearTime;
|
|
|
- }
|
|
|
- if (datetime != '') {
|
|
|
- // let param = {
|
|
|
- // dateType: this.tableForm.someTimeSelect,
|
|
|
- // date: datetime
|
|
|
- // }
|
|
|
-
|
|
|
- let param = {}
|
|
|
- if(this.tableForm.distric === 0) {
|
|
|
- param = {
|
|
|
- dateType: this.tableForm.someTimeSelect,
|
|
|
- date: datetime,
|
|
|
- isFuzzy: 0,
|
|
|
- }
|
|
|
- } else {
|
|
|
- param = {
|
|
|
- dateType: this.tableForm.someTimeSelect,
|
|
|
- date: datetime,
|
|
|
- isFuzzy: 1
|
|
|
- }
|
|
|
- }
|
|
|
- // console.log('某时间')
|
|
|
- // console.log(param);
|
|
|
- districHotline.GetDistrictList(param).then((res) => {
|
|
|
- // console.log(res.data.data);
|
|
|
- this.tableData = res.data.data;
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.$message.error('时间不能为空');
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
- //某段时间
|
|
|
- else {
|
|
|
- let param = {
|
|
|
- startTime: this.tableForm.startTime,
|
|
|
- endTime: this.tableForm.endTime
|
|
|
- }
|
|
|
-
|
|
|
- if (param.startTime != "" && param.endTime != "") {
|
|
|
- districHotline.getSpecialDistrictHandleList(param).then((res) => {
|
|
|
- this.tableData = res.data.data;
|
|
|
- })
|
|
|
- } else {
|
|
|
- if (param.startTime == "") {
|
|
|
- this.$message.error('时间不能为空');
|
|
|
- }
|
|
|
- else if (param.endTime == "") {
|
|
|
- this.$message.error('时间不能为空');
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- },
|
|
|
- beginDate() {
|
|
|
- let self = this
|
|
|
- return {
|
|
|
- disabledDate(time) {
|
|
|
- if (self.tableForm.endTime) {
|
|
|
- return time.getTime() > self.tableForm.endTime
|
|
|
- } else {
|
|
|
- return time.getTime() > Date.now()//开始时间不选时,结束时间最大值小于等于当天
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- //提出结束时间必须大于提出开始时间
|
|
|
- processDate() {
|
|
|
- let self = this
|
|
|
- return {
|
|
|
- disabledDate(time) {
|
|
|
- if (self.tableForm.startTime) {
|
|
|
- //开始时间不为空
|
|
|
- return new Date(self.tableForm.startTime).getTime() > time.getTime() || time.getTime() > Date.now()
|
|
|
- } else {
|
|
|
- return time.getTime() > Date.now()//开始时间不选时,结束时间最大值小于等于当天
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- tableRowClassName({row, rowIndex}) {
|
|
|
- if (rowIndex % 2 === 0) {
|
|
|
- return 'background:#f8f9fb';
|
|
|
- } else {
|
|
|
- return 'background:#ffffff';
|
|
|
- }
|
|
|
-
|
|
|
- },
|
|
|
- formatter(row, column) {
|
|
|
- return row.address;
|
|
|
- },
|
|
|
- /**修改数量*/
|
|
|
- updateAmount: function () {
|
|
|
-
|
|
|
- // this.tableData[this.formInputData.treatedIncrementId].districtHandleTreatedIncrement = this.formInputData.treatedamount;
|
|
|
- this.$refs['formInputData'].validate((valid) => {
|
|
|
- if (valid) {
|
|
|
- this.showUpateNum = false;
|
|
|
- this.editTableData(this.formInputData.treatedIncrementId);
|
|
|
- } else {
|
|
|
- this.$message.error('修改失败,输入错误');
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- /**修改数量*/
|
|
|
- updateAmount1: function () {
|
|
|
- // this.tableData[this.formInputData1.untreatedIncrementId].districtHandleUntreatedIncrement = this.formInputData1.untreatedAmount;
|
|
|
- this.$refs['formInputData'].validate((valid) => {
|
|
|
- if (valid) {
|
|
|
- this.showUpateNum1 = false;
|
|
|
- this.editTableData(this.formInputData.treatedIncrementId);
|
|
|
- } else {
|
|
|
- this.$message.error('修改失败,输入错误');
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
-
|
|
|
- /** 提交表格编辑数据*/
|
|
|
- editTableData: function (id) {
|
|
|
-
|
|
|
-
|
|
|
- var untreated = this.formInputData.untreatedAmount;
|
|
|
- var treated = this.formInputData.treatedamount;
|
|
|
-
|
|
|
- let param = {
|
|
|
- districtHandleId: id,
|
|
|
- districtHandleTreatedIncrement: treated,
|
|
|
- districtHandleUntreatedIncrement: untreated,
|
|
|
- }
|
|
|
-
|
|
|
- districHotline.EditDistrictTableData(param).then((res) => {
|
|
|
- if (res.data.data) {
|
|
|
- this.confirmTime();
|
|
|
- this.$message({
|
|
|
- message: '修改成功',
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.$message.error('修改失败');
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- })
|
|
|
-
|
|
|
- },
|
|
|
- /**打开调整弹窗*/
|
|
|
- showTreatedChange: function (amount1, amount2, change1, change2, id, index) {
|
|
|
- if (index == 0) {
|
|
|
- this.showUpateNum = true;
|
|
|
- } else {
|
|
|
- this.showUpateNum1 = true;
|
|
|
- }
|
|
|
- this.formInputData.treatedamount = change1;
|
|
|
- this.formInputData.untreatedAmount = change2;
|
|
|
- this.formInputData.treatedIncrementId = id;
|
|
|
- this.formInputData.amount2 = amount2;
|
|
|
- this.formInputData.amount1 = amount1;
|
|
|
- },
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
-</script>
|
|
|
-
|
|
|
-<style lang="scss" scoped>
|
|
|
- #districHotline {
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- #districHotline-top {
|
|
|
- background: #ffffff;
|
|
|
- }
|
|
|
-
|
|
|
- .div-container {
|
|
|
- margin-left: 10px;
|
|
|
- padding-bottom: 30px;
|
|
|
- padding-top: 3px;
|
|
|
- }
|
|
|
-
|
|
|
- #districHotline-main {
|
|
|
- background: #ffffff;
|
|
|
- }
|
|
|
-
|
|
|
- .el-row {
|
|
|
- width: 100%;
|
|
|
- }
|
|
|
-
|
|
|
- .el-form-item {
|
|
|
- margin: 0px;
|
|
|
- padding: 10px 0px 2px 5px;
|
|
|
- }
|
|
|
-
|
|
|
- .el-row-3-left {
|
|
|
- width: 75%;
|
|
|
- float: left;
|
|
|
- }
|
|
|
-
|
|
|
- .el-row-3-right {
|
|
|
- width: 25%;
|
|
|
- float: left;
|
|
|
- line-height: 49px;
|
|
|
- }
|
|
|
-
|
|
|
- .displayTime {
|
|
|
- background: #ffffff;
|
|
|
- border: 1px solid #DCDFE6;
|
|
|
- /*border-radius: 5px;*/
|
|
|
- width: 22%;
|
|
|
- height: 35px;
|
|
|
- display: inline-block;
|
|
|
- position: relative;
|
|
|
- top: 2px;
|
|
|
- margin-left: 15px;
|
|
|
- line-height: 35px;
|
|
|
- padding-left: 10px;
|
|
|
- font-weight: 500;
|
|
|
- font-size: 14px;
|
|
|
- }
|
|
|
-
|
|
|
- .container-button {
|
|
|
- float: right;
|
|
|
- margin-right: 4%;
|
|
|
- }
|
|
|
-
|
|
|
- .el-table__row .single-row {
|
|
|
- background: #F5F7FA;
|
|
|
- }
|
|
|
-
|
|
|
- /*.el-switch /deep/ .el-switch__core{*/
|
|
|
- /*background-color: #f8f9fb;*/
|
|
|
- /*border-color: #b6b6b6;*/
|
|
|
- /*width: 50px;*/
|
|
|
- /*}*/
|
|
|
- /*.el-switch /deep/ .el-switch__core:after{*/
|
|
|
- /*background-color: #b6b6b6;*/
|
|
|
- /*}*/
|
|
|
- /*.is-checked /deep/ .el-switch__core{*/
|
|
|
- /*background-color: #f8f9fb;*/
|
|
|
- /*border-color: #66e26a;*/
|
|
|
- /*width: 50px;*/
|
|
|
- /*}*/
|
|
|
- /*.is-checked /deep/ .el-switch__core:after{*/
|
|
|
- /*background-color: #66e26a;*/
|
|
|
- /*}*/
|
|
|
-
|
|
|
- .is-checked /deep/ .el-radio__inner {
|
|
|
- background: #e1e4e5;
|
|
|
- width: 15px;
|
|
|
- height: 15px;
|
|
|
- }
|
|
|
-
|
|
|
- .is-checked /deep/ .el-radio__inner:after {
|
|
|
- background: #3448a1;
|
|
|
- width: 10px;
|
|
|
- height: 10px;
|
|
|
- }
|
|
|
-
|
|
|
- .el-radio-group /deep/ .el-radio {
|
|
|
- margin-right: 10px;
|
|
|
- }
|
|
|
-</style>
|