shuishen
2023-12-15 10964ea959757a6cc2871ae769bd4687595eac80
首页更换,部分菜单,操作栏调整,部分样式调整
28 files modified
6 files added
3036 ■■■■ changed files
public/favicon.png patch | view | raw | blame | history
public/img/anjian.png patch | view | raw | blame | history
public/img/bjkeji.png patch | view | raw | blame | history
public/img/fangyi.png patch | view | raw | blame | history
public/img/logo.png patch | view | raw | blame | history
public/img/tiwen.png patch | view | raw | blame | history
public/img/tongji.png patch | view | raw | blame | history
public/img/yijianbaoj.png patch | view | raw | blame | history
src/page/login/index.vue 82 ●●●● patch | view | raw | blame | history
src/styles/login.scss 11 ●●●●● patch | view | raw | blame | history
src/styles/media.scss 18 ●●●● patch | view | raw | blame | history
src/util/util.js 14 ●●●●● patch | view | raw | blame | history
src/views/district/index.vue 150 ●●●● patch | view | raw | blame | history
src/views/grid/gridWorkLog/index.vue 166 ●●●●● patch | view | raw | blame | history
src/views/grid/gridman.vue 139 ●●●● patch | view | raw | blame | history
src/views/grid/index.vue 129 ●●●● patch | view | raw | blame | history
src/views/monitor/log/api.vue 69 ●●●●● patch | view | raw | blame | history
src/views/monitor/log/error.vue 69 ●●●●● patch | view | raw | blame | history
src/views/monitor/log/usual.vue 69 ●●●●● patch | view | raw | blame | history
src/views/place/index.vue 168 ●●●● patch | view | raw | blame | history
src/views/rotation/index.vue 167 ●●●●● patch | view | raw | blame | history
src/views/task/eCall/index.vue 178 ●●●● patch | view | raw | blame | history
src/views/task/index.vue 142 ●●●● patch | view | raw | blame | history
src/views/task/reportForRepairs.vue 142 ●●●● patch | view | raw | blame | history
src/views/tool/code.vue 237 ●●●●● patch | view | raw | blame | history
src/views/tool/datasource.vue 140 ●●●●● patch | view | raw | blame | history
src/views/tool/model.vue 273 ●●●● patch | view | raw | blame | history
src/views/userHouse/houseHoldList.vue 1 ●●●● patch | view | raw | blame | history
src/views/wel/index.vue 165 ●●●● patch | view | raw | blame | history
src/views/work/claim.vue 107 ●●●●● patch | view | raw | blame | history
src/views/work/done.vue 95 ●●●●● patch | view | raw | blame | history
src/views/work/send.vue 98 ●●●●● patch | view | raw | blame | history
src/views/work/start.vue 106 ●●●●● patch | view | raw | blame | history
src/views/work/todo.vue 101 ●●●●● patch | view | raw | blame | history
public/favicon.png

public/img/anjian.png
public/img/bjkeji.png
public/img/fangyi.png
public/img/logo.png

public/img/tiwen.png
public/img/tongji.png
public/img/yijianbaoj.png
src/page/login/index.vue
@@ -1,18 +1,18 @@
<template>
  <div class="login-container"
       ref="login"
       @keyup.enter.native="handleLogin">
    <div class="login-container" ref="login" @keyup.enter.native="handleLogin">
    <top-color v-show="false"></top-color>
    <div class="login-weaper animated bounceInDown">
      <div class="login-left">
        <div class="login-time">
          {{time}}
        </div>
        <p class="title">{{ $t('login.info') }}</p>
      <!--<img class="img" src="/img/logo.png" alt="">-->
                <p class="title">{{ $t('login.info') }}</p>
      </div>
      <div class="login-border">
                <img class="img" src="/img/logo.png" alt="">
        <div class="login-main">
          <h4 class="login-title">
            {{ $t('login.title') }}
            <!-- <top-lang></top-lang> -->
@@ -33,15 +33,15 @@
  </div>
</template>
<script>
  import userLogin from "./userlogin";
  import codeLogin from "./codelogin";
  import thirdLogin from "./thirdlogin";
  import {mapGetters} from "vuex";
  import {dateFormat} from "@/util/date";
  import {validatenull} from "@/util/validate";
  import topLang from "@/page/index/top/top-lang";
  import topColor from "@/page/index/top/top-color";
  import {getQueryString, getTopUrl} from "@/util/util";
import userLogin from "./userlogin"
import codeLogin from "./codelogin"
import thirdLogin from "./thirdlogin"
import { mapGetters } from "vuex"
import { dateFormat } from "@/util/date"
import { validatenull } from "@/util/validate"
import topLang from "@/page/index/top/top-lang"
import topColor from "@/page/index/top/top-color"
import { getQueryString, getTopUrl } from "@/util/util"
  export default {
    name: "login",
@@ -62,16 +62,16 @@
          code: "",
          state: "",
        }
      };
        }
    },
    watch: {
      $route() {
        this.handleLogin();
            this.handleLogin()
      }
    },
    created() {
      this.handleLogin();
      this.getTime();
        this.handleLogin()
        this.getTime()
    },
    mounted() {
    },
@@ -82,51 +82,51 @@
    methods: {
      getTime() {
        setInterval(() => {
          this.time = dateFormat(new Date());
        }, 1000);
                this.time = dateFormat(new Date())
            }, 1000)
      },
      handleLogin() {
        const topUrl = getTopUrl();
        const redirectUrl = "/oauth/redirect/";
        const ssoCode = "?code=";
        this.socialForm.source = getQueryString("source");
        this.socialForm.code = getQueryString("code");
        this.socialForm.state = getQueryString("state");
            const topUrl = getTopUrl()
            const redirectUrl = "/oauth/redirect/"
            const ssoCode = "?code="
            this.socialForm.source = getQueryString("source")
            this.socialForm.code = getQueryString("code")
            this.socialForm.state = getQueryString("state")
        if (validatenull(this.socialForm.source) && topUrl.includes(redirectUrl)) {
          let source = topUrl.split("?")[0];
          source = source.split(redirectUrl)[1];
          this.socialForm.source = source;
                let source = topUrl.split("?")[0]
                source = source.split(redirectUrl)[1]
                this.socialForm.source = source
        }
        if (topUrl.includes(redirectUrl) && !validatenull(this.socialForm.source) && !validatenull(this.socialForm.code) && !validatenull(this.socialForm.state)) {
          const loading = this.$loading({
            lock: true,
            text: '第三方系统登录中,请稍后。。。',
            spinner: "el-icon-loading"
          });
                })
          this.$store.dispatch("LoginBySocial", this.socialForm).then(() => {
            window.location.href = topUrl.split(redirectUrl)[0];
            this.$router.push({path: this.tagWel.value});
            loading.close();
                    window.location.href = topUrl.split(redirectUrl)[0]
                    this.$router.push({ path: this.tagWel.value })
                    loading.close()
          }).catch(() => {
            loading.close();
          });
                    loading.close()
                })
        } else if (!topUrl.includes(redirectUrl) && !validatenull(this.socialForm.code) && !validatenull(this.socialForm.state)) {
          const loading = this.$loading({
            lock: true,
            text: '单点系统登录中,请稍后。。。',
            spinner: "el-icon-loading"
          });
                })
          this.$store.dispatch("LoginBySso", this.socialForm).then(() => {
            window.location.href = topUrl.split(ssoCode)[0];
            this.$router.push({path: this.tagWel.value});
            loading.close();
                    window.location.href = topUrl.split(ssoCode)[0]
                    this.$router.push({ path: this.tagWel.value })
                    loading.close()
          }).catch(() => {
            loading.close();
          });
                    loading.close()
                })
        }
      }
    }
  };
}
</script>
<style lang="scss">
src/styles/login.scss
@@ -33,7 +33,8 @@
  border-bottom-left-radius: 5px;
  justify-content: center;
  flex-direction: column;
  background-color: #5A9CF8 !important;;
    background-color: #5A9CF8 !important;
    ;
  color: #fff;
  float: left;
  width: 50%;
@@ -73,6 +74,14 @@
  width: 50%;
  float: left;
  box-sizing: border-box;
    position: relative;
    .img {
        position: absolute;
        top: 10px;
        right: 10px;
        width: 180px;
    }
}
.login-main {
src/styles/media.scss
@@ -2,8 +2,7 @@
.avue-header,
.avue-top,
.avue-logo,
.avue-layout
.login-logo,
.avue-layout .login-logo,
.avue-main {
  transition: all .3s;
}
@@ -27,6 +26,7 @@
}
.avue--collapse {
  .avue-left,
  .avue-logo {
    width: 60px;
@@ -112,53 +112,67 @@
@media screen and (max-width: 992px) {
  $width: 240px;
  // ele的自适应
  .el-dialog,
  .el-message-box {
    width: 98% !important;
  }
  //登录页面
  .login-left {
    display: none !important;
  }
  .login-logo {
    padding-top: 30px !important;
    margin-left: -30px;
  }
  .login-weaper {
    margin: 0 auto;
    width: 96% !important;
  }
  .login-border {
    border-radius: 5px;
    padding: 40px;
    margin: 0 auto;
    float: none !important;
    width: 100% !important;
        position: relative;
  }
  .login-main {
    width: 100% !important;
  }
  //主框架
  .avue-tags {
    display: none;
  }
  .avue-left,
  .avue-logo {
    left: -$width;
  }
  .avue-main {
    left: 0;
    width: 100%;
  }
  .avue-header {
    margin-bottom: 15px;
    padding-left: 15px;
  }
  .top-bar__item {
    display: none;
  }
  .avue--collapse {
    .avue-left,
    .avue-logo {
      width: $width;
src/util/util.js
@@ -389,3 +389,17 @@
    window.open(URL.createObjectURL(file));
  }
}
export const processArray = (arr) => {
    arr.forEach(item => {
        if ('children' in item && item.children.length > 0) {
            item.children = processArray(item.children)
        } else {
            if ('children' in item) {
                delete item.children
            }
        }
    })
    return arr
}
src/views/district/index.vue
@@ -1,11 +1,13 @@
<template>
  <basic-container>
    <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
      v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
      @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
      @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
            v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave"
            :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset"
            @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
            @refresh-change="refreshChange" @on-load="onLoad">
      <template slot="menuLeft">
        <el-button size="small" icon="el-icon-delete" plain v-if="permission.district_delete" @click="handleDelete">删 除
                <el-button size="small" icon="el-icon-delete" plain v-if="permission.district_delete"
                    @click="handleDelete">删 除
        </el-button>
      </template>
    </avue-crud>
@@ -13,9 +15,9 @@
</template>
<script>
import { getList, remove, update, add, getDistrict } from "@/api/district/index";
import { mapGetters } from "vuex";
import website from '@/config/website';
import { getList, remove, update, add, getDistrict } from "@/api/district/index"
import { mapGetters } from "vuex"
import website from '@/config/website'
export default {
  data() {
    return {
@@ -36,7 +38,7 @@
        tip: false,
        searchShow: true,
        searchMenuSpan: 3,
        menuWidth: 350,
                menuWidth: 280,
        border: true,
        //stripe:true,
        index: true,
@@ -63,11 +65,9 @@
            prop: "communityCode",
            search: true,
            searchSpan: 4,
            width:110,
                        width: 150,
            type: "tree",
            dicUrl:"/api/blade-system/region/tree?parentCode=361102",
            // parent:false,
            defaultExpandedKeys:["361102003"],
                        dicUrl: "/api/blade-system/region/tree",
            props: {
              label: "name",
              value: "id"
@@ -124,7 +124,7 @@
        ],
      },
      data: [],
    };
        }
  },
  watch: {
  },
@@ -136,67 +136,67 @@
        viewBtn: this.vaildData(this.permission.district_view, true),
        delBtn: this.vaildData(this.permission.district_delete, true),
        editBtn: this.vaildData(this.permission.district_edit, true),
      };
            }
    },
    ids() {
      let ids = [];
            let ids = []
      this.selectionList.forEach((ele) => {
        ids.push(ele.id);
      });
      return ids.join(",");
                ids.push(ele.id)
            })
            return ids.join(",")
    },
  },
  methods: {
    rowSave(row, done, loading) {
      if (row.picUrl.length > 0) {
        var urls = []
        var split = row.picUrl.split(",");
                var split = row.picUrl.split(",")
        split.forEach(url => {
          var names = url.split("jczz/");
                    var names = url.split("jczz/")
          urls.push(names[1])
        })
        row.picUrl = urls.join(",")
      }
      row.userid = this.userInfo.user_id;
            row.userid = this.userInfo.user_id
      add(row).then(
        () => {
          this.onLoad(this.page);
                    this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
                    })
                    done()
        },
        (error) => {
          window.console.log(error);
          loading();
                    window.console.log(error)
                    loading()
        }
      );
            )
    },
    rowUpdate(row, index, done, loading) {
      if (row.picUrl.length > 0) {
        var urls = []
        var split = row.picUrl.split(",");
                var split = row.picUrl.split(",")
        split.forEach(url => {
          var names = url.split("jczz/");
                    var names = url.split("jczz/")
          urls.push(names[1])
        })
        row.picUrl = urls.join(",")
      }
      update(row).then(
        () => {
          this.onLoad(this.page);
                    this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
                    })
                    done()
        },
        (error) => {
          window.console.log(error);
          loading();
                    window.console.log(error)
                    loading()
        }
      );
            )
    },
    rowDel(row) {
      this.$confirm("确定将选择数据删除?", {
@@ -205,37 +205,37 @@
        type: "warning",
      })
        .then(() => {
          return remove(row.id);
                    return remove(row.id)
        })
        .then(() => {
          this.onLoad(this.page);
                    this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!",
          });
        });
                    })
                })
    },
    searchReset() {
      this.query = {};
      this.onLoad(this.page);
            this.query = {}
            this.onLoad(this.page)
    },
    searchChange(params, done) {
      this.query = params;
      this.page.currentPage = 1;
      this.onLoad(this.page, params);
      done();
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            done()
    },
    selectionChange(list) {
      this.selectionList = list;
            this.selectionList = list
    },
    selectionClear() {
      this.selectionList = [];
      this.$refs.crud.toggleSelection();
            this.selectionList = []
            this.$refs.crud.toggleSelection()
    },
    handleDelete() {
      if (this.selectionList.length === 0) {
        this.$message.warning("请选择至少一条数据");
        return;
                this.$message.warning("请选择至少一条数据")
                return
      }
      this.$confirm("确定将选择数据删除?", {
        confirmButtonText: "确定",
@@ -243,67 +243,67 @@
        type: "warning",
      })
        .then(() => {
          return remove(this.ids);
                    return remove(this.ids)
        })
        .then(() => {
          this.onLoad(this.page);
                    this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          this.$refs.crud.toggleSelection();
        });
                    })
                    this.$refs.crud.toggleSelection()
                })
    },
    beforeOpen(done, type) {
      if (["edit", "view"].includes(type)) {
        getDistrict(this.form.id).then((res) => {
          this.form = res.data.data;
                    this.form = res.data.data
          if (this.form.picUrl.length > 0) {
            var urls = []
            var names = this.form.picUrl.split(",");
                        var names = this.form.picUrl.split(",")
            names.forEach(name=>{
              urls.push(website.minioUrl + name)
            })
            this.form.picUrl = urls.join(",")
          }
        });
                })
      }
      // con
      done();
            done()
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
            this.page.currentPage = currentPage
    },
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
            this.page.pageSize = pageSize
    },
    refreshChange() {
      this.onLoad(this.page, this.query);
            this.onLoad(this.page, this.query)
    },
    onLoad(page, params = {}) {
      const { dateTime } = this.query;
            const { dateTime } = this.query
      let values = {
        ...params,
      };
            }
      if (dateTime) {
        values = {
          ...params,
          startTime: dateTime[0],
          endTime: dateTime[1],
          ...this.query,
        };
        values.dateTime = null;
      }
      this.loading = true;
                values.dateTime = null
            }
            this.loading = true
      getList(page.currentPage, page.pageSize, values).then((res) => {
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
                const data = res.data.data
                this.page.total = data.total
                this.data = data.records
        this.data.forEach(item=>{
          if(item.picUrl){
            if(item.picUrl.length>0){
              var urls = []
              var names = item.picUrl.split(",");
                            var names = item.picUrl.split(",")
              names.forEach(name=>{
                urls.push(website.minioUrl + name)
              })
@@ -311,12 +311,12 @@
            }
          }
        })
        this.loading = false;
        this.selectionClear();
      });
                this.loading = false
                this.selectionClear()
            })
    }
  }
};
}
</script>
<style>
src/views/grid/gridWorkLog/index.vue
@@ -1,34 +1,14 @@
<!-- 工作日志 -->
<!-- 走访日志 -->
<template>
  <basic-container>
    <avue-crud
      :option="option"
      :table-loading="loading"
      :data="data"
      :page.sync="page"
      ref="crud"
      @row-del="rowDel"
      v-model="form"
      :permission="permissionList"
      @row-update="rowUpdate"
      @row-save="rowSave"
      :before-open="beforeOpen"
      @search-change="searchChange"
      @search-reset="searchReset"
      @selection-change="selectionChange"
      @current-change="currentChange"
      @size-change="sizeChange"
      @refresh-change="refreshChange"
      @on-load="onLoad"
    >
        <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
            v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave"
            :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset"
            @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
            @refresh-change="refreshChange" @on-load="onLoad">
      <template slot="menuLeft">
        <el-button
          size="small"
          icon="el-icon-delete"
          plain
          v-if="permission.gridWorkLog_delete"
          @click="handleDelete"
        >删 除
                <el-button size="small" icon="el-icon-delete" plain v-if="permission.gridWorkLog_delete"
                    @click="handleDelete">删 除
        </el-button>
      </template>
    </avue-crud>
