|
@@ -0,0 +1,213 @@
|
|
|
+<template>
|
|
|
+ <div class="content main">
|
|
|
+ <community-tree @organId="currentOrganId"></community-tree>
|
|
|
+ <div class="content-right">
|
|
|
+ <div class="search">
|
|
|
+
|
|
|
+ <el-select
|
|
|
+ v-model="mixins_query.patrolType"
|
|
|
+ placeholder="请选择巡更类型"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item,index) in patrolTypeList"
|
|
|
+ :key="index"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-button
|
|
|
+ class="search-btn"
|
|
|
+ type="primary"
|
|
|
+ @click="mixins_search()"
|
|
|
+ :disabled="mixins_onQuery"
|
|
|
+ :loading="mixins_onQuery"
|
|
|
+ icon="el-icon-search"
|
|
|
+ >搜索</el-button>
|
|
|
+ <div class="search-icon">
|
|
|
+ <template>
|
|
|
+ <el-dropdown
|
|
|
+ type="primary"
|
|
|
+ @command="addCommand"
|
|
|
+ >
|
|
|
+ <span class="zoniot_font zoniot-icon-tianjia2"></span>
|
|
|
+ <el-dropdown-menu
|
|
|
+ slot="dropdown"
|
|
|
+ hide-on-click="false"
|
|
|
+ class="device-search-dropdown"
|
|
|
+ >
|
|
|
+ <el-dropdown-item command="add">单个添加</el-dropdown-item>
|
|
|
+ <el-dropdown-item command="batchAdd">
|
|
|
+ <div class="upload_div">
|
|
|
+ <xk-upload
|
|
|
+ class="upload_class"
|
|
|
+ @callback="mixins_search"
|
|
|
+ :params="{ importType: 'LANDLORD' }"
|
|
|
+ >
|
|
|
+ <span slot="content">批量添加</span>
|
|
|
+ </xk-upload>
|
|
|
+ </div>
|
|
|
+ </el-dropdown-item>
|
|
|
+ <el-dropdown-item command="template">下载模板</el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+ </template>
|
|
|
+ <el-tooltip
|
|
|
+ class="item"
|
|
|
+ effect="light"
|
|
|
+ placement="bottom"
|
|
|
+ content="删除"
|
|
|
+ >
|
|
|
+ <i
|
|
|
+ class="zoniot_font zoniot-icon-shanchu2"
|
|
|
+ @click="deluserbyidsFn"
|
|
|
+ ></i>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <zz-table
|
|
|
+ :settings="{ showCheckbox: true, showIndex: true, stripe: true }"
|
|
|
+ :cols="cols"
|
|
|
+ :loading="mixins_onQuery"
|
|
|
+ :data="mixins_list"
|
|
|
+ :pageset="mixins_pageset"
|
|
|
+ @page-change="pageChange"
|
|
|
+ @selection-change="selectionChange"
|
|
|
+ ></zz-table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+<script>
|
|
|
+import communityTree from './components/communityTree.vue';
|
|
|
+import list from '@/js/list.js';
|
|
|
+export default {
|
|
|
+ mixins: [list],
|
|
|
+ components: {
|
|
|
+ communityTree
|
|
|
+ },
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ patrolTypeList: [
|
|
|
+ {
|
|
|
+ label: '市容市貌',
|
|
|
+ value: '1'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '环境卫生',
|
|
|
+ value: '2'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '公共秩序',
|
|
|
+ value: '3'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '设备实施',
|
|
|
+ value: '4'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '消防安全',
|
|
|
+ value: '5'
|
|
|
+ },
|
|
|
+
|
|
|
+ ],
|
|
|
+ cols: [
|
|
|
+ {
|
|
|
+ label: '所属社区',
|
|
|
+ prop: 'communityName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '巡更类型',
|
|
|
+ prop: 'patrolType',
|
|
|
+ format (val) {
|
|
|
+ if (val == '1') {
|
|
|
+ return '市容市貌'
|
|
|
+ } else if (val == '2') {
|
|
|
+ return '环境卫生'
|
|
|
+ } else if (val == '3') {
|
|
|
+ return '公共秩序'
|
|
|
+ } else if (val == '4') {
|
|
|
+ return '设备实施'
|
|
|
+ } else if (val == '5') {
|
|
|
+ return '消防安全'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '巡更内容',
|
|
|
+ prop: 'content',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '操作',
|
|
|
+ slot: 'opt',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ mixins_post: 'post',
|
|
|
+ currentId: ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ currentOrganId (data) {
|
|
|
+ this.currentId = data.id || '';
|
|
|
+ this.getData();
|
|
|
+ },
|
|
|
+ getData () {
|
|
|
+ let instaData = { communityId: this.currentId, patrolType: this.mixins_query.patrolType, pageNum: 1, pageSize: 10 };
|
|
|
+ this.$http.post('/czc-community/patrol/standard/page', instaData).then(({ data, msg, status }) => {
|
|
|
+ // debugger
|
|
|
+ })
|
|
|
+ },
|
|
|
+ addCommand (command) {
|
|
|
+ if (command == 'add') {
|
|
|
+ new Promise((resolve) => {
|
|
|
+ this.$store.dispatch('addPopup', {
|
|
|
+ url: '/patrolManagement/popups/patrolAdd.vue',
|
|
|
+ width: '850px',
|
|
|
+ height: '581px',
|
|
|
+ props: {
|
|
|
+ // id: row.id,
|
|
|
+ callback: resolve
|
|
|
+ },
|
|
|
+ showConfirmButton: true,
|
|
|
+ showCancelButton: true,
|
|
|
+ // hideStar: true,
|
|
|
+ title: '添加巡更类型'
|
|
|
+ });
|
|
|
+ }).then(() => {
|
|
|
+ this.mixins_search();
|
|
|
+ });
|
|
|
+ } else if (command == 'template') {
|
|
|
+ alert('下载模板')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ deluserbyidsFn () {
|
|
|
+ let ids = [];
|
|
|
+ if (!this.selectRow.length) {
|
|
|
+ this.$message.error('您尚未选择要删除的记录,请选择后再操作批量删除');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.selectRow.forEach((v) => {
|
|
|
+ ids.push(v.id);
|
|
|
+ });
|
|
|
+ this.$msgBox(`删除`, '删除后将无法恢复,请问是否继续?')
|
|
|
+ .then(() => {
|
|
|
+ this.$http.post('/czc-community/patrol/standard/delete', ids).then(({ status, data, msg }) => {
|
|
|
+ if (0 === status) {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '删除成功!'
|
|
|
+ });
|
|
|
+ this.mixins_search();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => { });
|
|
|
+ },
|
|
|
+ },
|
|
|
+ created () {
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|