zhanghao há 3 meses atrás
pai
commit
ce29aa25c5

+ 53 - 0
src/api/zcustom/camera.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询摄像头列表
+export function listCamera(query) {
+  return request({
+    url: '/zcustom/camera/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询摄像头所有列表
+export function listAllCamera(query) {
+  return request({
+    url: '/zcustom/camera/listAll',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询摄像头详细
+export function getCamera(id) {
+  return request({
+    url: '/zcustom/camera/getInfo/' + id,
+    method: 'get'
+  })
+}
+
+// 新增摄像头
+export function addCamera(data) {
+  return request({
+    url: '/zcustom/camera/add',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改摄像头
+export function updateCamera(data) {
+  return request({
+    url: '/zcustom/camera/edit',
+    method: 'post',
+    data: data
+  })
+}
+
+// 删除摄像头
+export function delCamera(id) {
+  return request({
+    url: '/zcustom/camera/remove/' + id,
+    method: 'get'
+  })
+}

+ 53 - 0
src/api/zcustom/issue.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询上报问题列表
+export function listIssue(query) {
+  return request({
+    url: '/zcustom/issue/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询上报问题所有列表
+export function listAllIssue(query) {
+  return request({
+    url: '/zcustom/issue/listAll',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询上报问题详细
+export function getIssue(id) {
+  return request({
+    url: '/zcustom/issue/getInfo/' + id,
+    method: 'get'
+  })
+}
+
+// 新增上报问题
+export function addIssue(data) {
+  return request({
+    url: '/zcustom/issue/add',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改上报问题
+export function updateIssue(data) {
+  return request({
+    url: '/zcustom/issue/edit',
+    method: 'post',
+    data: data
+  })
+}
+
+// 删除上报问题
+export function delIssue(id) {
+  return request({
+    url: '/zcustom/issue/remove/' + id,
+    method: 'get'
+  })
+}

+ 53 - 0
src/api/zcustom/plan.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询工程计划列表
+export function listPlan(query) {
+  return request({
+    url: '/zcustom/plan/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询工程计划所有列表
+export function listAllPlan(query) {
+  return request({
+    url: '/zcustom/plan/listAll',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询工程计划详细
+export function getPlan(id) {
+  return request({
+    url: '/zcustom/plan/getInfo/' + id,
+    method: 'get'
+  })
+}
+
+// 新增工程计划
+export function addPlan(data) {
+  return request({
+    url: '/zcustom/plan/add',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改工程计划
+export function updatePlan(data) {
+  return request({
+    url: '/zcustom/plan/edit',
+    method: 'post',
+    data: data
+  })
+}
+
+// 删除工程计划
+export function delPlan(id) {
+  return request({
+    url: '/zcustom/plan/remove/' + id,
+    method: 'get'
+  })
+}

+ 53 - 0
src/api/zcustom/platAppOrg.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询地区编码列表
+export function listPlatAppOrg(query) {
+  return request({
+    url: '/zcustom/platAppOrg/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询地区编码所有列表
+export function listAllPlatAppOrg(query) {
+  return request({
+    url: '/zcustom/platAppOrg/listAll',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询地区编码详细
+export function getPlatAppOrg(id) {
+  return request({
+    url: '/zcustom/platAppOrg/getInfo/' + id,
+    method: 'get'
+  })
+}
+
+// 新增地区编码
+export function addPlatAppOrg(data) {
+  return request({
+    url: '/zcustom/platAppOrg/add',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改地区编码
+export function updatePlatAppOrg(data) {
+  return request({
+    url: '/zcustom/platAppOrg/edit',
+    method: 'post',
+    data: data
+  })
+}
+
+// 删除地区编码
+export function delPlatAppOrg(id) {
+  return request({
+    url: '/zcustom/platAppOrg/remove/' + id,
+    method: 'get'
+  })
+}

+ 53 - 0
src/api/zcustom/project.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询工程项目列表
+export function listProject(query) {
+  return request({
+    url: '/zcustom/project/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询工程项目所有列表
+export function listAllProject(query) {
+  return request({
+    url: '/zcustom/project/listAll',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询工程项目详细
+export function getProject(id) {
+  return request({
+    url: '/zcustom/project/getInfo/' + id,
+    method: 'get'
+  })
+}
+
+// 新增工程项目
+export function addProject(data) {
+  return request({
+    url: '/zcustom/project/add',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改工程项目
+export function updateProject(data) {
+  return request({
+    url: '/zcustom/project/edit',
+    method: 'post',
+    data: data
+  })
+}
+
+// 删除工程项目
+export function delProject(id) {
+  return request({
+    url: '/zcustom/project/remove/' + id,
+    method: 'get'
+  })
+}

+ 325 - 0
src/views/zcustom/camera/index.vue

@@ -0,0 +1,325 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
+      <el-form-item label="摄像头名称" prop="cameraName">
+        <el-input
+          v-model="queryParams.cameraName"
+          placeholder="请输入摄像头名称"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="在线标志" prop="onlineFlag">
+        <el-input
+          v-model="queryParams.onlineFlag"
+          placeholder="请输入在线标志"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="接入标志" prop="connectFlag">
+        <el-input
+          v-model="queryParams.connectFlag"
+          placeholder="请输入接入标志"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['zcustom:camera:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['zcustom:camera:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['zcustom:camera:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="cameraList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="序号" width="50">
+        <template slot-scope="scope">
+          {{(scope.$index + 1) + ((queryParams.pageNum - 1) * queryParams.pageSize)}}
+        </template>
+      </el-table-column>
+      <el-table-column label="摄像头名称" align="center" prop="cameraName" />
+      <el-table-column label="摄像头类型" align="center" prop="type">
+        <template slot-scope="scope">
+          <span v-if="scope.row.type == 0">海康</span>
+          <span v-if="scope.row.type == 1">大华</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="摄像头状态" align="center">
+        <template slot-scope="scope">
+          <span v-if="scope.row.status == 0">启用</span>
+          <span v-if="scope.row.status == 2">禁用</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="在线标志" align="center">
+        <template slot-scope="scope">
+          <span v-if="scope.row.onlineFlag == 0">在线</span>
+          <span v-if="scope.row.onlineFlag == 2">离线</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="接入标志" align="center">
+        <template slot-scope="scope">
+          <span v-if="scope.row.connectFlag == 0">已接入</span>
+          <span v-if="scope.row.connectFlag == 2">未接入</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['zcustom:camera:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['zcustom:camera:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改摄像头对话框 -->
+    <el-dialog :title="title" :visible.sync="open" :close-on-click-modal="false" width="800px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="摄像头名称" prop="cameraName">
+          <el-input v-model="form.cameraName" placeholder="请输入摄像头名称" />
+        </el-form-item>
+        <el-form-item label="所属项目id" prop="projectId">
+          <el-input v-model="form.projectId" placeholder="请输入所属项目id" />
+        </el-form-item>
+        <el-form-item label="在线标志" prop="onlineFlag">
+          <el-input v-model="form.onlineFlag" placeholder="请输入在线标志" />
+        </el-form-item>
+        <el-form-item label="接入标志" prop="connectFlag">
+          <el-input v-model="form.connectFlag" placeholder="请输入接入标志" />
+        </el-form-item>
+        <el-form-item label="删除标志" prop="delFlag">
+          <el-input v-model="form.delFlag" placeholder="请输入删除标志" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listCamera, getCamera, delCamera, addCamera, updateCamera } from "@/api/zcustom/camera";
+
+export default {
+  name: "Camera",
+  data() {
+    return {
+      // 根路径
+      baseURL: process.env.VUE_APP_BASE_API,
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 摄像头表格数据
+      cameraList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        cameraName: null,
+        projectId: null,
+        type: null,
+        status: null,
+        onlineFlag: null,
+        connectFlag: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        id: [
+          { required: true, message: "摄像头id不能为空", trigger: "blur" }
+        ],
+        cameraName: [
+          { required: true, message: "摄像头名称不能为空", trigger: "blur" }
+        ],
+        projectId: [
+          { required: true, message: "所属项目id不能为空", trigger: "blur" }
+        ],
+        type: [
+          { required: true, message: "摄像头类型不能为空", trigger: "change" }
+        ],
+        status: [
+          { required: true, message: "摄像头状态不能为空", trigger: "blur" }
+        ],
+        onlineFlag: [
+          { required: true, message: "在线标志不能为空", trigger: "blur" }
+        ],
+        connectFlag: [
+          { required: true, message: "接入标志不能为空", trigger: "blur" }
+        ],
+        delFlag: [
+          { required: true, message: "删除标志不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询摄像头列表 */
+    getList() {
+      this.loading = true;
+      listCamera(this.queryParams).then(response => {
+        this.cameraList =  response.data.records;
+        this.total = response.data.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        cameraName: null,
+        projectId: null,
+        type: null,
+        status: "0",
+        onlineFlag: null,
+        connectFlag: null,
+        delFlag: null,
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加摄像头";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getCamera(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改摄像头";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateCamera(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addCamera(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除?').then(function() {
+        return delCamera(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('zcustom/camera/export', {
+        ...this.queryParams
+      }, `camera_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>

+ 270 - 0
src/views/zcustom/issue/index.vue

@@ -0,0 +1,270 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
+      <el-form-item label="问题描述" prop="description">
+        <el-input
+          v-model="queryParams.description"
+          placeholder="请输入问题描述"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['zcustom:issue:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['zcustom:issue:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['zcustom:issue:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="issueList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="序号" width="50">
+        <template slot-scope="scope">
+          {{(scope.$index + 1) + ((queryParams.pageNum - 1) * queryParams.pageSize)}}
+        </template>
+      </el-table-column>
+      <el-table-column label="问题描述" align="center" prop="description" />
+      <el-table-column label="问题状态" align="center">
+        <template slot-scope="scope">
+          <span v-if="scope.row.status == 0" style="color: #42b983">●已解决</span>
+          <span v-if="scope.row.status == 2" style="color: #C03639">●待解决</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['zcustom:issue:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['zcustom:issue:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改上报问题对话框 -->
+    <el-dialog :title="title" :visible.sync="open" :close-on-click-modal="false" width="800px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="问题描述" prop="description">
+          <el-input v-model="form.description" placeholder="请输入问题描述" />
+        </el-form-item>
+        <el-form-item label="所属项目id" prop="projectId">
+          <el-input v-model="form.projectId" placeholder="请输入所属项目id" />
+        </el-form-item>
+        <el-form-item label="删除标志" prop="delFlag">
+          <el-input v-model="form.delFlag" placeholder="请输入删除标志" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listIssue, getIssue, delIssue, addIssue, updateIssue } from "@/api/zcustom/issue";
+
+export default {
+  name: "Issue",
+  data() {
+    return {
+      // 根路径
+      baseURL: process.env.VUE_APP_BASE_API,
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 上报问题表格数据
+      issueList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        description: null,
+        projectId: null,
+        status: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        id: [
+          { required: true, message: "问题id不能为空", trigger: "blur" }
+        ],
+        description: [
+          { required: true, message: "问题描述不能为空", trigger: "blur" }
+        ],
+        projectId: [
+          { required: true, message: "所属项目id不能为空", trigger: "blur" }
+        ],
+        status: [
+          { required: true, message: "问题状态不能为空", trigger: "blur" }
+        ],
+        delFlag: [
+          { required: true, message: "删除标志不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询上报问题列表 */
+    getList() {
+      this.loading = true;
+      listIssue(this.queryParams).then(response => {
+        this.issueList =  response.data.records;
+        this.total = response.data.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        description: null,
+        projectId: null,
+        status: "0",
+        delFlag: null,
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加上报问题";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getIssue(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改上报问题";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateIssue(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addIssue(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除?').then(function() {
+        return delIssue(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('zcustom/issue/export', {
+        ...this.queryParams
+      }, `issue_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>

+ 324 - 0
src/views/zcustom/plan/index.vue

@@ -0,0 +1,324 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
+      <el-form-item label="负责人" prop="head">
+        <el-input
+          v-model="queryParams.head"
+          placeholder="请输入负责人"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="开始日期" prop="startTime">
+        <el-date-picker clearable
+          v-model="queryParams.startTime"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="请选择开始日期">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="结束日期" prop="endTime">
+        <el-date-picker clearable
+          v-model="queryParams.endTime"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="请选择结束日期">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['zcustom:plan:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['zcustom:plan:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['zcustom:plan:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="planList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="序号" width="50">
+        <template slot-scope="scope">
+          {{(scope.$index + 1) + ((queryParams.pageNum - 1) * queryParams.pageSize)}}
+        </template>
+      </el-table-column>
+      <el-table-column label="计划类型" align="center">
+        <template slot-scope="scope">
+          <span v-if="scope.row.type == 0">检查</span>
+          <span v-if="scope.row.type == 1">施工</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="负责人" align="center" prop="head" />
+      <el-table-column label="具体内容" align="center" prop="content" />
+      <el-table-column label="开始日期" align="center" prop="startTime" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.startTime) }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="结束日期" align="center" prop="endTime" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.endTime) }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['zcustom:plan:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['zcustom:plan:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改工程计划对话框 -->
+    <el-dialog :title="title" :visible.sync="open" :close-on-click-modal="false" width="800px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="所属项目id" prop="projectId">
+          <el-input v-model="form.projectId" placeholder="请输入所属项目id" />
+        </el-form-item>
+        <el-form-item label="负责人" prop="head">
+          <el-input v-model="form.head" placeholder="请输入负责人" />
+        </el-form-item>
+        <el-form-item label="具体内容" prop="content">
+          <editor v-model="form.content" :min-height="192"/>
+        </el-form-item>
+        <el-form-item label="开始日期" prop="startTime">
+          <el-date-picker clearable
+            v-model="form.startTime"
+            type="date"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            placeholder="请选择开始日期">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="结束日期" prop="endTime">
+          <el-date-picker clearable
+            v-model="form.endTime"
+            type="date"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            placeholder="请选择结束日期">
+          </el-date-picker>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listPlan, getPlan, delPlan, addPlan, updatePlan } from "@/api/zcustom/plan";
+
+export default {
+  name: "Plan",
+  data() {
+    return {
+      // 根路径
+      baseURL: process.env.VUE_APP_BASE_API,
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 工程计划表格数据
+      planList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        projectId: null,
+        type: null,
+        head: null,
+        content: null,
+        startTime: null,
+        endTime: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        id: [
+          { required: true, message: "计划id不能为空", trigger: "blur" }
+        ],
+        projectId: [
+          { required: true, message: "所属项目id不能为空", trigger: "blur" }
+        ],
+        type: [
+          { required: true, message: "计划类型不能为空", trigger: "change" }
+        ],
+        head: [
+          { required: true, message: "负责人不能为空", trigger: "blur" }
+        ],
+        content: [
+          { required: true, message: "具体内容不能为空", trigger: "blur" }
+        ],
+        startTime: [
+          { required: true, message: "开始日期不能为空", trigger: "blur" }
+        ],
+        endTime: [
+          { required: true, message: "结束日期不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询工程计划列表 */
+    getList() {
+      this.loading = true;
+      listPlan(this.queryParams).then(response => {
+        this.planList =  response.data.records;
+        this.total = response.data.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        projectId: null,
+        type: null,
+        head: null,
+        content: null,
+        startTime: null,
+        endTime: null,
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加工程计划";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getPlan(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改工程计划";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updatePlan(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addPlan(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除?').then(function() {
+        return delPlan(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('zcustom/plan/export', {
+        ...this.queryParams
+      }, `plan_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>

+ 268 - 0
src/views/zcustom/platAppOrg/index.vue

@@ -0,0 +1,268 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
+      <el-form-item label="地区编码" prop="appOrg">
+        <el-input
+          v-model="queryParams.appOrg"
+          placeholder="请输入地区编码"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="地区名称" prop="appName">
+        <el-input
+          v-model="queryParams.appName"
+          placeholder="请输入地区名称"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['zcustom:platAppOrg:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['zcustom:platAppOrg:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['zcustom:platAppOrg:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="platAppOrgList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="序号" width="50">
+        <template slot-scope="scope">
+          {{(scope.$index + 1) + ((queryParams.pageNum - 1) * queryParams.pageSize)}}
+        </template>
+      </el-table-column>
+      <el-table-column label="地区编码" align="center" prop="appOrg" />
+      <el-table-column label="地区名称" align="center" prop="appName" />
+      <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['zcustom:platAppOrg:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['zcustom:platAppOrg:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改地区编码对话框 -->
+    <el-dialog :title="title" :visible.sync="open" :close-on-click-modal="false" width="800px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="删除标志" prop="delFlag">
+          <el-input v-model="form.delFlag" placeholder="请输入删除标志" />
+        </el-form-item>
+        <el-form-item label="地区编码" prop="appOrg">
+          <el-input v-model="form.appOrg" placeholder="请输入地区编码" />
+        </el-form-item>
+        <el-form-item label="地区名称" prop="appName">
+          <el-input v-model="form.appName" placeholder="请输入地区名称" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listPlatAppOrg, getPlatAppOrg, delPlatAppOrg, addPlatAppOrg, updatePlatAppOrg } from "@/api/zcustom/platAppOrg";
+
+export default {
+  name: "PlatAppOrg",
+  data() {
+    return {
+      // 根路径
+      baseURL: process.env.VUE_APP_BASE_API,
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 地区编码表格数据
+      platAppOrgList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        appOrg: null,
+        appName: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        id: [
+          { required: true, message: "$comment不能为空", trigger: "blur" }
+        ],
+        delFlag: [
+          { required: true, message: "删除标志不能为空", trigger: "blur" }
+        ],
+        appOrg: [
+          { required: true, message: "地区编码不能为空", trigger: "blur" }
+        ],
+        appName: [
+          { required: true, message: "地区名称不能为空", trigger: "blur" }
+        ]
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询地区编码列表 */
+    getList() {
+      this.loading = true;
+      listPlatAppOrg(this.queryParams).then(response => {
+        this.platAppOrgList =  response.data.records;
+        this.total = response.data.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        delFlag: null,
+        appOrg: null,
+        appName: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加地区编码";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getPlatAppOrg(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改地区编码";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updatePlatAppOrg(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addPlatAppOrg(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除?').then(function() {
+        return delPlatAppOrg(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('zcustom/platAppOrg/export', {
+        ...this.queryParams
+      }, `platAppOrg_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>

+ 281 - 0
src/views/zcustom/project/index.vue

@@ -0,0 +1,281 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
+      <el-form-item label="项目名称" prop="projectName">
+        <el-input
+          v-model="queryParams.projectName"
+          placeholder="请输入项目名称"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="接入标志" prop="connectFlag">
+        <el-input
+          v-model="queryParams.connectFlag"
+          placeholder="请输入接入标志"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['zcustom:project:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['zcustom:project:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['zcustom:project:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="projectList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="序号" width="50">
+        <template slot-scope="scope">
+          {{(scope.$index + 1) + ((queryParams.pageNum - 1) * queryParams.pageSize)}}
+        </template>
+      </el-table-column>
+      <el-table-column label="项目名称" align="center" prop="projectName" />
+      <el-table-column label="接入标志" align="center">
+        <template slot-scope="scope">
+          <span v-if="scope.row.connectFlag == 0">已接入</span>
+          <span v-if="scope.row.connectFlag == 2">未接入</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['zcustom:project:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['zcustom:project:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改工程项目对话框 -->
+    <el-dialog :title="title" :visible.sync="open" :close-on-click-modal="false" width="800px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="项目名称" prop="projectName">
+          <el-input v-model="form.projectName" placeholder="请输入项目名称" />
+        </el-form-item>
+        <el-form-item label="所属单位id" prop="unitId">
+          <el-input v-model="form.unitId" placeholder="请输入所属单位id" />
+        </el-form-item>
+        <el-form-item label="接入标志" prop="connectFlag">
+          <el-input v-model="form.connectFlag" placeholder="请输入接入标志" />
+        </el-form-item>
+        <el-form-item label="删除标志" prop="delFlag">
+          <el-input v-model="form.delFlag" placeholder="请输入删除标志" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listProject, getProject, delProject, addProject, updateProject } from "@/api/zcustom/project";
+
+export default {
+  name: "Project",
+  data() {
+    return {
+      // 根路径
+      baseURL: process.env.VUE_APP_BASE_API,
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 工程项目表格数据
+      projectList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        projectName: null,
+        unitId: null,
+        connectFlag: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        id: [
+          { required: true, message: "项目id不能为空", trigger: "blur" }
+        ],
+        projectName: [
+          { required: true, message: "项目名称不能为空", trigger: "blur" }
+        ],
+        unitId: [
+          { required: true, message: "所属单位id不能为空", trigger: "blur" }
+        ],
+        connectFlag: [
+          { required: true, message: "接入标志不能为空", trigger: "blur" }
+        ],
+        delFlag: [
+          { required: true, message: "删除标志不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询工程项目列表 */
+    getList() {
+      this.loading = true;
+      listProject(this.queryParams).then(response => {
+        this.projectList =  response.data.records;
+        this.total = response.data.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        projectName: null,
+        unitId: null,
+        connectFlag: null,
+        delFlag: null,
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加工程项目";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getProject(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改工程项目";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateProject(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addProject(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除?').then(function() {
+        return delProject(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('zcustom/project/export', {
+        ...this.queryParams
+      }, `project_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>