@@ -36,9 +16,9 @@
</template>
<script>
  import {getList, remove, update, add, getGridWorkLog} from "@/api/grid/gridWorkLog";
  import {mapGetters} from "vuex";
  import website from '@/config/website';
import { getList, remove, update, add, getGridWorkLog } from "@/api/grid/gridWorkLog"
import { mapGetters } from "vuex"
import website from '@/config/website'
  export default {
    data() {
@@ -134,7 +114,7 @@
          ],
        },
        data: [],
      };
        }
    },
    watch: {
    },
@@ -146,66 +126,66 @@
          viewBtn: this.vaildData(this.permission.gridWorkLog_view, true),
          delBtn: this.vaildData(this.permission.gridWorkLog_delete, true),
          editBtn: this.vaildData(this.permission.gridWorkLog_edit, true),
        };
            }
      },
      ids() {
        let ids = [];
            let ids = []
        this.selectionList.forEach((ele) => {
          ids.push(ele.id);
        });
        return ids.join(",");
                ids.push(ele.id)
            })
            return ids.join(",")
      },
    },
    methods: {
      rowSave(row, done, loading) {
        if(row.url.length>0){
          var urls = []
          var split = row.url.split(",");
                var split = row.url.split(",")
          split.forEach(url=>{
             var names = url.split("jczz/");
                    var names = url.split("jczz/")
             urls.push(names[1])
          })
          row.url = urls.join(",")
        }
        add(row).then(
          () => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            });
            done();
                    })
                    done()
          },
          (error) => {
            window.console.log(error);
            loading();
                    window.console.log(error)
                    loading()
          }
        );
            )
      },
      rowUpdate(row, index, done, loading) {
        if(row.url.length>0){
          var urls = []
          var split = row.url.split(",");
                var split = row.url.split(",")
          split.forEach(url=>{
             var names = url.split("jczz/");
                    var names = url.split("jczz/")
             urls.push(names[1])
          })
          row.url = urls.join(",")
        }
        update(row).then(
          () => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            });
            done();
                    })
                    done()
          },
          (error) => {
            window.console.log(error);
            loading();
                    window.console.log(error)
                    loading()
          }
        );
            )
      },
      rowDel(row) {
        this.$confirm("确定将选择数据删除?", {
@@ -214,37 +194,37 @@
          type: "warning",
        })
          .then(() => {
            return remove(row.id);
                    return remove(row.id)
          })
          .then(() => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            });
          });
                    })
                })
      },
      searchReset() {
        this.query = {};
        this.onLoad(this.page);
            this.query = {}
            this.onLoad(this.page)
      },
      searchChange(params, done) {
        this.query = params;
        this.page.currentPage = 1;
        this.onLoad(this.page, params);
        done();
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            done()
      },
      selectionChange(list) {
        this.selectionList = list;
            this.selectionList = list
      },
      selectionClear() {
        this.selectionList = [];
        this.$refs.crud.toggleSelection();
            this.selectionList = []
            this.$refs.crud.toggleSelection()
      },
      handleDelete() {
        if (this.selectionList.length === 0) {
          this.$message.warning("请选择至少一条数据");
          return;
                this.$message.warning("请选择至少一条数据")
                return
        }
        this.$confirm("确定将选择数据删除?", {
          confirmButtonText: "确定",
@@ -252,78 +232,78 @@
          type: "warning",
        })
          .then(() => {
            return remove(this.ids);
                    return remove(this.ids)
          })
          .then(() => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            });
            this.$refs.crud.toggleSelection();
          });
                    })
                    this.$refs.crud.toggleSelection()
                })
      },
      beforeOpen(done, type) {
        if (["edit", "view"].includes(type)) {
          getGridWorkLog(this.form.id).then((res) => {
            this.form = res.data.data;
                    this.form = res.data.data
            if(this.form.url.length>0){
              var urls = []
              var names = this.form.url.split(",");
                        var names = this.form.url.split(",")
              names.forEach(name=>{
                urls.push(website.minioUrl + name)
              })
              this.form.url = urls.join(",")
            }
          });
                })
        }
        // con
        done();
            done()
      },
      currentChange(currentPage) {
        this.page.currentPage = currentPage;
            this.page.currentPage = currentPage
      },
      sizeChange(pageSize) {
        this.page.pageSize = pageSize;
            this.page.pageSize = pageSize
      },
      refreshChange() {
        this.onLoad(this.page, this.query);
            this.onLoad(this.page, this.query)
      },
      onLoad(page, params = {}) {
        const {dateTime} = this.query;
            const { dateTime } = this.query
        let values = {
          ...params,
        };
            }
        if (dateTime) {
          values = {
            ...params,
            startTime: dateTime[0],
            endTime: dateTime[1],
            ...this.query,
          };
          values.dateTime = null;
        }
        this.loading = true;
                values.dateTime = null
            }
            this.loading = true
        getList(page.currentPage, page.pageSize, values).then((res) => {
          const data = res.data.data;
          this.page.total = data.total;
          this.data = data.records;
                const data = res.data.data
                this.page.total = data.total
                this.data = data.records
          this.data.forEach(item=>{
            if(item.url.length>0){
              var urls = []
              var names = item.url.split(",");
                        var names = item.url.split(",")
              names.forEach(name=>{
                urls.push(website.minioUrl + name)
              })
              item.url = urls.join(",")
            }
          })
          this.loading = false;
          this.selectionClear();
        });
                this.loading = false
                this.selectionClear()
            })
      }
    },
  };
}
</script>
<style>
src/views/grid/gridman.vue
@@ -1,11 +1,13 @@
<template>
  <basic-container>
    <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
      v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
      @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
      @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
            v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave"
            :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset"
            @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
            @refresh-change="refreshChange" @on-load="onLoad">
      <template slot="menuLeft">
        <el-button size="small" icon="el-icon-delete" plain v-if="permission.gridman_delete" @click="handleDelete">删 除
                <el-button size="small" icon="el-icon-delete" plain v-if="permission.gridman_delete" @click="handleDelete">删
                    除
        </el-button>
      </template>
    </avue-crud>
@@ -13,9 +15,9 @@
</template>
<script>
import { getList, remove, update, add, getGridman } from "@/api/grid/gridman";
import { mapGetters } from "vuex";
import website from '@/config/website';
import { getList, remove, update, add, getGridman } from "@/api/grid/gridman"
import { mapGetters } from "vuex"
import website from '@/config/website'
export default {
  data() {
    return {
@@ -69,14 +71,15 @@
          {
            label: "所属社区",
            prop: "communityCode",
                        search: true,
                        searchSpan: 4,
                        width: 150,
            type: "tree",
            dicUrl: "/api/blade-system/region/tree?parentCode=361102",
            defaultExpandedKeys: ["361102003"],
                        dicUrl: "/api/blade-system/region/tree",
            props: {
              label: "name",
              value: "id"
            },
            display: false,
            rules: [
              {
                required: true,
@@ -135,7 +138,7 @@
        ],
      },
      data: [],
    };
        }
  },
  watch: {
  },
@@ -147,56 +150,56 @@
        viewBtn: this.vaildData(this.permission.gridman_view, true),
        delBtn: this.vaildData(this.permission.gridman_delete, true),
        editBtn: this.vaildData(this.permission.gridman_edit, true),
      };
            }
    },
    ids() {
      let ids = [];
            let ids = []
      this.selectionList.forEach((ele) => {
        ids.push(ele.id);
      });
      return ids.join(",");
                ids.push(ele.id)
            })
            return ids.join(",")
    },
  },
  methods: {
    rowSave(row, done, loading) {
      if (row.picUrl) {
        var names = row.picUrl.split("jczz/");
                var names = row.picUrl.split("jczz/")
        row.picUrl = names[1]
      }
      add(row).then(
        () => {
          this.onLoad(this.page);
                    this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
                    })
                    done()
        },
        (error) => {
          window.console.log(error);
          loading();
                    window.console.log(error)
                    loading()
        }
      );
            )
    },
    rowUpdate(row, index, done, loading) {
      if (row.picUrl) {
        var names = row.picUrl.split("jczz/");
                var names = row.picUrl.split("jczz/")
        row.picUrl = names[1]
      }
      update(row).then(
        () => {
          this.onLoad(this.page);
                    this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
                    })
                    done()
        },
        (error) => {
          window.console.log(error);
          loading();
                    window.console.log(error)
                    loading()
        }
      );
            )
    },
    rowDel(row) {
      this.$confirm("确定将选择数据删除?", {
@@ -205,37 +208,37 @@
        type: "warning",
      })
        .then(() => {
          return remove(row.id);
                    return remove(row.id)
        })
        .then(() => {
          this.onLoad(this.page);
                    this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!",
          });
        });
                    })
                })
    },
    searchReset() {
      this.query = {};
      this.onLoad(this.page);
            this.query = {}
            this.onLoad(this.page)
    },
    searchChange(params, done) {
      this.query = params;
      this.page.currentPage = 1;
      this.onLoad(this.page, params);
      done();
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            done()
    },
    selectionChange(list) {
      this.selectionList = list;
            this.selectionList = list
    },
    selectionClear() {
      this.selectionList = [];
      this.$refs.crud.toggleSelection();
            this.selectionList = []
            this.$refs.crud.toggleSelection()
    },
    handleDelete() {
      if (this.selectionList.length === 0) {
        this.$message.warning("请选择至少一条数据");
        return;
                this.$message.warning("请选择至少一条数据")
                return
      }
      this.$confirm("确定将选择数据删除?", {
        confirmButtonText: "确定",
@@ -243,68 +246,68 @@
        type: "warning",
      })
        .then(() => {
          return remove(this.ids);
                    return remove(this.ids)
        })
        .then(() => {
          this.onLoad(this.page);
                    this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          this.$refs.crud.toggleSelection();
        });
                    })
                    this.$refs.crud.toggleSelection()
                })
    },
    beforeOpen(done, type) {
      if (["edit", "view"].includes(type)) {
        getGridman(this.form.id).then((res) => {
          this.form = res.data.data;
                    this.form = res.data.data
          if (this.form.picUrl) {
            this.form.picUrl = website.minioUrl + this.form.picUrl
          }
        });
                })
      }
      // con
      done();
            done()
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
            this.page.currentPage = currentPage
    },
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
            this.page.pageSize = pageSize
    },
    refreshChange() {
      this.onLoad(this.page, this.query);
            this.onLoad(this.page, this.query)
    },
    onLoad(page, params = {}) {
      const { dateTime } = this.query;
            const { dateTime } = this.query
      let values = {
        ...params,
      };
            }
      if (dateTime) {
        values = {
          ...params,
          startTime: dateTime[0],
          endTime: dateTime[1],
          ...this.query,
        };
        values.dateTime = null;
      }
      this.loading = true;
                values.dateTime = null
            }
            this.loading = true
      getList(page.currentPage, page.pageSize, values).then((res) => {
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
                const data = res.data.data
                this.page.total = data.total
                this.data = data.records
        this.data.forEach(item=>{
          if (item.picUrl) {
            item.picUrl = website.minioUrl + item.picUrl
          }
        })
        this.loading = false;
        this.selectionClear();
      });
                this.loading = false
                this.selectionClear()
            })
    }
  }
};
}
</script>
<style>
src/views/grid/index.vue
@@ -1,9 +1,10 @@
<template>
  <basic-container>
    <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
      v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
      @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
      @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
            v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave"
            :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset"
            @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
            @refresh-change="refreshChange" @on-load="onLoad">
      <template slot="menuLeft">
        <el-button size="small" icon="el-icon-delete" plain v-if="permission.grid_delete" @click="handleDelete">删 除
        </el-button>
@@ -13,9 +14,9 @@
</template>
<script>
import { getList, remove, update, add, getGrid } from "@/api/grid/grid";
import { mapGetters } from "vuex";
import website from '@/config/website';
import { getList, remove, update, add, getGrid } from "@/api/grid/grid"
import { mapGetters } from "vuex"
// import website from '@/config/website'
export default {
  data() {
    return {
@@ -36,7 +37,7 @@
        tip: false,
        searchShow: true,
        searchMenuSpan: 3,
        menuWidth: 350,
                menuWidth: 280,
        border: true,
        //stripe:true,
        index: true,
@@ -49,9 +50,9 @@
            prop: "communityCode",
            search: true,
            searchSpan: 4,
                        width: 150,
            type: "tree",
            dicUrl: "/api/blade-system/region/tree",
            defaultExpandedKeys: ["361102003"],
            props: {
              label: "name",
              value: "id"
@@ -150,7 +151,7 @@
        ],
      },
      data: [],
    };
        }
  },
  watch: {
  },
