123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 |
- <template>
- <div class="main">
- <div class="search">
- <el-input placeholder="请输入地址/报修人" class="search-input" clearable v-model="mixins_query.name"></el-input>
- <el-select v-model="mixins_query.communityId" placeholder="选择社区" clearable>
- <el-option v-for="(item, index) in communityArr" :key="index" :label="item.communityName" :value="item.id"></el-option>
- </el-select>
- <el-select class="width90" placeholder="请选择工单类型" v-model="mixins_query.orderType" clearable>
- <el-option label="业主报修" :value="1"></el-option>
- <el-option label="内部报修" :value="2"></el-option>
- </el-select>
- <el-button type="primary" class="search-btn" @click="mixins_search" icon="el-icon-search">查询 </el-button>
- <div class="search-icon">
- <el-tooltip class="item" effect="light" placement="bottom" content="新增">
- <i class="zoniot_font zoniot-icon-tianjia2" @click="addOrEdit('add')"></i>
- </el-tooltip>
- </div>
- </div>
- <zz-table
- :cols="cols"
- :settings="{ showIndex: true, stripe: true }"
- :loading="mixins_onQuery"
- :data="mixins_list"
- :pageset="mixins_pageset"
- @page-change="pageChange"
- >
- <template slot="repairFile" slot-scope="scope">
- <div class="imgVdio"><img :src="scope.row.repairFile" alt="" /></div>
- </template>
- <template slot-scope="scope" slot="opt">
- <div class="opt">
- <el-tooltip effect="light" placement="bottom" content="派单">
- <i v-if="scope.row.orderStatus !== 4" class="zoniot_font zoniot-icon-paidan" @click="dispatchTask(scope.row)"></i>
- <i v-else class="zoniot_font zoniot-icon-paidan ashText"></i>
- </el-tooltip>
- <el-tooltip effect="light" placement="bottom" :content="scope.row.orderStatus == 4 ? '已关闭' : '关闭'">
- <i
- v-if="scope.row.orderStatus !== 4"
- class="zoniot_font zoniot-icon-guanbi2 redText"
- @click="closeTask(scope.row)"
- ></i>
- <i v-else class="zoniot_font zoniot-icon-guanbi2 ashText"></i>
- </el-tooltip>
- </div>
- </template>
- </zz-table>
- </div>
- </template>
- <script>
- import list from '@utils/list.js';
- export default {
- mixins: [list],
- name: 'workOrdersManagement',
- data() {
- let _this = this;
- return {
- communityArr: [],
- cols: [
- {
- label: '所属社区',
- prop: 'communityName'
- },
- {
- label: '地址',
- prop: 'address'
- },
- {
- label: '工单类型',
- prop: 'orderType',
- format(val) {
- if (val == 1) {
- return '业主报修';
- } else if (val == 2) {
- return '内部报修';
- }
- return '--';
- }
- },
- {
- label: '报修人',
- prop: 'repairName'
- },
- {
- label: '手机号',
- prop: 'repairPhone'
- },
- {
- label: '内容描述',
- prop: 'repairContent'
- },
- {
- label: '图片/视频',
- prop: 'repairFile',
- slot: 'repairFile'
- },
- {
- label: '报修时间',
- prop: 'createDate'
- },
- {
- label: '操作',
- prop: 'id',
- slot: 'opt'
- }
- ],
- mixins_post: 'get'
- };
- },
- created() {
- this.getorgTree();
- this.mixins_dataUrl = '/sc-community-web/workOrder/page';
- this.mixins_query = {};
- this.mixins_search();
- },
- mounted() {},
- methods: {
- getorgTree() {
- this.$http
- .get('/sc-community/assets/community/list')
- .then((data) => {
- this.communityArr = data.data;
- this.$store.commit('setAreaSelect', data.data);
- })
- .catch(function () {});
- },
- dispatchTask(row) {
- console.log(row);
- },
- closeTask(data = {}) {
- new Promise((resolve) => {
- let title = '关闭工单';
- this.$store.dispatch('addPopup', {
- url: '/operationManagement/workOrders/stepPage/closeTsk.vue',
- width: '500px',
- height: '100px',
- props: {
- data,
- callback: resolve
- },
- notip: true,
- title: title
- });
- }).then(() => {
- this.mixins_search();
- });
- },
- addOrEdit() {
- new Promise((resolve) => {
- let title = '添加工单';
- this.$store.dispatch('addPopup', {
- url: '/operationManagement/workOrders/stepPage/add.vue',
- width: '500px',
- height: '500px',
- props: {
- callback: resolve
- },
- title: title
- });
- }).then(() => {
- this.mixins_search();
- });
- }
- }
- };
- </script>
- <style scoped lang='scss'>
- .imgVdio img {
- width: 64px;
- }
- </style>
|