@@ -162,48 +163,48 @@
        viewBtn: this.vaildData(this.permission.grid_view, true),
        delBtn: this.vaildData(this.permission.grid_delete, true),
        editBtn: this.vaildData(this.permission.grid_edit, true),
      };
            }
    },
    ids() {
      let ids = [];
            let ids = []
      this.selectionList.forEach((ele) => {
        ids.push(ele.id);
      });
      return ids.join(",");
                ids.push(ele.id)
            })
            return ids.join(",")
    },
  },
  methods: {
    rowSave(row, done, loading) {
      add(row).then(
        () => {
          this.onLoad(this.page);
                    this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
                    })
                    done()
        },
        (error) => {
          window.console.log(error);
          loading();
                    window.console.log(error)
                    loading()
        }
      );
            )
    },
    rowUpdate(row, index, done, loading) {
      update(row).then(
        () => {
          this.onLoad(this.page);
                    this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
                    })
                    done()
        },
        (error) => {
          window.console.log(error);
          loading();
                    window.console.log(error)
                    loading()
        }
      );
            )
    },
    rowDel(row) {
      this.$confirm("确定将选择数据删除?", {
@@ -212,37 +213,37 @@
        type: "warning",
      })
        .then(() => {
          return remove(row.id);
                    return remove(row.id)
        })
        .then(() => {
          this.onLoad(this.page);
                    this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!",
          });
        });
                    })
                })
    },
    searchReset() {
      this.query = {};
      this.onLoad(this.page);
            this.query = {}
            this.onLoad(this.page)
    },
    searchChange(params, done) {
      this.query = params;
      this.page.currentPage = 1;
      this.onLoad(this.page, params);
      done();
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            done()
    },
    selectionChange(list) {
      this.selectionList = list;
            this.selectionList = list
    },
    selectionClear() {
      this.selectionList = [];
      this.$refs.crud.toggleSelection();
            this.selectionList = []
            this.$refs.crud.toggleSelection()
    },
    handleDelete() {
      if (this.selectionList.length === 0) {
        this.$message.warning("请选择至少一条数据");
        return;
                this.$message.warning("请选择至少一条数据")
                return
      }
      this.$confirm("确定将选择数据删除?", {
        confirmButtonText: "确定",
@@ -250,60 +251,60 @@
        type: "warning",
      })
        .then(() => {
          return remove(this.ids);
                    return remove(this.ids)
        })
        .then(() => {
          this.onLoad(this.page);
                    this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          this.$refs.crud.toggleSelection();
        });
                    })
                    this.$refs.crud.toggleSelection()
                })
    },
    beforeOpen(done, type) {
      if (["edit", "view"].includes(type)) {
        getGrid(this.form.id).then((res) => {
          this.form = res.data.data;
        });
                    this.form = res.data.data
                })
      }
      // con
      done();
            done()
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
            this.page.currentPage = currentPage
    },
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
            this.page.pageSize = pageSize
    },
    refreshChange() {
      this.onLoad(this.page, this.query);
            this.onLoad(this.page, this.query)
    },
    onLoad(page, params = {}) {
      const { dateTime } = this.query;
            const { dateTime } = this.query
      let values = {
        ...params,
      };
            }
      if (dateTime) {
        values = {
          ...params,
          startTime: dateTime[0],
          endTime: dateTime[1],
          ...this.query,
        };
        values.dateTime = null;
      }
      this.loading = true;
                values.dateTime = null
            }
            this.loading = true
      getList(page.currentPage, page.pageSize, values).then((res) => {
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        this.loading = false;
        this.selectionClear();
      });
                const data = res.data.data
                this.page.total = data.total
                this.data = data.records
                this.loading = false
                this.selectionClear()
            })
    }
  }
};
}
</script>
<style>
src/views/monitor/log/api.vue
@@ -1,26 +1,16 @@
<template>
  <basic-container>
    <avue-crud :option="option"
               :table-loading="loading"
               :data="data"
               ref="crud"
               v-model="form"
               :permission="permissionList"
               :before-open="beforeOpen"
               :page.sync="page"
               @search-change="searchChange"
               @search-reset="searchReset"
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad">
        <avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form"
            :permission="permissionList" :before-open="beforeOpen" :page.sync="page" @search-change="searchChange"
            @search-reset="searchReset" @current-change="currentChange" @size-change="sizeChange"
            @refresh-change="refreshChange" @on-load="onLoad">
    </avue-crud>
  </basic-container>
</template>
<script>
  import {getApiList, getApiLogs} from "@/api/logs";
  import {mapGetters} from "vuex";
import { getApiList, getApiLogs } from "@/api/logs"
import { mapGetters } from "vuex"
  export default {
    data() {
@@ -46,7 +36,7 @@
          editBtn: false,
          addBtn: false,
          delBtn: false,
          menuWidth: 120,
                menuWidth: 280,
          dialogType: 'drawer',
          column: [
            {
@@ -105,7 +95,7 @@
          ]
        },
        data: []
      };
        }
    },
    computed: {
@@ -113,49 +103,48 @@
      permissionList() {
        return {
          viewBtn: this.vaildData(this.permission.log_api_view, false)
        };
            }
      }
    },
    methods: {
      searchReset() {
        this.query = {};
        this.onLoad(this.page);
            this.query = {}
            this.onLoad(this.page)
      },
      searchChange(params, done) {
        this.query = params;
        this.page.currentPage = 1;
        this.onLoad(this.page, params);
        done();
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            done()
      },
      beforeOpen(done, type) {
        if (["edit", "view"].includes(type)) {
          getApiLogs(this.form.id).then(res => {
            this.form = res.data.data;
          });
                    this.form = res.data.data
                })
        }
        done();
            done()
      },
      currentChange(currentPage){
        this.page.currentPage = currentPage;
            this.page.currentPage = currentPage
      },
      sizeChange(pageSize){
        this.page.pageSize = pageSize;
            this.page.pageSize = pageSize
      },
      refreshChange() {
        this.onLoad(this.page, this.query);
            this.onLoad(this.page, this.query)
      },
      onLoad(page, params = {}) {
        this.loading = true;
            this.loading = true
        getApiList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
          const data = res.data.data;
          this.page.total = data.total;
          this.data = data.records;
          this.loading = false;
        });
                const data = res.data.data
                this.page.total = data.total
                this.data = data.records
                this.loading = false
            })
      }
    }
  };
}
</script>
<style>
</style>
<style></style>
src/views/monitor/log/error.vue
@@ -1,26 +1,16 @@
<template>
  <basic-container>
    <avue-crud :option="option"
               :table-loading="loading"
               :data="data"
               ref="crud"
               :before-open="beforeOpen"
               v-model="form"
               :permission="permissionList"
               :page.sync="page"
               @search-change="searchChange"
               @search-reset="searchReset"
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad">
        <avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" :before-open="beforeOpen"
            v-model="form" :permission="permissionList" :page.sync="page" @search-change="searchChange"
            @search-reset="searchReset" @current-change="currentChange" @size-change="sizeChange"
            @refresh-change="refreshChange" @on-load="onLoad">
    </avue-crud>
  </basic-container>
</template>
<script>
  import {getErrorList, getErrorLogs} from "@/api/logs";
  import {mapGetters} from "vuex";
import { getErrorList, getErrorLogs } from "@/api/logs"
import { mapGetters } from "vuex"
  export default {
    data() {
@@ -46,7 +36,7 @@
          editBtn: false,
          addBtn: false,
          delBtn: false,
          menuWidth: 120,
                menuWidth: 280,
          dialogType: 'drawer',
          column: [
            {
@@ -110,56 +100,55 @@
          ]
        },
        data: []
      };
        }
    },
    computed: {
      ...mapGetters(["permission"]),
      permissionList() {
        return {
          viewBtn: this.vaildData(this.permission.log_error_view, false)
        };
            }
      }
    },
    methods: {
      searchReset() {
        this.query = {};
        this.onLoad(this.page);
            this.query = {}
            this.onLoad(this.page)
      },
      searchChange(params, done) {
        this.query = params;
        this.page.currentPage = 1;
        this.onLoad(this.page, params);
        done();
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            done()
      },
      beforeOpen(done, type) {
        if (["edit", "view"].includes(type)) {
          getErrorLogs(this.form.id).then(res => {
            this.form = res.data.data;
          });
                    this.form = res.data.data
                })
        }
        done();
            done()
      },
      currentChange(currentPage){
        this.page.currentPage = currentPage;
            this.page.currentPage = currentPage
      },
      sizeChange(pageSize){
        this.page.pageSize = pageSize;
            this.page.pageSize = pageSize
      },
      refreshChange() {
        this.onLoad(this.page, this.query);
            this.onLoad(this.page, this.query)
      },
      onLoad(page, params = {}) {
        this.loading = true;
            this.loading = true
        getErrorList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
          const data = res.data.data;
          this.page.total = data.total;
          this.data = data.records;
          this.loading = false;
        });
                const data = res.data.data
                this.page.total = data.total
                this.data = data.records
                this.loading = false
            })
      }
    }
  };
}
</script>
<style>
</style>
<style></style>
src/views/monitor/log/usual.vue
@@ -1,26 +1,16 @@
<template>
  <basic-container>
    <avue-crud :option="option"
               :table-loading="loading"
               :data="data"
               ref="crud"
               v-model="form"
               :permission="permissionList"
               :page.sync="page"
               :before-open="beforeOpen"
               @search-change="searchChange"
               @search-reset="searchReset"
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad">
        <avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form"
            :permission="permissionList" :page.sync="page" :before-open="beforeOpen" @search-change="searchChange"
            @search-reset="searchReset" @current-change="currentChange" @size-change="sizeChange"
            @refresh-change="refreshChange" @on-load="onLoad">
    </avue-crud>
  </basic-container>
</template>
<script>
  import {getUsualList, getUsualLogs} from "@/api/logs";
  import {mapGetters} from "vuex";
import { getUsualList, getUsualLogs } from "@/api/logs"
import { mapGetters } from "vuex"
  export default {
    data() {
@@ -46,7 +36,7 @@
          editBtn: false,
          addBtn: false,
          delBtn: false,
          menuWidth: 120,
                menuWidth: 280,
          dialogType: 'drawer',
          column: [
            {
@@ -110,56 +100,55 @@
          ]
        },
        data: []
      };
        }
    },
    computed: {
      ...mapGetters(["permission"]),
      permissionList() {
        return {
          viewBtn: this.vaildData(this.permission.log_usual_view, false)
        };
            }
      }
    },
    methods: {
      searchReset() {
        this.query = {};
        this.onLoad(this.page);
            this.query = {}
            this.onLoad(this.page)
      },
      searchChange(params, done) {
        this.query = params;
        this.page.currentPage = 1;
        this.onLoad(this.page, params);
        done();
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            done()
      },
      beforeOpen(done, type) {
        if (["edit", "view"].includes(type)) {
          getUsualLogs(this.form.id).then(res => {
            this.form = res.data.data;
          });
                    this.form = res.data.data
                })
        }
        done();
            done()
      },
      currentChange(currentPage){
        this.page.currentPage = currentPage;
            this.page.currentPage = currentPage
      },
      sizeChange(pageSize){
        this.page.pageSize = pageSize;
            this.page.pageSize = pageSize
      },
      refreshChange() {
        this.onLoad(this.page, this.query);
            this.onLoad(this.page, this.query)
      },
      onLoad(page, params = {}) {
        this.loading = true;
            this.loading = true
        getUsualList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
          const data = res.data.data;
          this.page.total = data.total;
          this.data = data.records;
          this.loading = false;
        });
                const data = res.data.data
                this.page.total = data.total
                this.data = data.records
                this.loading = false
            })
      }
    }
  };
}
</script>
<style>
</style>
<style></style>
src/views/place/index.vue
@@ -1,9 +1,10 @@
<template>
  <basic-container>
    <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
      v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
      @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
      @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
            v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave"
            :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset"
            @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
            @refresh-change="refreshChange" @on-load="onLoad">
      <template slot="menuLeft">
        <el-button size="small" icon="el-icon-delete" plain v-if="permission.place_delete" @click="handleDelete">删 除
        </el-button>
@@ -18,8 +19,9 @@
    <el-dialog title="场所维护" append-to-body :visible.sync="roleBox" center>
      <avue-crud :option="placeOption" :search.sync="search" :table-loading="loading" :data="placeExt" ref="crud"
        v-model="houseHoldForm" :permission="permissionList" @row-del="houseHoldRowDel" @row-update="houseHoldRowUpdate"
        @row-save="houseHoldRowSave" :page.sync="holdPage" @current-change="currentChange" @size-change="sizeChange">
                v-model="houseHoldForm" :permission="permissionList" @row-del="houseHoldRowDel"
                @row-update="houseHoldRowUpdate" @row-save="houseHoldRowSave" :page.sync="holdPage"
                @current-change="currentChange" @size-change="sizeChange">
      </avue-crud>
      <avue-form :option="optionDetail" v-model="placeForm"></avue-form>
@@ -42,11 +44,11 @@
    getPlace,
    getPlaceExt,
    updatePlaceExt
  } from "@/api/place/place";
} from "@/api/place/place"
  import {
    mapGetters
  } from "vuex";
  import website from '@/config/website';
} from "vuex"
import website from '@/config/website'
  export default {
    data() {
      return {
@@ -136,7 +138,7 @@
          tip: false,
          searchShow: true,
          searchMenuSpan: 3,
          menuWidth: 350,
                menuWidth: 280,
          border: true,
          //stripe:true,
          index: true,
@@ -240,7 +242,7 @@
          ],
        },
        data: [],
      };
        }
    },
    watch: {},
    computed: {
@@ -251,14 +253,14 @@
          viewBtn: this.vaildData(this.permission.place_view, true),
          delBtn: this.vaildData(this.permission.place_delete, true),
          editBtn: this.vaildData(this.permission.place_edit, true),
        };
            }
      },
      ids() {
        let ids = [];
            let ids = []
        this.selectionList.forEach((ele) => {
          ids.push(ele.id);
        });
        return ids.join(",");
                ids.push(ele.id)
            })
            return ids.join(",")
      },
    },
    methods: {
@@ -272,7 +274,7 @@
          legalTel: '',
          localtion: '',
          confirmFlag: '',
        };
            }
        this.placeExt = []
        this.onLoadPlaceExt()
      },
@@ -283,14 +285,14 @@
            this.$message({
              type: "success",
              message: "操作成功!",
            });
                    })
            this.roleBox = false
          },
          (error) => {
            window.console.log(error);
            loading();
                    window.console.log(error)
                    loading()
          }
        );
            )
      },
      onLoadPlaceExt() {
@@ -298,65 +300,65 @@
          placeId: this.rowPlace.id,
        }
        getPlaceExt(Object.assign(params)).then(res => {
          const data = res.data.data;
                const data = res.data.data
          if (data) {
            this.placeForm = data;
            this.placeExt = data.placePractitioner;
            this.loading = false;
            this.selectionClear();
                    this.placeForm = data
                    this.placeExt = data.placePractitioner
                    this.loading = false
                    this.selectionClear()
          }
        });
            })
      },
      rowSave(row, done, loading) {
        if (row.imageUrls.length > 0) {
          var urls = []
          var split = row.imageUrls.split(",");
                var split = row.imageUrls.split(",")
          split.forEach(url => {
            var names = url.split("jczz/");
                    var names = url.split("jczz/")
            urls.push(names[1])
          })
          row.imageUrls = urls.join(",")
        }
        add(row).then(
          () => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            });
            done();
                    })
                    done()
          },
          (error) => {
            window.console.log(error);
            loading();
                    window.console.log(error)
                    loading()
          }
        );
            )
      },
      rowUpdate(row, index, done, loading) {
        if (row.imageUrls.length > 0) {
          var urls = []
          var split = row.imageUrls.split(",");
                var split = row.imageUrls.split(",")
          split.forEach(url => {
            var names = url.split("jczz/");
                    var names = url.split("jczz/")
            urls.push(names[1])
          })
          row.imageUrls = urls.join(",")
        }
        update(row).then(
          () => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            });
            done();
                    })
                    done()
          },
          (error) => {
            window.console.log(error);
            loading();
                    window.console.log(error)
                    loading()
          }
        );
            )
      },
      rowDel(row) {
        this.$confirm("确定将选择数据删除?", {
@@ -365,37 +367,37 @@
            type: "warning",
          })
          .then(() => {
            return remove(row.id);
                    return remove(row.id)
          })
          .then(() => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            });
          });
                    })
                })
      },
      searchReset() {
        this.query = {};
        this.onLoad(this.page);
            this.query = {}
            this.onLoad(this.page)
      },
      searchChange(params, done) {
        this.query = params;
        this.page.currentPage = 1;
        this.onLoad(this.page, params);
        done();
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            done()
      },
      selectionChange(list) {
        this.selectionList = list;
            this.selectionList = list
      },
      selectionClear() {
        this.selectionList = [];
        this.$refs.crud.toggleSelection();
            this.selectionList = []
            this.$refs.crud.toggleSelection()
      },
      handleDelete() {
        if (this.selectionList.length === 0) {
          this.$message.warning("请选择至少一条数据");
          return;
                this.$message.warning("请选择至少一条数据")
                return
        }
        this.$confirm("确定将选择数据删除?", {
            confirmButtonText: "确定",
@@ -403,25 +405,25 @@
            type: "warning",
          })
          .then(() => {
            return remove(this.ids);
                    return remove(this.ids)
          })
          .then(() => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            });
            this.$refs.crud.toggleSelection();
          });
                    })
                    this.$refs.crud.toggleSelection()
                })
      },
      beforeOpen(done, type) {
        if (["edit", "view"].includes(type)) {
          getPlace(this.form.id).then((res) => {
            this.form = res.data.data;
                    this.form = res.data.data
            if (this.form.imageUrls) {
              if (this.form.imageUrls.length > 0) {
                var urls = []
                var names = this.form.imageUrls.split(",");
                            var names = this.form.imageUrls.split(",")
                names.forEach(name => {
                  urls.push(website.minioUrl + name)
                })
@@ -431,51 +433,51 @@
            if (this.form.placePoiLabelVOList) {
              var arr = []
              this.form.placePoiLabelVOList.forEach(item => {
                arr.push(item.poiCode);
                            arr.push(item.poiCode)
              })
              this.form.label = arr.join(",")
            }
            console.log(this.form, 888888)
          });
                })
        }
        // con
        done();
            done()
      },
      currentChange(currentPage) {
        this.page.currentPage = currentPage;
            this.page.currentPage = currentPage
      },
      sizeChange(pageSize) {
        this.page.pageSize = pageSize;
            this.page.pageSize = pageSize
      },
      refreshChange() {
        this.onLoad(this.page, this.query);
            this.onLoad(this.page, this.query)
      },
      onLoad(page, params = {}) {
        const {
          dateTime
        } = this.query;
            } = this.query
        let values = {
          ...params,
        };
            }
        if (dateTime) {
          values = {
            ...params,
            startTime: dateTime[0],
            endTime: dateTime[1],
            ...this.query,
          };
          values.dateTime = null;
        }
        this.loading = true;
                values.dateTime = null
            }
            this.loading = true
        getList(page.currentPage, page.pageSize, values).then((res) => {
          const data = res.data.data;
          this.page.total = data.total;
          this.data = data.records;
                const data = res.data.data
                this.page.total = data.total
                this.data = data.records
          this.data.forEach(item => {
            if (item.imageUrls) {
              if (item.imageUrls.length > 0) {
                var urls = []
                var names = item.imageUrls.split(",");
                            var names = item.imageUrls.split(",")
                names.forEach(name => {
                  urls.push(website.minioUrl + name)
                })
@@ -483,12 +485,12 @@
              }
            }
          })
          this.loading = false;
          this.selectionClear();
        });
                this.loading = false
                this.selectionClear()
            })
      }
    }
  };
}
</script>
<style>
src/views/rotation/index.vue
@@ -1,35 +1,14 @@
<!-- 工作日志 -->
<!-- 走访日志 -->
<template>
  <basic-container>
    <avue-crud
      :option="option"
      :table-loading="loading"
      :data="data"
      :page.sync="page"
      ref="crud"
      @row-del="rowDel"
      v-model="form"
      :permission="permissionList"
      @row-update="rowUpdate"
      @row-save="rowSave"
      :before-open="beforeOpen"
      @search-change="searchChange"
      @search-reset="searchReset"
      @selection-change="selectionChange"
      @current-change="currentChange"
      @size-change="sizeChange"
      @refresh-change="refreshChange"
      @on-load="onLoad"
    >
        <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
            v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave"
            :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset"
            @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
            @refresh-change="refreshChange" @on-load="onLoad">
      <template slot="menuLeft">
        <el-button
          size="small"
          icon="el-icon-delete"
          plain
          v-if="permission.article_delete"
          @click="handleDelete"
        >删 除
                <el-button size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删
                    除
        </el-button>
      </template>
    </avue-crud>
@@ -37,9 +16,9 @@
</template>
<script>
  import {getList, remove, update, add, getRotation} from "@/api/rotation/rotation";
  import {mapGetters} from "vuex";
  import website from '@/config/website';
import { getList, remove, update, add, getRotation } from "@/api/rotation/rotation"
import { mapGetters } from "vuex"
import website from '@/config/website'
  export default {
    data() {
@@ -111,7 +90,7 @@
          ],
        },
        data: [],
      };
        }
    },
    watch: {
    },
@@ -123,66 +102,66 @@
          viewBtn: this.vaildData(this.permission.rotation_view, true),
          delBtn: this.vaildData(this.permission.rotation_delete, true),
          editBtn: this.vaildData(this.permission.rotation_edit, true),
        };
            }
      },
      ids() {
        let ids = [];
            let ids = []
        this.selectionList.forEach((ele) => {
          ids.push(ele.id);
        });
        return ids.join(",");
                ids.push(ele.id)
            })
            return ids.join(",")
      },
    },
    methods: {
      rowSave(row, done, loading) {
        if(row.url.length>0){
          var urls = []
          var split = row.url.split(",");
                var split = row.url.split(",")
          split.forEach(url=>{
             var names = url.split("jczz/");
                    var names = url.split("jczz/")
             urls.push(names[1])
          })
          row.url = urls.join(",")
        }
        add(row).then(
          () => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            });
            done();
                    })
                    done()
          },
          (error) => {
            window.console.log(error);
            loading();
                    window.console.log(error)
                    loading()
          }
        );
            )
      },
      rowUpdate(row, index, done, loading) {
        if(row.url.length>0){
          var urls = []
          var split = row.url.split(",");
                var split = row.url.split(",")
          split.forEach(url=>{
             var names = url.split("jczz/");
                    var names = url.split("jczz/")
             urls.push(names[1])
          })
          row.url = urls.join(",")
        }
        update(row).then(
          () => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            });
            done();
                    })
                    done()
          },
          (error) => {
            window.console.log(error);
            loading();
                    window.console.log(error)
                    loading()
          }
        );
            )
      },
      rowDel(row) {
        this.$confirm("确定将选择数据删除?", {
@@ -191,37 +170,37 @@
          type: "warning",
        })
          .then(() => {
            return remove(row.id);
                    return remove(row.id)
          })
          .then(() => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            });
          });
                    })
                })
      },
      searchReset() {
        this.query = {};
        this.onLoad(this.page);
            this.query = {}
            this.onLoad(this.page)
      },
      searchChange(params, done) {
        this.query = params;
        this.page.currentPage = 1;
        this.onLoad(this.page, params);
        done();
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            done()
      },
      selectionChange(list) {
        this.selectionList = list;
            this.selectionList = list
      },
      selectionClear() {
        this.selectionList = [];
        this.$refs.crud.toggleSelection();
            this.selectionList = []
            this.$refs.crud.toggleSelection()
      },
      handleDelete() {
        if (this.selectionList.length === 0) {
          this.$message.warning("请选择至少一条数据");
          return;
                this.$message.warning("请选择至少一条数据")
                return
        }
        this.$confirm("确定将选择数据删除?", {
          confirmButtonText: "确定",
@@ -229,78 +208,78 @@
          type: "warning",
        })
          .then(() => {
            return remove(this.ids);
                    return remove(this.ids)
          })
          .then(() => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            });
            this.$refs.crud.toggleSelection();
          });
                    })
                    this.$refs.crud.toggleSelection()
                })
      },
      beforeOpen(done, type) {
        if (["edit", "view"].includes(type)) {
          getRotation(this.form.id).then((res) => {
            this.form = res.data.data;
                    this.form = res.data.data
            if(this.form.url.length>0){
              var urls = []
              var names = this.form.url.split(",");
                        var names = this.form.url.split(",")
              names.forEach(name=>{
                urls.push(website.minioUrl + name)
              })
              this.form.url = urls.join(",")
            }
          });
                })
        }
        // con
        done();
            done()
      },
      currentChange(currentPage) {
        this.page.currentPage = currentPage;
            this.page.currentPage = currentPage
      },
      sizeChange(pageSize) {
        this.page.pageSize = pageSize;
            this.page.pageSize = pageSize
      },
      refreshChange() {
        this.onLoad(this.page, this.query);
            this.onLoad(this.page, this.query)
      },
      onLoad(page, params = {}) {
        const {dateTime} = this.query;
            const { dateTime } = this.query
        let values = {
          ...params,
        };
            }
        if (dateTime) {
          values = {
            ...params,
            startTime: dateTime[0],
            endTime: dateTime[1],
            ...this.query,
          };
          values.dateTime = null;
        }
        this.loading = true;
                values.dateTime = null
            }
            this.loading = true
        getList(page.currentPage, page.pageSize, values).then((res) => {
          const data = res.data.data;
          this.page.total = data.total;
          this.data = data.records;
                const data = res.data.data
                this.page.total = data.total
                this.data = data.records
          this.data.forEach(item=>{
            if(item.url.length>0){
              var urls = []
              var names = item.url.split(",");
                        var names = item.url.split(",")
              names.forEach(name=>{
                urls.push(website.minioUrl + name)
              })
              item.url = urls.join(",")
            }
          })
          this.loading = false;
          this.selectionClear();
        });
                this.loading = false
                this.selectionClear()
            })
      }
    },
  };
}
</script>
<style>
src/views/task/eCall/index.vue
@@ -2,11 +2,13 @@
<template>
  <basic-container>
    <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
      v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
      @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
      @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
            v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave"
            :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset"
            @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
            @refresh-change="refreshChange" @on-load="onLoad">
      <template slot="menuLeft">
        <el-button size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删 除
                <el-button size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删
                    除
        </el-button>
      </template>
    </avue-crud>
@@ -14,14 +16,14 @@
</template>
<script>
import { getList, remove, update, add, getECallEvent } from "@/api/task/eCall";
import { getList, remove, update, add, getECallEvent } from "@/api/task/eCall"
import {
  getList as getHouseList,
  getDetatil as getHouseDetail
} from "@/api/doorplateAddress/doorplateAddress.js";
import { mapGetters } from "vuex";
import website from '@/config/website';
import AvueMap from "avue-plugin-map";
} from "@/api/doorplateAddress/doorplateAddress.js"
import { mapGetters } from "vuex"
import website from '@/config/website'
// import AvueMap from "avue-plugin-map"
export default {
  data() {
    return {
@@ -42,7 +44,7 @@
        tip: false,
        searchShow: true,
        searchMenuSpan: 3,
        menuWidth: 220,
                menuWidth: 280,
        border: true,
        //stripe:true,
        index: true,
@@ -91,11 +93,11 @@
          {
            label: "所属社区",
            prop: "communityCode",
            // search: true,
            // searchSpan: 4,
                        search: true,
                        searchSpan: 4,
            width: 150,
            type: "tree",
            dicUrl: "/api/blade-system/region/tree?parentCode=361102005",
                        dicUrl: "/api/blade-system/region/tree",
            props: {
              label: "name",
              value: "id"
@@ -236,30 +238,30 @@
                getHouseDetail({
                  addressCode: value
                }).then(res => {
                  var resData = res.data.data;
                                    var resData = res.data.data
                  // 查询对应行数据
                  callback(resData)
                  return
                });
                                })
              }
              if (page) {
                this.loading = true;
                                this.loading = true
                var params = {
                  ...data,
                  townStreetCode: "361102005"
                }
                getHouseList(page.currentPage, page.pageSize, Object.assign(params)).then(res => {
                  const resData = res.data.data;
                  var total = resData.total;
                  var data = resData.records;
                  this.loading = false;
                  this.selectionClear();
                                    const resData = res.data.data
                                    var total = resData.total
                                    var data = resData.records
                                    this.loading = false
                                    this.selectionClear()
                  //分页查询信息
                  callback({
                    total: total,
                    data: data
                  })
                });
                                })
              }
            },
            props: {
@@ -322,21 +324,19 @@
        ],
      },
      data: [],
    };
        }
  },
  watch: {
    "form.location": {
      // form是表单或者表格绑定的数据集,v-model='form'
      handler(val) {
        var that = this;
        if (typeof val == "string") {
          console.log(val,7777)
          var arr = val.split(",");
                    var arr = val.split(",")
          console.log(val,88888)
          //经纬度替换
          this.form.lat = arr[1];
          this.form.lng = arr[0];
                    this.form.lat = arr[1]
                    this.form.lng = arr[0]
          // this.form.location = arr[2];
        }
      },
@@ -351,66 +351,66 @@
        viewBtn: this.vaildData(this.permission.eCallEvent_view, true),
        delBtn: this.vaildData(this.permission.eCallEvent_delete, true),
        editBtn: this.vaildData(this.permission.eCallEvent_edit, true),
      };
            }
    },
    ids() {
      let ids = [];
            let ids = []
      this.selectionList.forEach((ele) => {
        ids.push(ele.id);
      });
      return ids.join(",");
                ids.push(ele.id)
            })
            return ids.join(",")
    },
  },
  methods: {
    rowSave(row, done, loading) {
      if (row.imageUrls.length > 0) {
        var urls = []
        var split = row.imageUrls.split(",");
                var split = row.imageUrls.split(",")
        split.forEach(url => {
          var names = url.split("jczz/");
                    var names = url.split("jczz/")
          urls.push(names[1])
        })
        row.imageUrls = urls.join(",")
      }
      add(row).then(
        () => {
          this.onLoad(this.page);
                    this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
                    })
                    done()
        },
        (error) => {
          window.console.log(error);
          loading();
                    window.console.log(error)
                    loading()
        }
      );
            )
    },
    rowUpdate(row, index, done, loading) {
      if (row.imageUrls.length > 0) {
        var urls = []
        var split = row.imageUrls.split(",");
                var split = row.imageUrls.split(",")
        split.forEach(url => {
          var names = url.split("jczz/");
                    var names = url.split("jczz/")
          urls.push(names[1])
        })
        row.imageUrls = urls.join(",")
      }
      update(row).then(
        () => {
          this.onLoad(this.page);
                    this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
                    })
                    done()
        },
        (error) => {
          window.console.log(error);
          loading();
                    window.console.log(error)
                    loading()
        }
      );
            )
    },
    rowDel(row) {
      this.$confirm("确定将选择数据删除?", {
@@ -419,37 +419,37 @@
        type: "warning",
      })
        .then(() => {
          return remove(row.id);
                    return remove(row.id)
        })
        .then(() => {
          this.onLoad(this.page);
                    this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!",
          });
        });
                    })
                })
    },
    searchReset() {
      this.query = {};
      this.onLoad(this.page);
            this.query = {}
            this.onLoad(this.page)
    },
    searchChange(params, done) {
      this.query = params;
      this.page.currentPage = 1;
      this.onLoad(this.page, params);
      done();
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            done()
    },
    selectionChange(list) {
      this.selectionList = list;
            this.selectionList = list
    },
    selectionClear() {
      this.selectionList = [];
      this.$refs.crud.toggleSelection();
            this.selectionList = []
            this.$refs.crud.toggleSelection()
    },
    handleDelete() {
      if (this.selectionList.length === 0) {
        this.$message.warning("请选择至少一条数据");
        return;
                this.$message.warning("请选择至少一条数据")
                return
      }
      this.$confirm("确定将选择数据删除?", {
        confirmButtonText: "确定",
@@ -457,67 +457,67 @@
        type: "warning",
      })
        .then(() => {
          return remove(this.ids);
                    return remove(this.ids)
        })
        .then(() => {
          this.onLoad(this.page);
                    this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          this.$refs.crud.toggleSelection();
        });
                    })
                    this.$refs.crud.toggleSelection()
                })
    },
    beforeOpen(done, type) {
      if (["edit", "view"].includes(type)) {
        getECallEvent(this.form.id).then((res) => {
          this.form = res.data.data;
                    this.form = res.data.data
          if (this.form.imageUrls.length > 0) {
            var urls = []
            var names = this.form.imageUrls.split(",");
                        var names = this.form.imageUrls.split(",")
            names.forEach(name => {
              urls.push(website.minioUrl + name)
            })
            this.form.imageUrls = urls.join(",")
          }
        });
                })
      }
      // con
      done();
            done()
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
            this.page.currentPage = currentPage
    },
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
            this.page.pageSize = pageSize
    },
    refreshChange() {
      this.onLoad(this.page, this.query);
            this.onLoad(this.page, this.query)
    },
    onLoad(page, params = {}) {
      const { dateTime } = this.query;
            const { dateTime } = this.query
      let values = {
        ...params,
      };
            }
      if (dateTime) {
        values = {
          ...params,
          startTime: dateTime[0],
          endTime: dateTime[1],
          ...this.query,
        };
        values.dateTime = null;
      }
      this.loading = true;
                values.dateTime = null
            }
            this.loading = true
      getList(page.currentPage, page.pageSize, values).then((res) => {
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
                const data = res.data.data
                this.page.total = data.total
                this.data = data.records
        this.data.forEach(item => {
          if (item.imageUrls) {
            if (item.imageUrls.length > 0) {
              var urls = []
              var names = item.imageUrls.split(",");
                            var names = item.imageUrls.split(",")
              names.forEach(name => {
                urls.push(website.minioUrl + name)
              })
@@ -525,12 +525,12 @@
            }
          }
        })
        this.loading = false;
        this.selectionClear();
      });
                this.loading = false
                this.selectionClear()
            })
    }
  },
};
}
</script>
<style>
src/views/task/index.vue
@@ -1,12 +1,14 @@
<!-- 工作日志 -->
<!-- 走访日志 -->
<template>
  <basic-container>
    <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
      v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
      @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
      @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
            v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave"
            :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset"
            @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
            @refresh-change="refreshChange" @on-load="onLoad">
      <template slot="menuLeft">
        <el-button size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删 除
                <el-button size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删
                    除
        </el-button>
      </template>
      <!-- <template slot-scope="scope" slot="menu">
@@ -23,9 +25,9 @@
</template>
<script>
import { getList, remove, update, add, getReportForRepairs } from "@/api/task/reportForRepairs";
import { mapGetters } from "vuex";
import website from '@/config/website';
import { getList, remove, update, add, getReportForRepairs } from "@/api/task/reportForRepairs"
import { mapGetters } from "vuex"
import website from '@/config/website'
export default {
  data() {
@@ -175,7 +177,7 @@
        ],
      },
      data: [],
    };
        }
  },
  watch: {
  },
@@ -187,14 +189,14 @@
        viewBtn: this.vaildData(this.permission.reportForRepairs_view, true),
        delBtn: this.vaildData(this.permission.reportForRepairs_delete, false),
        editBtn: this.vaildData(this.permission.reportForRepairs_edit, true),
      };
            }
    },
    ids() {
      let ids = [];
            let ids = []
      this.selectionList.forEach((ele) => {
        ids.push(ele.id);
      });
      return ids.join(",");
                ids.push(ele.id)
            })
            return ids.join(",")
    },
  },
  methods: {
@@ -208,52 +210,52 @@
    rowSave(row, done, loading) {
      if (row.imageUrls.length > 0) {
        var urls = []
        var split = row.imageUrls.split(",");
                var split = row.imageUrls.split(",")
        split.forEach(url => {
          var names = url.split("jczz/");
                    var names = url.split("jczz/")
          urls.push(names[1])
        })
        row.imageUrls = urls.join(",")
      }
      add(row).then(
        () => {
          this.onLoad(this.page);
                    this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
                    })
                    done()
        },
        (error) => {
          window.console.log(error);
          loading();
                    window.console.log(error)
                    loading()
        }
      );
            )
    },
    rowUpdate(row, index, done, loading) {
      if (row.imageUrls.length > 0) {
        var urls = []
        var split = row.imageUrls.split(",");
                var split = row.imageUrls.split(",")
        split.forEach(url => {
          var names = url.split("jczz/");
                    var names = url.split("jczz/")
          urls.push(names[1])
        })
        row.imageUrls = urls.join(",")
      }
      update(row).then(
        () => {
          this.onLoad(this.page);
                    this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
                    })
                    done()
        },
        (error) => {
          window.console.log(error);
          loading();
                    window.console.log(error)
                    loading()
        }
      );
            )
    },
    rowDel(row) {
      this.$confirm("确定将选择数据删除?", {
@@ -262,37 +264,37 @@
        type: "warning",
      })
        .then(() => {
          return remove(row.id);
                    return remove(row.id)
        })
        .then(() => {
          this.onLoad(this.page);
                    this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!",
          });
        });
                    })
                })
    },
    searchReset() {
      this.query = {};
      this.onLoad(this.page);
            this.query = {}
            this.onLoad(this.page)
    },
    searchChange(params, done) {
      this.query = params;
      this.page.currentPage = 1;
      this.onLoad(this.page, params);
      done();
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            done()
    },
    selectionChange(list) {
      this.selectionList = list;
            this.selectionList = list
    },
    selectionClear() {
      this.selectionList = [];
      this.$refs.crud.toggleSelection();
            this.selectionList = []
            this.$refs.crud.toggleSelection()
    },
    handleDelete() {
      if (this.selectionList.length === 0) {
        this.$message.warning("请选择至少一条数据");
        return;
                this.$message.warning("请选择至少一条数据")
                return
      }
      this.$confirm("确定将选择数据删除?", {
        confirmButtonText: "确定",
@@ -300,69 +302,69 @@
        type: "warning",
      })
        .then(() => {
          return remove(this.ids);
                    return remove(this.ids)
        })
        .then(() => {
          this.onLoad(this.page);
                    this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          this.$refs.crud.toggleSelection();
        });
                    })
                    this.$refs.crud.toggleSelection()
                })
    },
    beforeOpen(done, type) {
      if (["edit", "view"].includes(type)) {
        getReportForRepairs(this.form.id).then((res) => {
          this.form = res.data.data;
                    this.form = res.data.data
          if (this.form.imageUrls) {
            if (this.form.imageUrls.length > 0) {
              var urls = []
              var names = this.form.imageUrls.split(",");
                            var names = this.form.imageUrls.split(",")
              names.forEach(name => {
                urls.push(website.minioUrl + name)
              })
              this.form.imageUrls = urls.join(",")
            }
          }
        });
                })
      }
      // con
      done();
            done()
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
            this.page.currentPage = currentPage
    },
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
            this.page.pageSize = pageSize
    },
    refreshChange() {
      this.onLoad(this.page, this.query);
            this.onLoad(this.page, this.query)
    },
    onLoad(page, params = {}) {
      const { dateTime } = this.query;
            const { dateTime } = this.query
      let values = {
        ...params,
      };
            }
      if (dateTime) {
        values = {
          ...params,
          startTime: dateTime[0],
          endTime: dateTime[1],
          ...this.query,
        };
        values.dateTime = null;
      }
      this.loading = true;
                values.dateTime = null
            }
            this.loading = true
      getList(page.currentPage, page.pageSize, values).then((res) => {
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
                const data = res.data.data
                this.page.total = data.total
                this.data = data.records
        this.data.forEach(item => {
          if (item.imageUrls) {
            if (item.imageUrls.length > 0) {
              var urls = []
              var names = item.imageUrls.split(",");
                            var names = item.imageUrls.split(",")
              names.forEach(name => {
                urls.push(website.minioUrl + name)
              })
@@ -370,12 +372,12 @@
            }
          }
        })
        this.loading = false;
        this.selectionClear();
      });
                this.loading = false
                this.selectionClear()
            })
    }
  },
};
}
</script>
<style>
src/views/task/reportForRepairs.vue
@@ -1,12 +1,14 @@
<!-- 工作日志 -->
<!-- 走访日志 -->
<template>
  <basic-container>
    <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
      v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
      @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
      @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
            v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave"
            :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset"
            @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
            @refresh-change="refreshChange" @on-load="onLoad">
      <template slot="menuLeft">
        <el-button size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删 除
                <el-button size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删
                    除
        </el-button>
      </template>
    </avue-crud>
@@ -14,9 +16,9 @@
</template>
<script>
import { getList, remove, update, add, getReportForRepairs } from "@/api/task/reportForRepairs";
import { mapGetters } from "vuex";
import website from '@/config/website';
import { getList, remove, update, add, getReportForRepairs } from "@/api/task/reportForRepairs"
import { mapGetters } from "vuex"
import website from '@/config/website'
export default {
  data() {
@@ -119,7 +121,7 @@
        ],
      },
      data: [],
    };
        }
  },
  watch: {
  },
@@ -131,66 +133,66 @@
        viewBtn: this.vaildData(this.permission.reportForRepairs_view, true),
        delBtn: this.vaildData(this.permission.reportForRepairs_delete, true),
        editBtn: this.vaildData(this.permission.reportForRepairs_edit, true),
      };
            }
    },
    ids() {
      let ids = [];
            let ids = []
      this.selectionList.forEach((ele) => {
        ids.push(ele.id);
      });
      return ids.join(",");
                ids.push(ele.id)
            })
            return ids.join(",")
    },
  },
  methods: {
    rowSave(row, done, loading) {
      if (row.imageUrls.length > 0) {
        var urls = []
        var split = row.imageUrls.split(",");
                var split = row.imageUrls.split(",")
        split.forEach(url => {
          var names = url.split("jczz/");
                    var names = url.split("jczz/")
          urls.push(names[1])
        })
        row.imageUrls = urls.join(",")
      }
      add(row).then(
        () => {
          this.onLoad(this.page);
                    this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
                    })
                    done()
        },
        (error) => {
          window.console.log(error);
          loading();
                    window.console.log(error)
                    loading()
        }
      );
            )
    },
    rowUpdate(row, index, done, loading) {
      if (row.imageUrls.length > 0) {
        var urls = []
        var split = row.imageUrls.split(",");
                var split = row.imageUrls.split(",")
        split.forEach(url => {
          var names = url.split("jczz/");
                    var names = url.split("jczz/")
          urls.push(names[1])
        })
        row.imageUrls = urls.join(",")
      }
      update(row).then(
        () => {
          this.onLoad(this.page);
                    this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
                    })
                    done()
        },
        (error) => {
          window.console.log(error);
          loading();
                    window.console.log(error)
                    loading()
        }
      );
            )
    },
    rowDel(row) {
      this.$confirm("确定将选择数据删除?", {
@@ -199,37 +201,37 @@
        type: "warning",
      })
        .then(() => {
          return remove(row.id);
                    return remove(row.id)
        })
        .then(() => {
          this.onLoad(this.page);
                    this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!",
          });
        });
                    })
                })
    },
    searchReset() {
      this.query = {};
      this.onLoad(this.page);
            this.query = {}
            this.onLoad(this.page)
    },
    searchChange(params, done) {
      this.query = params;
      this.page.currentPage = 1;
      this.onLoad(this.page, params);
      done();
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            done()
    },
    selectionChange(list) {
      this.selectionList = list;
            this.selectionList = list
    },
    selectionClear() {
      this.selectionList = [];
      this.$refs.crud.toggleSelection();
            this.selectionList = []
            this.$refs.crud.toggleSelection()
    },
    handleDelete() {
      if (this.selectionList.length === 0) {
        this.$message.warning("请选择至少一条数据");
        return;
                this.$message.warning("请选择至少一条数据")
                return
      }
      this.$confirm("确定将选择数据删除?", {
        confirmButtonText: "确定",
@@ -237,69 +239,69 @@
        type: "warning",
      })
        .then(() => {
          return remove(this.ids);
                    return remove(this.ids)
        })
        .then(() => {
          this.onLoad(this.page);
                    this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          this.$refs.crud.toggleSelection();
        });
                    })
                    this.$refs.crud.toggleSelection()
                })
    },
    beforeOpen(done, type) {
      if (["edit", "view"].includes(type)) {
        getReportForRepairs(this.form.id).then((res) => {
          this.form = res.data.data;
                    this.form = res.data.data
          if (this.form.imageUrls) {
            if (this.form.imageUrls.length > 0) {
              var urls = []
              var names = this.form.imageUrls.split(",");
                            var names = this.form.imageUrls.split(",")
              names.forEach(name => {
                urls.push(website.minioUrl + name)
              })
              this.form.imageUrls = urls.join(",")
            }
          }
        });
                })
      }
      // con
      done();
            done()
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
            this.page.currentPage = currentPage
    },
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
            this.page.pageSize = pageSize
    },
    refreshChange() {
      this.onLoad(this.page, this.query);
            this.onLoad(this.page, this.query)
    },
    onLoad(page, params = {}) {
      const { dateTime } = this.query;
            const { dateTime } = this.query
      let values = {
        ...params,
      };
            }
      if (dateTime) {
        values = {
          ...params,
          startTime: dateTime[0],
          endTime: dateTime[1],
          ...this.query,
        };
        values.dateTime = null;
      }
      this.loading = true;
                values.dateTime = null
            }
            this.loading = true
      getList(page.currentPage, page.pageSize, values).then((res) => {
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
                const data = res.data.data
                this.page.total = data.total
                this.data = data.records
        this.data.forEach(item => {
          if (item.imageUrls) {
            if (item.imageUrls.length > 0) {
              var urls = []
              var names = item.imageUrls.split(",");
                            var names = item.imageUrls.split(",")
              names.forEach(name => {
                urls.push(website.minioUrl + name)
              })
@@ -307,12 +309,12 @@
            }
          }
        })
        this.loading = false;
        this.selectionClear();
      });
                this.loading = false
                this.selectionClear()
            })
    }
  },
};
}
</script>
<style>
src/views/tool/code.vue
@@ -1,45 +1,20 @@
<template>
  <basic-container>
    <avue-crud :option="option"
               :table-loading="loading"
               :data="data"
               ref="crud"
               v-model="form"
               :permission="permissionList"
               :page.sync="page"
               @row-del="rowDel"
               @row-update="rowUpdate"
               @row-save="rowSave"
               :before-open="beforeOpen"
               @search-change="searchChange"
               @search-reset="searchReset"
               @selection-change="selectionChange"
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad">
        <avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form"
            :permission="permissionList" :page.sync="page" @row-del="rowDel" @row-update="rowUpdate" @row-save="rowSave"
            :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset"
            @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
            @refresh-change="refreshChange" @on-load="onLoad">
      <template slot="menuLeft">
        <el-button type="danger"
                   size="small"
                   icon="el-icon-delete"
                   v-if="permission.code_delete"
                   plain
                <el-button type="danger" size="small" icon="el-icon-delete" v-if="permission.code_delete" plain
                   @click="handleDelete">删 除
        </el-button>
        <el-button type="primary"
                   size="small"
                   plain
                   icon="el-icon-refresh"
                   @click="handleBuild">代码生成
                <el-button type="primary" size="small" plain icon="el-icon-refresh" @click="handleBuild">代码生成
        </el-button>
      </template>
      <template slot-scope="scope" slot="menu">
        <el-button type="text"
                   size="small"
                   icon="el-icon-document-copy"
                   v-if="permission.code_edit"
                   class="none-border"
                   @click.stop="handleCopy(scope.row)">复制
                <el-button type="text" size="small" icon="el-icon-document-copy" v-if="permission.code_edit"
                    class="none-border" @click.stop="handleCopy(scope.row)">复制
        </el-button>
      </template>
    </avue-crud>
@@ -47,11 +22,11 @@
</template>
<script>
  import {getList, getCode, build, remove, add, update, copy} from "@/api/tool/code";
  import {getDetail as modelDetail, prototypeDetail} from "@/api/tool/model";
  import {templateDic} from "@/const/tool/model";
  import {validatenull} from "@/util/validate";
  import {mapGetters} from "vuex";
import { getList, getCode, build, remove, add, update, copy } from "@/api/tool/code"
import { getDetail as modelDetail, prototypeDetail } from "@/api/tool/model"
import { templateDic } from "@/const/tool/model"
import { validatenull } from "@/util/validate"
import { mapGetters } from "vuex"
  export default {
    data() {
@@ -76,7 +51,7 @@
          index: true,
          selection: true,
          labelWidth: 120,
          menuWidth: 300,
                menuWidth: 280,
          viewBtn: true,
          dialogClickModal: false,
          tabs: true,
@@ -391,71 +366,71 @@
          ]
        },
        data: []
      };
        }
    },
    watch: {
      'form.modelId'() {
        if (!validatenull(this.form.modelId)) {
          // 获取数据模型信息
          modelDetail(this.form.modelId).then(res => {
            const result = res.data;
                    const result = res.data
            if (result.success) {
              const {modelName, modelTable, modelCode} = result.data;
                        const { modelName, modelTable, modelCode } = result.data
              if (validatenull(this.form.tablePrefix)) {
                this.form.tablePrefix = modelTable.split("_")[0] + "_";
                            this.form.tablePrefix = modelTable.split("_")[0] + "_"
              }
              if (validatenull(this.form.tableName)) {
                this.form.tableName = modelTable;
                            this.form.tableName = modelTable
              }
              if (validatenull(this.form.codeName)) {
                this.form.codeName = modelName;
                            this.form.codeName = modelName
              }
              if (validatenull(this.form.serviceName)) {
                this.form.serviceName = `blade-${modelCode}`;
                            this.form.serviceName = `blade-${modelCode}`
              }
              if (validatenull(this.form.pkName)) {
                this.form.pkName = "id";
                            this.form.pkName = "id"
              }
              if (validatenull(this.form.packageName)) {
                this.form.packageName = `org.springblade.modules.${modelCode}`;
                            this.form.packageName = `org.springblade.modules.${modelCode}`
              }
              if (validatenull(this.form.subFkId) && !validatenull(this.form.tablePrefix)) {
                this.form.subFkId = modelTable.replace(this.form.tablePrefix, "") + "_id";
                            this.form.subFkId = modelTable.replace(this.form.tablePrefix, "") + "_id"
              }
              // 获取数据原型信息
              prototypeDetail(this.form.modelId).then(res => {
                const result = res.data;
                            const result = res.data
                if (result.success) {
                  const columnTreeId = this.findObject(this.option.group, "treeId");
                  const columnTreePid = this.findObject(this.option.group, "treePid");
                  const columnTreeName = this.findObject(this.option.group, "treeName");
                  columnTreeId.dicData = result.data;
                  columnTreePid.dicData = result.data;
                  columnTreeName.dicData = result.data;
                                const columnTreeId = this.findObject(this.option.group, "treeId")
                                const columnTreePid = this.findObject(this.option.group, "treePid")
                                const columnTreeName = this.findObject(this.option.group, "treeName")
                                columnTreeId.dicData = result.data
                                columnTreePid.dicData = result.data
                                columnTreeName.dicData = result.data
                }
              });
                        })
            }
          });
                })
        }
      },
      'form.templateType'() {
        // 模版类型
        const type = this.form.templateType;
            const type = this.form.templateType
        // 主子表字段显隐
        const columnSubModelId = this.findObject(this.option.group, "subModelId");
        const columnSubFkId = this.findObject(this.option.group, "subFkId");
        columnSubModelId.display = type === "sub";
        columnSubFkId.display = type === "sub";
            const columnSubModelId = this.findObject(this.option.group, "subModelId")
            const columnSubFkId = this.findObject(this.option.group, "subFkId")
            columnSubModelId.display = type === "sub"
            columnSubFkId.display = type === "sub"
        // 树表字段显隐
        const columnTreeId = this.findObject(this.option.group, "treeId");
        const columnTreePid = this.findObject(this.option.group, "treePid");
        const columnTreeName = this.findObject(this.option.group, "treeName");
        columnTreeId.display = type === "tree";
        columnTreePid.display = type === "tree";
        columnTreeName.display = type === "tree";
            const columnTreeId = this.findObject(this.option.group, "treeId")
            const columnTreePid = this.findObject(this.option.group, "treePid")
            const columnTreeName = this.findObject(this.option.group, "treeName")
            columnTreeId.display = type === "tree"
            columnTreePid.display = type === "tree"
            columnTreeName.display = type === "tree"
      }
    },
@@ -467,42 +442,42 @@
          viewBtn: this.vaildData(this.permission.code_view, false),
          delBtn: this.vaildData(this.permission.code_delete, false),
          editBtn: this.vaildData(this.permission.code_edit, false)
        };
            }
      },
      ids() {
        let ids = [];
            let ids = []
        this.selectionList.forEach(ele => {
          ids.push(ele.id);
        });
        return ids.join(",");
                ids.push(ele.id)
            })
            return ids.join(",")
      }
    },
    methods: {
      rowSave(row, done, loading) {
        add(row).then(() => {
          this.onLoad(this.page);
                this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          done();
                })
                done()
        }, error => {
          window.console.log(error);
          loading();
        });
                window.console.log(error)
                loading()
            })
      },
      rowUpdate(row, index, done, loading) {
        update(row).then(() => {
          this.onLoad(this.page);
                this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          done();
                })
                done()
        }, error => {
          window.console.log(error);
          loading();
        });
                window.console.log(error)
                loading()
            })
      },
      rowDel(row) {
        this.$confirm("确定将选择数据删除?", {
@@ -511,37 +486,37 @@
          type: "warning"
        })
          .then(() => {
            return remove(row.id);
                    return remove(row.id)
          })
          .then(() => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!"
            });
          });
                    })
                })
      },
      searchReset() {
        this.query = {};
        this.onLoad(this.page);
            this.query = {}
            this.onLoad(this.page)
      },
      searchChange(params, done) {
        this.query = params;
        this.page.currentPage = 1;
        this.onLoad(this.page, params);
        done();
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            done()
      },
      selectionChange(list) {
        this.selectionList = list;
            this.selectionList = list
      },
      selectionClear() {
        this.selectionList = [];
        this.$refs.crud.toggleSelection();
            this.selectionList = []
            this.$refs.crud.toggleSelection()
      },
      handleDelete() {
        if (this.selectionList.length === 0) {
          this.$message.warning("请选择至少一条数据");
          return;
                this.$message.warning("请选择至少一条数据")
                return
        }
        this.$confirm("确定将选择数据删除?", {
          confirmButtonText: "确定",
@@ -549,21 +524,21 @@
          type: "warning"
        })
          .then(() => {
            return remove(this.ids);
                    return remove(this.ids)
          })
          .then(() => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!"
            });
            this.$refs.crud.toggleSelection();
          });
                    })
                    this.$refs.crud.toggleSelection()
                })
      },
      handleBuild() {
        if (this.selectionList.length === 0) {
          this.$message.warning("请选择至少一条数据");
          return;
                this.$message.warning("请选择至少一条数据")
                return
        }
        this.$confirm("是否生成选中模块的代码?", {
          title: "代码生成确认",
@@ -572,53 +547,53 @@
          type: "warning"
        })
          .then(() => {
            return build(this.ids);
                    return build(this.ids)
          })
          .then(() => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!"
            });
            this.$refs.crud.toggleSelection();
          });
                    })
                    this.$refs.crud.toggleSelection()
                })
      },
      handleCopy(row) {
        copy(row.id).then(() => {
          this.onLoad(this.page);
                this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "复制成功!"
          });
        });
                })
            })
      },
      beforeOpen(done, type) {
        if (["edit", "view"].includes(type)) {
          getCode(this.form.id).then(res => {
            this.form = res.data.data;
          });
                    this.form = res.data.data
                })
        }
        done();
            done()
      },
      currentChange(currentPage) {
        this.page.currentPage = currentPage;
            this.page.currentPage = currentPage
      },
      sizeChange(pageSize) {
        this.page.pageSize = pageSize;
            this.page.pageSize = pageSize
      },
      refreshChange() {
        this.onLoad(this.page, this.query);
            this.onLoad(this.page, this.query)
      },
      onLoad(page, params = {}) {
        this.loading = true;
            this.loading = true
        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
          const data = res.data.data;
          this.page.total = data.total;
          this.data = data.records;
          this.loading = false;
          this.selectionClear();
        });
                const data = res.data.data
                this.page.total = data.total
                this.data = data.records
                this.loading = false
                this.selectionClear()
            })
      }
    }
  };
}
</script>
src/views/tool/datasource.vue
@@ -1,29 +1,11 @@
<template>
  <basic-container>
    <avue-crud :option="option"
               :table-loading="loading"
               :data="data"
               :page.sync="page"
               :permission="permissionList"
               :before-open="beforeOpen"
               v-model="form"
               ref="crud"
               @row-update="rowUpdate"
               @row-save="rowSave"
               @row-del="rowDel"
               @search-change="searchChange"
               @search-reset="searchReset"
               @selection-change="selectionChange"
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad">
        <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :permission="permissionList"
            :before-open="beforeOpen" v-model="form" ref="crud" @row-update="rowUpdate" @row-save="rowSave"
            @row-del="rowDel" @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
            @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
      <template slot="menuLeft">
        <el-button type="danger"
                   size="small"
                   icon="el-icon-delete"
                   plain
                   v-if="permission.datasource_delete"
                <el-button type="danger" size="small" icon="el-icon-delete" plain v-if="permission.datasource_delete"
                   @click="handleDelete">删 除
        </el-button>
      </template>
@@ -32,8 +14,8 @@
</template>
<script>
  import {getList, getDetail, add, update, remove} from "@/api/tool/datasource";
  import {mapGetters} from "vuex";
import { getList, getDetail, add, update, remove } from "@/api/tool/datasource"
import { mapGetters } from "vuex"
  export default {
    data() {
@@ -59,6 +41,7 @@
          viewBtn: true,
          selection: true,
          dialogClickModal: false,
                menuWidth: 280,
          column: [
            {
              label: "名称",
@@ -140,7 +123,7 @@
          ]
        },
        data: []
      };
        }
    },
    computed: {
      ...mapGetters(["permission"]),
@@ -150,42 +133,42 @@
          viewBtn: this.vaildData(this.permission.datasource_view, false),
          delBtn: this.vaildData(this.permission.datasource_delete, false),
          editBtn: this.vaildData(this.permission.datasource_edit, false)
        };
            }
      },
      ids() {
        let ids = [];
            let ids = []
        this.selectionList.forEach(ele => {
          ids.push(ele.id);
        });
        return ids.join(",");
                ids.push(ele.id)
            })
            return ids.join(",")
      }
    },
    methods: {
      rowSave(row, done, loading) {
        add(row).then(() => {
          this.onLoad(this.page);
                this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          done();
                })
                done()
        }, error => {
          window.console.log(error);
          loading();
        });
                window.console.log(error)
                loading()
            })
      },
      rowUpdate(row, index, done, loading) {
        update(row).then(() => {
          this.onLoad(this.page);
                this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          done();
                })
                done()
        }, error => {
          window.console.log(error);
          loading();
        });
                window.console.log(error)
                loading()
            })
      },
      rowDel(row) {
        this.$confirm("确定将选择数据删除?", {
@@ -194,20 +177,20 @@
          type: "warning"
        })
          .then(() => {
            return remove(row.id);
                    return remove(row.id)
          })
          .then(() => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!"
            });
          });
                    })
                })
      },
      handleDelete() {
        if (this.selectionList.length === 0) {
          this.$message.warning("请选择至少一条数据");
          return;
                this.$message.warning("请选择至少一条数据")
                return
        }
        this.$confirm("确定将选择数据删除?", {
          confirmButtonText: "确定",
@@ -215,64 +198,63 @@
          type: "warning"
        })
          .then(() => {
            return remove(this.ids);
                    return remove(this.ids)
          })
          .then(() => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!"
            });
            this.$refs.crud.toggleSelection();
          });
                    })
                    this.$refs.crud.toggleSelection()
                })
      },
      beforeOpen(done, type) {
        if (["edit", "view"].includes(type)) {
          getDetail(this.form.id).then(res => {
            this.form = res.data.data;
          });
                    this.form = res.data.data
                })
        }
        done();
            done()
      },
      searchReset() {
        this.query = {};
        this.onLoad(this.page);
            this.query = {}
            this.onLoad(this.page)
      },
      searchChange(params, done) {
        this.query = params;
        this.page.currentPage = 1;
        this.onLoad(this.page, params);
        done();
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            done()
      },
      selectionChange(list) {
        this.selectionList = list;
            this.selectionList = list
      },
      selectionClear() {
        this.selectionList = [];
        this.$refs.crud.toggleSelection();
            this.selectionList = []
            this.$refs.crud.toggleSelection()
      },
      currentChange(currentPage) {
        this.page.currentPage = currentPage;
            this.page.currentPage = currentPage
      },
      sizeChange(pageSize) {
        this.page.pageSize = pageSize;
            this.page.pageSize = pageSize
      },
      refreshChange() {
        this.onLoad(this.page, this.query);
            this.onLoad(this.page, this.query)
      },
      onLoad(page, params = {}) {
        this.loading = true;
            this.loading = true
        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
          const data = res.data.data;
          this.page.total = data.total;
          this.data = data.records;
          this.loading = false;
          this.selectionClear();
        });
                const data = res.data.data
                this.page.total = data.total
                this.data = data.records
                this.loading = false
                this.selectionClear()
            })
      }
    }
  };
}
</script>
<style>
</style>
<style></style>
src/views/tool/model.vue
@@ -1,37 +1,16 @@
<template>
  <basic-container>
    <avue-crud :option="option"
               :table-loading="loading"
               :data="data"
               :page="page"
               :permission="permissionList"
               :before-open="beforeOpen"
               v-model="form"
               v-loading.fullscreen.lock="fullscreenLoading"
               ref="crud"
               @row-update="rowUpdate"
               @row-save="rowSave"
               @row-del="rowDel"
               @search-change="searchChange"
               @search-reset="searchReset"
               @selection-change="selectionChange"
               @current-change="currentChange"
               @size-change="sizeChange"
               @on-load="onLoad">
        <avue-crud :option="option" :table-loading="loading" :data="data" :page="page" :permission="permissionList"
            :before-open="beforeOpen" v-model="form" v-loading.fullscreen.lock="fullscreenLoading" ref="crud"
            @row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel" @search-change="searchChange"
            @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
            @size-change="sizeChange" @on-load="onLoad">
      <template slot="menuLeft">
        <el-button type="danger"
                   size="small"
                   icon="el-icon-delete"
                   plain
                   @click="handleDelete">删 除
                <el-button type="danger" size="small" icon="el-icon-delete" plain @click="handleDelete">删 除
        </el-button>
      </template>
      <template slot-scope="{row}" slot="menu">
        <el-button type="text"
                   icon="el-icon-setting"
                   size="small"
                   plain
                   class="none-border"
                <el-button type="text" icon="el-icon-setting" size="small" plain class="none-border"
                   @click.stop="handleModel(row)">模型配置
        </el-button>
      </template>
@@ -39,10 +18,7 @@
        <el-tag>{{ row.modelTable }}</el-tag>
      </template>
    </avue-crud>
    <el-dialog title="数据库模型配置"
               :visible.sync="modelBox"
               :fullscreen="true"
               append-to-body>
        <el-dialog title="数据库模型配置" :visible.sync="modelBox" :fullscreen="true" append-to-body>
      <avue-crud ref="crudModel" :option="optionModel" :table-loading="loading" :data="fields"></avue-crud>
      <span slot="footer" class="dialog-footer">
        <el-button type="danger" @click="modelBox = false">关 闭</el-button>
@@ -63,10 +39,10 @@
  getTableInfoByName,
  getModelPrototype,
  submitModelPrototype
} from "@/api/tool/model";
import {entityDic, option, optionModel} from "@/const/tool/model";
import {validatenull} from "@/util/validate";
import {mapGetters} from "vuex";
} from "@/api/tool/model"
import { entityDic, option, optionModel } from "@/const/tool/model"
import { validatenull } from "@/util/validate"
import { mapGetters } from "vuex"
export default {
  data() {
@@ -95,49 +71,52 @@
      stepStart: 0,
      stepEnd: 4,
      data: [],
      option: option,
            option: {
                menuWidth: 280,
                ...option,
            },
      optionModel: optionModel,
      formStep: {},
      fields: [],
      selectionModelList: [],
      // 默认不需要显示的字段名
      hideFields: ["id", "tenant_id", "create_user", "create_dept", "create_time", "update_user", "update_time", "status", "is_deleted"]
    };
        }
  },
  watch: {
    'form.datasourceId'() {
      if (!validatenull(this.form.datasourceId)) {
        const fullLoading = this.$loading(this.loadingOption);
                const fullLoading = this.$loading(this.loadingOption)
        getTableList(this.form.datasourceId).then(res => {
          const column = this.findObject(this.option.column, "modelTable");
          column.dicData = res.data.data;
          fullLoading.close();
                    const column = this.findObject(this.option.column, "modelTable")
                    column.dicData = res.data.data
                    fullLoading.close()
        }).catch(() => {
          fullLoading.close();
                    fullLoading.close()
        })
      }
    },
    'form.modelTable'() {
      if (!validatenull(this.form.modelTable)) {
        const fullLoading = this.$loading(this.loadingOption);
                const fullLoading = this.$loading(this.loadingOption)
        getTableInfoByName(this.form.modelTable, this.form.datasourceId).then(res => {
          const result = res.data;
                    const result = res.data
          if (result.success) {
            const {comment, entityName} = result.data;
                        const { comment, entityName } = result.data
            if (validatenull(this.form.modelClass)) {
              this.form.modelClass = entityName;
                            this.form.modelClass = entityName
            }
            if (validatenull(this.form.modelName)) {
              this.form.modelName = comment;
                            this.form.modelName = comment
            }
            if (validatenull(this.form.modelCode)) {
              this.form.modelCode = entityName.replace(/^\S/, s => s.toLowerCase());
                            this.form.modelCode = entityName.replace(/^\S/, s => s.toLowerCase())
            }
            fullLoading.close();
                        fullLoading.close()
          }
        }).catch(() => {
          fullLoading.close();
        });
                    fullLoading.close()
                })
      }
    }
  },
@@ -149,25 +128,25 @@
        delBtn: true,
        editBtn: true,
        viewBtn: false
      };
            }
    },
    ids() {
      let ids = [];
            let ids = []
      this.selectionList.forEach(ele => {
        ids.push(ele.id);
      });
      return ids.join(",");
                ids.push(ele.id)
            })
            return ids.join(",")
    },
  },
  methods: {
    rowSave(row, done, loading) {
      add(row).then((res) => {
        done();
        this.onLoad(this.page);
                done()
                this.onLoad(this.page)
        this.$message({
          type: "success",
          message: "操作成功!"
        });
                })
        this.$confirm("是否进行模型配置?", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
@@ -176,26 +155,26 @@
          let model = {
            id: res.data.data.id,
            datasourceId: res.data.data.datasourceId
          };
          this.handleModel(model);
        });
                    }
                    this.handleModel(model)
                })
      }, error => {
        loading();
        window.console.log(error);
      });
                loading()
                window.console.log(error)
            })
    },
    rowUpdate(row, index, done, loading) {
      update(row).then(() => {
        done();
        this.onLoad(this.page);
                done()
                this.onLoad(this.page)
        this.$message({
          type: "success",
          message: "操作成功!"
        });
                })
      }, error => {
        loading();
        window.console.log(error);
      });
                loading()
                window.console.log(error)
            })
    },
    rowDel(row) {
      this.$confirm("确定将选择数据删除?", {
@@ -204,20 +183,20 @@
        type: "warning"
      })
        .then(() => {
          return remove(row.id);
                    return remove(row.id)
        })
        .then(() => {
          this.onLoad(this.page);
                    this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!"
          });
        });
                    })
                })
    },
    handleDelete() {
      if (this.selectionList.length === 0) {
        this.$message.warning("请选择至少一条数据");
        return;
                this.$message.warning("请选择至少一条数据")
                return
      }
      this.$confirm("确定将选择数据删除?", {
        confirmButtonText: "确定",
@@ -225,112 +204,112 @@
        type: "warning"
      })
        .then(() => {
          return remove(this.ids);
                    return remove(this.ids)
        })
        .then(() => {
          this.onLoad(this.page);
                    this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          this.$refs.crud.toggleSelection();
        });
                    })
                    this.$refs.crud.toggleSelection()
                })
    },
    beforeOpen(done, type) {
      if (["edit", "view"].includes(type)) {
        getDetail(this.form.id).then(res => {
          this.form = res.data.data;
        });
                    this.form = res.data.data
                })
      }
      done();
            done()
    },
    searchReset() {
      this.query = {};
      this.onLoad(this.page);
            this.query = {}
            this.onLoad(this.page)
    },
    searchChange(params, done) {
      this.query = params;
      this.onLoad(this.page, params);
      done();
            this.query = params
            this.onLoad(this.page, params)
            done()
    },
    selectionChange(list) {
      this.selectionList = list;
            this.selectionList = list
    },
    selectionModelChange(list) {
      this.selectionModelList = list;
            this.selectionModelList = list
    },
    selectionClear() {
      this.selectionList = [];
      this.$refs.crud.toggleSelection();
            this.selectionList = []
            this.$refs.crud.toggleSelection()
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
            this.page.currentPage = currentPage
    },
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
            this.page.pageSize = pageSize
    },
    onLoad(page, params = {}) {
      this.loading = true;
            this.loading = true
      getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        this.loading = false;
        this.selectionClear();
      });
                const data = res.data.data
                this.page.total = data.total
                this.data = data.records
                this.loading = false
                this.selectionClear()
            })
    },
    handleModel(row) {
      this.fields = [];
      this.modelBox = true;
      this.loading = true;
      this.modelId = row.id;
      this.datasourceId = row.datasourceId;
            this.fields = []
            this.modelBox = true
            this.loading = true
            this.modelId = row.id
            this.datasourceId = row.datasourceId
      getModelPrototype(this.modelId, this.datasourceId).then(res => {
        const result = res.data;
                const result = res.data
        if (result.success) {
          this.fields = result.data;
                    this.fields = result.data
          this.fields.forEach(item => {
            item.$cellEdit = true;
            item.modelId = this.modelId;
                        item.$cellEdit = true
                        item.modelId = this.modelId
            // 根据字段物理类型自动适配实体类型
            if (!validatenull(item.name)) {
              item.jdbcName = item.name;
              item.jdbcType = item.propertyType;
              item.jdbcComment = item.comment;
                            item.jdbcName = item.name
                            item.jdbcType = item.propertyType
                            item.jdbcComment = item.comment
              if (item.propertyType === "LocalDateTime") {
                item.propertyType = "Date";
                item.propertyEntity = "java.util.Date";
                                item.propertyType = "Date"
                                item.propertyEntity = "java.util.Date"
              } else {
                entityDic.forEach(d => {
                  if (d.label === item.propertyType) {
                    item.propertyType = d.label;
                    item.propertyEntity = d.value;
                                        item.propertyType = d.label
                                        item.propertyEntity = d.value
                  }
                });
                                })
              }
            }
            // 首次加载配置默认值
            if (validatenull(item.id)) {
              item.isList = 1;
              item.isForm = 1;
              item.isRow = 0;
              item.isRequired = 0;
              item.isQuery = 0;
              item.componentType = "input";
                            item.isList = 1
                            item.isForm = 1
                            item.isRow = 0
                            item.isRequired = 0
                            item.isQuery = 0
                            item.componentType = "input"
              // 默认不需要显示的字段名配置
              if (this.hideFields.includes(item.jdbcName)) {
                item.isList = 0;
                item.isForm = 0;
                item.isRequired = 0;
                                item.isList = 0
                                item.isForm = 0
                                item.isRequired = 0
              }
            }
          });
          this.loading = false;
                    })
                    this.loading = false
        }
      });
            })
    },
    handleSubmit() {
      console.log(this.fields);
            console.log(this.fields)
      this.$confirm("确定提交模型配置?", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
@@ -339,24 +318,24 @@
        this.fields.forEach(item => {
          entityDic.forEach(d => {
            if (d.value === item.propertyEntity) {
              item.propertyType = d.label;
            }
          });
        });
        submitModelPrototype(this.fields).then(res => {
          const result = res.data;
          if (result.success) {
            this.$message.success(result.msg);
            this.modelBox = false;
          } else {
            this.$message.error(result.msg);
                            item.propertyType = d.label
          }
        })
      });
                })
                submitModelPrototype(this.fields).then(res => {
                    const result = res.data
                    if (result.success) {
                        this.$message.success(result.msg)
                        this.modelBox = false
                    } else {
                        this.$message.error(result.msg)
                    }
                })
            })
    }
  }
};
}
</script>
<style>
src/views/userHouse/houseHoldList.vue
@@ -159,6 +159,7 @@
          addBtn: true,
          dialogType: 'drawer',
          dialogClickModal: false,
          menuWidth:280,
          column: [{
              label: "姓名",
              prop: "name",
src/views/wel/index.vue
@@ -1,34 +1,161 @@
<template>
  <div>
    <div id="homeL">
        <div class="homeL-up">
            <span class="h1">基层智治综合协同平台</span>
            <span class="h2">Grassroots intelligent governance integrated cooperation platform</span>
        </div>
        <div class="homeL-bar">
            <div class="outS" @click="down1">
                <div class="down1"><span>住户管理</span></div>
            </div>
            <div class="outS" @click="down2">
                <div class="down2"><span>房屋管理</span></div>
            </div>
            <div class="outS" @click="down3">
                <div class="down3"><span>E呼即办</span></div>
            </div>
            <div class="outS" @click="down4">
                <div class="down4"><span>报事报修</span></div>
            </div>
            <div class="outS" @click="down5">
                <div class="down5"><span>走访日志</span></div>
            </div>
        </div>
  </div>
</template>
<script>
  import {mapGetters} from "vuex";
  export default {
    name: "wel",
    data() {
      return {
        activeNames: ['1', '2', '3', '5'],
        logActiveNames: ['31']
      };
    },
    computed: {
      ...mapGetters(["userInfo"]),
            a: 1,
        }
    },
    methods: {
      handleChange(val) {
        window.console.log(val);
      }
        down1 () {
            this.$router.push({ path: "/userHouse/houseHoldList" })
    },
  };
        down2 () {
            this.$router.push({ path: "/userHouse/houseList" })
        },
        down3 () {
            this.$router.push({ path: "/task/eCall/index" })
        },
        down4 () {
            this.$router.push({ path: "/task/reportForRepairs" })
        },
        down5 () {
            this.$router.push({ path: "/grid/gridWorkLog/index" })
        },
    },
    mouted () { },
}
</script>
<style>
  .el-font-size {
    font-size: 14px;
<style lang="scss">
#homeL {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 96.6%;
    //   border: 1px solid #000;
    .homeL-up {
        width: 100%;
        height: 70%;
        // border: 1px solid rgb(39, 164, 185);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        background-image: url("../../../public/img/bjkeji.png");
        background-color: #fff;
        background-repeat: no-repeat;
        background-size: 100% 100%;
        -moz-background-size: 100% 100%;
        color: #4BA3FE;
        .h1,
        .h2 {
            position: relative;
            left: 22%;
        }
        .h1 {
            font-size: 54px;
        }
        .h2 {
            font-size: 28px;
        }
    }
    .homeL-bar {
        height: 0;
        flex: 1;
        width: 100%;
        display: flex;
        align-items: center;
        .outS {
            width: 20%;
            height: 94.6%;
            display: flex;
            justify-content: center;
        }
        .down1,
        .down2,
        .down3,
        .down4,
        .down5 {
            width: 96%;
            height: 100%;
            background-repeat: no-repeat;
            background-size: 100% 100%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 5px;
            &:hover {
                width: 99%;
                height: 99%;
                transition: all 0.3s ease;
            }
            span {
                position: relative;
                top: -30px;
                left: -50px;
                font-weight: 600;
                font-size: 30px;
                color: #fff;
                display: inline-block;
                // border: 1px solid rgb(180, 22, 75);
            }
        }
        .down1 {
            background-image: url("../../../public/img/yijianbaoj.png");
        }
        .down2 {
            background-image: url("../../../public/img/fangyi.png");
        }
        .down3 {
            background-image: url("../../../public/img/anjian.png");
        }
        .down4 {
            background-image: url("../../../public/img/tiwen.png");
        }
        .down5 {
            background-image: url("../../../public/img/tongji.png");
        }
    }
  }
</style>
src/views/work/claim.vue
@@ -1,39 +1,20 @@
<template>
  <basic-container>
    <avue-crud :option="option"
               :table-loading="loading"
               :data="data"
               ref="crud"
               v-model="form"
               @search-change="searchChange"
               @search-reset="searchReset"
               @selection-change="selectionChange"
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad">
        <avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form"
            @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
            @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
      <template slot-scope="scope" slot="menu">
        <el-button type="text"
                   size="small"
                   icon="el-icon-download"
                   v-if="permission.work_claim_sign"
                <el-button type="text" size="small" icon="el-icon-download" v-if="permission.work_claim_sign"
                   @click.stop="handleClaim(scope.row)">签收
        </el-button>
        <el-button type="text"
                   size="small"
                   icon="el-icon-info"
                   v-if="permission.work_claim_detail"
                <el-button type="text" size="small" icon="el-icon-info" v-if="permission.work_claim_detail"
                   @click.stop="handleDetail(scope.row)">详情
        </el-button>
        <el-button type="text"
                   size="small"
                   icon="el-icon-search"
                   v-if="permission.work_claim_follow"
                <el-button type="text" size="small" icon="el-icon-search" v-if="permission.work_claim_follow"
                   @click.stop="handleImage(scope.row,scope.index)">流程图
        </el-button>
      </template>
      <template slot-scope="{row}"
                slot="processDefinitionVersion">
            <template slot-scope="{row}" slot="processDefinitionVersion">
        <el-tag>v{{row.processDefinitionVersion}}</el-tag>
      </template>
    </avue-crud>
@@ -42,9 +23,9 @@
</template>
<script>
  import {mapGetters} from "vuex";
  import {claimList, claimTask} from "@/api/work/work";
  import {flowCategory, flowRoute} from "@/util/flow";
import { mapGetters } from "vuex"
import { claimList, claimTask } from "@/api/work/work"
import { flowCategory, flowRoute } from "@/util/flow"
  export default {
    data() {
@@ -77,7 +58,7 @@
          viewBtn: false,
          delBtn: false,
          dialogWidth: 900,
          menuWidth: 200,
                menuWidth: 280,
          dialogClickModal: false,
          column: [
            {
@@ -119,35 +100,35 @@
          ]
        },
        data: []
      };
        }
    },
    computed: {
      ...mapGetters(["permission", "flowRoutes"]),
      ids() {
        let ids = [];
            let ids = []
        this.selectionList.forEach(ele => {
          ids.push(ele.id);
        });
        return ids.join(",");
                ids.push(ele.id)
            })
            return ids.join(",")
      },
    },
    methods: {
      searchReset() {
        this.query = {};
        this.onLoad(this.page);
            this.query = {}
            this.onLoad(this.page)
      },
      searchChange(params, done) {
        this.query = params;
        this.page.currentPage = 1;
        this.onLoad(this.page, params);
        done();
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            done()
      },
      selectionChange(list) {
        this.selectionList = list;
            this.selectionList = list
      },
      selectionClear() {
        this.selectionList = [];
        this.$refs.crud.toggleSelection();
            this.selectionList = []
            this.$refs.crud.toggleSelection()
      },
      handleClaim(row) {
        this.$confirm("确定签收此任务?", {
@@ -156,46 +137,46 @@
          type: "warning"
        })
          .then(() => {
            return claimTask(row.taskId);
                    return claimTask(row.taskId)
          })
          .then(() => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!"
            });
          });
                    })
                })
      },
      handleDetail(row) {
        this.$router.push({path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}`});
            this.$router.push({ path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}` })
      },
      handleImage(row) {
        this.processInstanceId = row.processInstanceId;
        this.flowBox = true;
            this.processInstanceId = row.processInstanceId
            this.flowBox = true
      },
      currentChange(currentPage){
        this.page.currentPage = currentPage;
            this.page.currentPage = currentPage
      },
      sizeChange(pageSize){
        this.page.pageSize = pageSize;
            this.page.pageSize = pageSize
      },
      refreshChange() {
        this.onLoad(this.page, this.query);
            this.onLoad(this.page, this.query)
      },
      onLoad(page, params = {}) {
        const query = {
          ...this.query,
          category: (params.category) ? flowCategory(params.category) : null
        };
        this.loading = true;
            }
            this.loading = true
        claimList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => {
          const data = res.data.data;
          this.page.total = data.total;
          this.data = data.records;
          this.loading = false;
          this.selectionClear();
        });
                const data = res.data.data
                this.page.total = data.total
                this.data = data.records
                this.loading = false
                this.selectionClear()
            })
      }
    }
  };
}
</script>
src/views/work/done.vue
@@ -1,34 +1,17 @@
<template>
  <basic-container>
    <avue-crud :option="option"
               :table-loading="loading"
               :data="data"
               ref="crud"
               v-model="form"
               :page.sync="page"
               @search-change="searchChange"
               @search-reset="searchReset"
               @selection-change="selectionChange"
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad">
        <avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form" :page.sync="page"
            @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
            @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
      <template slot-scope="scope" slot="menu">
        <el-button type="text"
                   size="small"
                   icon="el-icon-info"
                   v-if="permission.work_done_detail"
                <el-button type="text" size="small" icon="el-icon-info" v-if="permission.work_done_detail"
                   @click.stop="handleDetail(scope.row)">详情
        </el-button>
        <el-button type="text"
                   size="small"
                   icon="el-icon-search"
                   v-if="permission.work_done_follow"
                <el-button type="text" size="small" icon="el-icon-search" v-if="permission.work_done_follow"
                   @click.stop="handleImage(scope.row,scope.index)">流程图
        </el-button>
      </template>
      <template slot-scope="{row}"
                slot="processDefinitionVersion">
            <template slot-scope="{row}" slot="processDefinitionVersion">
        <el-tag>v{{row.processDefinitionVersion}}</el-tag>
      </template>
    </avue-crud>
@@ -37,9 +20,9 @@
</template>
<script>
  import {mapGetters} from "vuex";
  import {doneList} from "@/api/work/work";
  import {flowCategory, flowRoute} from "@/util/flow";
import { mapGetters } from "vuex"
import { doneList } from "@/api/work/work"
import { flowCategory, flowRoute } from "@/util/flow"
  export default {
    data() {
@@ -71,7 +54,7 @@
          viewBtn: false,
          delBtn: false,
          dialogWidth: 900,
          menuWidth: 150,
                menuWidth: 280,
          dialogClickModal: false,
          column: [
            {
@@ -113,66 +96,66 @@
          ]
        },
        data: []
      };
        }
    },
    computed: {
      ...mapGetters(["permission", "flowRoutes"]),
      ids() {
        let ids = [];
            let ids = []
        this.selectionList.forEach(ele => {
          ids.push(ele.id);
        });
        return ids.join(",");
                ids.push(ele.id)
            })
            return ids.join(",")
      },
    },
    methods: {
      searchReset() {
        this.query = {};
        this.onLoad(this.page);
            this.query = {}
            this.onLoad(this.page)
      },
      searchChange(params, done) {
        this.query = params;
        this.page.currentPage = 1;
        this.onLoad(this.page, params);
        done();
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            done()
      },
      selectionChange(list) {
        this.selectionList = list;
            this.selectionList = list
      },
      selectionClear() {
        this.selectionList = [];
        this.$refs.crud.toggleSelection();
            this.selectionList = []
            this.$refs.crud.toggleSelection()
      },
      handleDetail(row) {
        this.$router.push({path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}`});
            this.$router.push({ path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}` })
      },
      handleImage(row) {
        this.processInstanceId = row.processInstanceId;
        this.flowBox = true;
            this.processInstanceId = row.processInstanceId
            this.flowBox = true
      },
      currentChange(currentPage){
        this.page.currentPage = currentPage;
            this.page.currentPage = currentPage
      },
      sizeChange(pageSize){
        this.page.pageSize = pageSize;
            this.page.pageSize = pageSize
      },
      refreshChange() {
        this.onLoad(this.page, this.query);
            this.onLoad(this.page, this.query)
      },
      onLoad(page, params = {}) {
        const query = {
          ...this.query,
          category: (params.category) ? flowCategory(params.category) : null
        };
        this.loading = true;
            }
            this.loading = true
        doneList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => {
          const data = res.data.data;
          this.page.total = data.total;
          this.data = data.records;
          this.loading = false;
          this.selectionClear();
        });
                const data = res.data.data
                this.page.total = data.total
                this.data = data.records
                this.loading = false
                this.selectionClear()
            })
      }
    }
  };
}
</script>
src/views/work/send.vue
@@ -1,38 +1,20 @@
<template>
  <basic-container>
    <avue-crud :option="option"
               :table-loading="loading"
               :data="data"
               ref="crud"
               v-model="form"
               :page.sync="page"
               @search-change="searchChange"
               @search-reset="searchReset"
               @selection-change="selectionChange"
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad">
        <avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form" :page.sync="page"
            @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
            @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
      <template slot-scope="scope" slot="menu">
        <el-button type="text"
                   size="small"
                   icon="el-icon-info"
                   v-if="permission.work_send_detail"
                <el-button type="text" size="small" icon="el-icon-info" v-if="permission.work_send_detail"
                   @click.stop="handleDetail(scope.row)">详情
        </el-button>
        <el-button type="text"
                   size="small"
                   icon="el-icon-search"
                   v-if="permission.work_send_follow"
                <el-button type="text" size="small" icon="el-icon-search" v-if="permission.work_send_follow"
                   @click.stop="handleImage(scope.row,scope.index)">流程图
        </el-button>
      </template>
      <template slot-scope="{row}"
                slot="processDefinitionVersion">
            <template slot-scope="{row}" slot="processDefinitionVersion">
        <el-tag>v{{row.processDefinitionVersion}}</el-tag>
      </template>
      <template slot-scope="{row}"
                slot="processIsFinished">
            <template slot-scope="{row}" slot="processIsFinished">
        <el-tag>{{row.processIsFinished==='finished' ? '已完成' : '未完成'}}</el-tag>
      </template>
    </avue-crud>
@@ -41,9 +23,9 @@
</template>
<script>
  import {mapGetters} from "vuex";
  import {sendList} from "@/api/work/work";
  import {flowCategory,flowRoute} from "@/util/flow";
import { mapGetters } from "vuex"
import { sendList } from "@/api/work/work"
import { flowCategory, flowRoute } from "@/util/flow"
  export default {
    data() {
@@ -75,7 +57,7 @@
          viewBtn: false,
          delBtn: false,
          dialogWidth: 900,
          menuWidth: 150,
                menuWidth: 280,
          dialogClickModal: false,
          column: [
            {
@@ -123,66 +105,66 @@
          ]
        },
        data: []
      };
        }
    },
    computed: {
      ...mapGetters(["permission", "flowRoutes"]),
      ids() {
        let ids = [];
            let ids = []
        this.selectionList.forEach(ele => {
          ids.push(ele.id);
        });
        return ids.join(",");
                ids.push(ele.id)
            })
            return ids.join(",")
      },
    },
    methods: {
      searchReset() {
        this.query = {};
        this.onLoad(this.page);
            this.query = {}
            this.onLoad(this.page)
      },
      searchChange(params, done) {
        this.query = params;
        this.page.currentPage = 1;
        this.onLoad(this.page, params);
        done();
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            done()
      },
      selectionChange(list) {
        this.selectionList = list;
            this.selectionList = list
      },
      selectionClear() {
        this.selectionList = [];
        this.$refs.crud.toggleSelection();
            this.selectionList = []
            this.$refs.crud.toggleSelection()
      },
      handleDetail(row) {
        this.$router.push({ path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}` });
            this.$router.push({ path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}` })
      },
      handleImage(row) {
        this.processInstanceId = row.processInstanceId;
        this.flowBox = true;
            this.processInstanceId = row.processInstanceId
            this.flowBox = true
      },
      currentChange(currentPage){
        this.page.currentPage = currentPage;
            this.page.currentPage = currentPage
      },
      sizeChange(pageSize){
        this.page.pageSize = pageSize;
            this.page.pageSize = pageSize
      },
      refreshChange() {
        this.onLoad(this.page, this.query);
            this.onLoad(this.page, this.query)
      },
      onLoad(page, params = {}) {
        const query = {
          ...this.query,
          category: (params.category) ? flowCategory(params.category) : null
        };
        this.loading = true;
            }
            this.loading = true
        sendList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => {
          const data = res.data.data;
          this.page.total = data.total;
          this.data = data.records;
          this.loading = false;
          this.selectionClear();
        });
                const data = res.data.data
                this.page.total = data.total
                this.data = data.records
                this.loading = false
                this.selectionClear()
            })
      }
    }
  };
}
</script>
src/views/work/start.vue
@@ -1,18 +1,8 @@
<template>
  <basic-container>
    <avue-crud :option="option"
               :table-loading="loading"
               :data="data"
               :page.sync="page"
               v-model="form"
               ref="crud"
               @search-change="searchChange"
               @search-reset="searchReset"
               @selection-change="selectionChange"
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad">
        <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" v-model="form" ref="crud"
            @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
            @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
      <template slot="menuLeft">
        <el-radio-group v-model="mode" size="small">
          <el-radio-button label="1">通用流程</el-radio-button>
@@ -20,33 +10,23 @@
        </el-radio-group>
      </template>
      <template slot-scope="scope" slot="menu">
        <el-button type="text"
                   size="small"
                   icon="el-icon-video-play"
                   v-if="permission.work_start_flow"
                <el-button type="text" size="small" icon="el-icon-video-play" v-if="permission.work_start_flow"
                   @click.stop="handleStart(scope.row)">发起
        </el-button>
        <el-button type="text"
                   size="small"
                   icon="el-icon-search"
                   v-if="permission.work_start_image"
                <el-button type="text" size="small" icon="el-icon-search" v-if="permission.work_start_image"
                   @click.stop="handleImage(scope.row,scope.index)">流程图
        </el-button>
      </template>
      <template slot-scope="{row}"
                slot="tenantId">
            <template slot-scope="{row}" slot="tenantId">
        <el-tag>{{row.tenantId===''?'通用':row.tenantId}}</el-tag>
      </template>
      <template slot-scope="{row}"
                slot="version">
            <template slot-scope="{row}" slot="version">
        <el-tag>v{{row.version}}</el-tag>
      </template>
      <template slot-scope="{row}"
                slot="suspensionState">
            <template slot-scope="{row}" slot="suspensionState">
        <el-tag>{{row.suspensionState===1?'激活':'挂起'}}</el-tag>
      </template>
      <template slot-scope="{row}"
                slot="category">
            <template slot-scope="{row}" slot="category">
        <el-tag>{{row.categoryName}}</el-tag>
      </template>
    </avue-crud>
@@ -55,9 +35,9 @@
</template>
<script>
  import {mapGetters} from "vuex";
  import {startList} from "@/api/work/work";
  import {flowCategory, flowRoute} from "@/util/flow";
import { mapGetters } from "vuex"
import { startList } from "@/api/work/work"
import { flowCategory, flowRoute } from "@/util/flow"
  export default {
    data() {
@@ -89,7 +69,7 @@
          addBtn: false,
          viewBtn: false,
          delBtn: false,
          menuWidth: 150,
                menuWidth: 280,
          dialogWidth: 900,
          dialogClickModal: false,
          column: [
@@ -143,72 +123,72 @@
          ]
        },
        data: []
      };
        }
    },
    watch: {
      'mode'() {
        this.onLoad(this.page);
            this.onLoad(this.page)
      }
    },
    computed: {
      ...mapGetters(["permission", "flowRoutes"]),
      ids() {
        let ids = [];
            let ids = []
        this.selectionList.forEach(ele => {
          ids.push(ele.id);
        });
        return ids.join(",");
                ids.push(ele.id)
            })
            return ids.join(",")
      },
    },
    methods: {
      searchReset() {
        this.query = {};
        this.onLoad(this.page);
            this.query = {}
            this.onLoad(this.page)
      },
      searchChange(params, done) {
        this.query = params;
        this.page.currentPage = 1;
        this.onLoad(this.page, params);
        done();
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            done()
      },
      selectionChange(list) {
        this.selectionList = list;
            this.selectionList = list
      },
      selectionClear() {
        this.selectionList = [];
        this.$refs.crud.toggleSelection();
            this.selectionList = []
            this.$refs.crud.toggleSelection()
      },
      handleStart(row) {
        this.$router.push({path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/form/${row.id}`});
            this.$router.push({ path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/form/${row.id}` })
      },
      handleImage(row) {
        this.processDefinitionId = row.id;
        this.flowBox = true;
            this.processDefinitionId = row.id
            this.flowBox = true
      },
      currentChange(currentPage) {
        this.page.currentPage = currentPage;
            this.page.currentPage = currentPage
      },
      sizeChange(pageSize) {
        this.page.pageSize = pageSize;
            this.page.pageSize = pageSize
      },
      refreshChange() {
        this.onLoad(this.page, this.query);
            this.onLoad(this.page, this.query)
      },
      onLoad(page, params = {}) {
        const query = {
          ...this.query,
          category: (params.category) ? flowCategory(params.category) : null,
          mode: this.mode
        };
        this.loading = true;
            }
            this.loading = true
        startList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => {
          const data = res.data.data;
          this.page.total = data.total;
          this.data = data.records;
          this.loading = false;
          this.selectionClear();
        });
                const data = res.data.data
                this.page.total = data.total
                this.data = data.records
                this.loading = false
                this.selectionClear()
            })
      }
    }
  };
}
</script>
src/views/work/todo.vue
@@ -1,39 +1,20 @@
<template>
  <basic-container>
    <avue-crud :option="option"
               :table-loading="loading"
               :data="data"
               ref="crud"
               v-model="form"
               @search-change="searchChange"
               @search-reset="searchReset"
               @selection-change="selectionChange"
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad">
        <avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form"
            @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
            @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
      <template slot-scope="scope" slot="menu">
        <el-button type="text"
                   size="small"
                   icon="el-icon-s-check"
                   v-if="permission.work_todo_handle"
                <el-button type="text" size="small" icon="el-icon-s-check" v-if="permission.work_todo_handle"
                   @click.stop="handleWork(scope.row)">处理
        </el-button>
        <el-button type="text"
                   size="small"
                   icon="el-icon-info"
                   v-if="permission.work_todo_detail"
                <el-button type="text" size="small" icon="el-icon-info" v-if="permission.work_todo_detail"
                   @click.stop="handleDetail(scope.row)">详情
        </el-button>
        <el-button type="text"
                   size="small"
                   icon="el-icon-search"
                   v-if="permission.work_todo_follow"
                <el-button type="text" size="small" icon="el-icon-search" v-if="permission.work_todo_follow"
                   @click.stop="handleImage(scope.row,scope.index)">流程图
        </el-button>
      </template>
      <template slot-scope="{row}"
                slot="processDefinitionVersion">
            <template slot-scope="{row}" slot="processDefinitionVersion">
        <el-tag>v{{row.processDefinitionVersion}}</el-tag>
      </template>
    </avue-crud>
@@ -42,9 +23,9 @@
</template>
<script>
  import {mapGetters} from "vuex";
  import {todoList} from "@/api/work/work";
  import {flowCategory,flowRoute} from "@/util/flow";
import { mapGetters } from "vuex"
import { todoList } from "@/api/work/work"
import { flowCategory, flowRoute } from "@/util/flow"
  export default {
    data() {
@@ -77,7 +58,7 @@
          viewBtn: false,
          delBtn: false,
          dialogWidth: 900,
          menuWidth: 200,
                menuWidth: 280,
          dialogClickModal: false,
          column: [
            {
@@ -119,69 +100,69 @@
          ]
        },
        data: []
      };
        }
    },
    computed: {
      ...mapGetters(["permission", "flowRoutes"]),
      ids() {
        let ids = [];
            let ids = []
        this.selectionList.forEach(ele => {
          ids.push(ele.id);
        });
        return ids.join(",");
                ids.push(ele.id)
            })
            return ids.join(",")
      },
    },
    methods: {
      searchReset() {
        this.query = {};
        this.onLoad(this.page);
            this.query = {}
            this.onLoad(this.page)
      },
      searchChange(params, done) {
        this.query = params;
        this.page.currentPage = 1;
        this.onLoad(this.page, params);
        done();
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            done()
      },
      selectionChange(list) {
        this.selectionList = list;
            this.selectionList = list
      },
      selectionClear() {
        this.selectionList = [];
        this.$refs.crud.toggleSelection();
            this.selectionList = []
            this.$refs.crud.toggleSelection()
      },
      handleWork(row) {
        this.$router.push({ path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/handle/${row.taskId}/${row.processInstanceId}/${row.businessId}` });
            this.$router.push({ path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/handle/${row.taskId}/${row.processInstanceId}/${row.businessId}` })
      },
      handleDetail(row) {
        this.$router.push({ path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}` });
            this.$router.push({ path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}` })
      },
      handleImage(row) {
        this.processInstanceId = row.processInstanceId;
        this.flowBox = true;
            this.processInstanceId = row.processInstanceId
            this.flowBox = true
      },
      currentChange(currentPage){
        this.page.currentPage = currentPage;
            this.page.currentPage = currentPage
      },
      sizeChange(pageSize){
        this.page.pageSize = pageSize;
            this.page.pageSize = pageSize
      },
      refreshChange() {
        this.onLoad(this.page, this.query);
            this.onLoad(this.page, this.query)
      },
      onLoad(page, params = {}) {
        const query = {
          ...this.query,
          category: (params.category) ? flowCategory(params.category) : null
        };
        this.loading = true;
            }
            this.loading = true
        todoList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => {
          const data = res.data.data;
          this.page.total = data.total;
          this.data = data.records;
          this.loading = false;
          this.selectionClear();
        });
                const data = res.data.data
                this.page.total = data.total
                this.data = data.records
                this.loading = false
                this.selectionClear()
            })
      }
    }
  };
}
</script>