28 files modified
6 files added
| | |
| | | <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> --> |
| | |
| | | </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", |
| | |
| | | code: "", |
| | | state: "", |
| | | } |
| | | }; |
| | | } |
| | | }, |
| | | watch: { |
| | | $route() { |
| | | this.handleLogin(); |
| | | this.handleLogin() |
| | | } |
| | | }, |
| | | created() { |
| | | this.handleLogin(); |
| | | this.getTime(); |
| | | this.handleLogin() |
| | | this.getTime() |
| | | }, |
| | | mounted() { |
| | | }, |
| | |
| | | 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"> |
| | |
| | | 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%; |
| | |
| | | width: 50%; |
| | | float: left; |
| | | box-sizing: border-box; |
| | | position: relative; |
| | | |
| | | .img { |
| | | position: absolute; |
| | | top: 10px; |
| | | right: 10px; |
| | | width: 180px; |
| | | } |
| | | } |
| | | |
| | | .login-main { |
| | |
| | | .avue-header, |
| | | .avue-top, |
| | | .avue-logo, |
| | | .avue-layout |
| | | .login-logo, |
| | | .avue-layout .login-logo, |
| | | .avue-main { |
| | | transition: all .3s; |
| | | } |
| | |
| | | } |
| | | |
| | | .avue--collapse { |
| | | |
| | | .avue-left, |
| | | .avue-logo { |
| | | width: 60px; |
| | |
| | | |
| | | @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; |
| | |
| | | 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 |
| | | } |
| | |
| | | <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> |
| | |
| | | </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 { |
| | |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 350, |
| | | menuWidth: 280, |
| | | border: true, |
| | | //stripe:true, |
| | | index: true, |
| | |
| | | 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" |
| | |
| | | ], |
| | | }, |
| | | data: [], |
| | | }; |
| | | } |
| | | }, |
| | | watch: { |
| | | }, |
| | |
| | | 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("确定将选择数据删除?", { |
| | |
| | | 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: "确定", |
| | |
| | | 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) |
| | | }) |
| | |
| | | } |
| | | } |
| | | }) |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | |
| | | <!-- 工作日志 --> |
| | | <!-- 走访日志 --> |
| | | <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> |
| | |
| | | </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() { |
| | |
| | | ], |
| | | }, |
| | | data: [], |
| | | }; |
| | | } |
| | | }, |
| | | watch: { |
| | | }, |
| | |
| | | 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("确定将选择数据删除?", { |
| | |
| | | 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: "确定", |
| | |
| | | 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> |
| | |
| | | <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> |
| | |
| | | </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 { |
| | |
| | | { |
| | | 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, |
| | |
| | | ], |
| | | }, |
| | | data: [], |
| | | }; |
| | | } |
| | | }, |
| | | watch: { |
| | | }, |
| | |
| | | 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("确定将选择数据删除?", { |
| | |
| | | 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: "确定", |
| | |
| | | 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> |
| | |
| | | <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> |
| | |
| | | </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 { |
| | |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 350, |
| | | menuWidth: 280, |
| | | border: true, |
| | | //stripe:true, |
| | | index: true, |
| | |
| | | prop: "communityCode", |
| | | search: true, |
| | | searchSpan: 4, |
| | | width: 150, |
| | | type: "tree", |
| | | dicUrl: "/api/blade-system/region/tree", |
| | | defaultExpandedKeys: ["361102003"], |
| | | props: { |
| | | label: "name", |
| | | value: "id" |
| | |
| | | ], |
| | | }, |
| | | data: [], |
| | | }; |
| | | } |
| | | }, |
| | | watch: { |
| | | }, |
| | |
| | | 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("确定将选择数据删除?", { |
| | |
| | | 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: "确定", |
| | |
| | | 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> |
| | |
| | | <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() { |
| | |
| | | editBtn: false, |
| | | addBtn: false, |
| | | delBtn: false, |
| | | menuWidth: 120, |
| | | menuWidth: 280, |
| | | dialogType: 'drawer', |
| | | column: [ |
| | | { |
| | |
| | | ] |
| | | }, |
| | | data: [] |
| | | }; |
| | | } |
| | | }, |
| | | |
| | | computed: { |
| | |
| | | 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> |
| | |
| | | <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() { |
| | |
| | | editBtn: false, |
| | | addBtn: false, |
| | | delBtn: false, |
| | | menuWidth: 120, |
| | | menuWidth: 280, |
| | | dialogType: 'drawer', |
| | | column: [ |
| | | { |
| | |
| | | ] |
| | | }, |
| | | 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> |
| | |
| | | <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() { |
| | |
| | | editBtn: false, |
| | | addBtn: false, |
| | | delBtn: false, |
| | | menuWidth: 120, |
| | | menuWidth: 280, |
| | | dialogType: 'drawer', |
| | | column: [ |
| | | { |
| | |
| | | ] |
| | | }, |
| | | 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> |
| | |
| | | <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> |
| | |
| | | |
| | | <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> |
| | |
| | | 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 { |
| | |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 350, |
| | | menuWidth: 280, |
| | | border: true, |
| | | //stripe:true, |
| | | index: true, |
| | |
| | | ], |
| | | }, |
| | | data: [], |
| | | }; |
| | | } |
| | | }, |
| | | watch: {}, |
| | | computed: { |
| | |
| | | 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: { |
| | |
| | | legalTel: '', |
| | | localtion: '', |
| | | confirmFlag: '', |
| | | }; |
| | | } |
| | | this.placeExt = [] |
| | | this.onLoadPlaceExt() |
| | | }, |
| | |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | }) |
| | | this.roleBox = false |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ); |
| | | ) |
| | | }, |
| | | |
| | | onLoadPlaceExt() { |
| | |
| | | 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("确定将选择数据删除?", { |
| | |
| | | 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: "确定", |
| | |
| | | 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) |
| | | }) |
| | |
| | | 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) |
| | | }) |
| | |
| | | } |
| | | } |
| | | }) |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | |
| | | <!-- 工作日志 --> |
| | | <!-- 走访日志 --> |
| | | <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> |
| | |
| | | </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() { |
| | |
| | | ], |
| | | }, |
| | | data: [], |
| | | }; |
| | | } |
| | | }, |
| | | watch: { |
| | | }, |
| | |
| | | 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("确定将选择数据删除?", { |
| | |
| | | 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: "确定", |
| | |
| | | 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> |
| | |
| | | <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> |
| | |
| | | </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 { |
| | |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 220, |
| | | menuWidth: 280, |
| | | border: true, |
| | | //stripe:true, |
| | | index: true, |
| | |
| | | { |
| | | 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" |
| | |
| | | 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: { |
| | |
| | | ], |
| | | }, |
| | | 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]; |
| | | } |
| | | }, |
| | |
| | | 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("确定将选择数据删除?", { |
| | |
| | | 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: "确定", |
| | |
| | | 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) |
| | | }) |
| | |
| | | } |
| | | } |
| | | }) |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | } |
| | | }, |
| | | }; |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | |
| | | <!-- 工作日志 --> |
| | | <!-- 走访日志 --> |
| | | <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"> |
| | |
| | | </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() { |
| | |
| | | ], |
| | | }, |
| | | data: [], |
| | | }; |
| | | } |
| | | }, |
| | | watch: { |
| | | }, |
| | |
| | | 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: { |
| | |
| | | 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("确定将选择数据删除?", { |
| | |
| | | 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: "确定", |
| | |
| | | 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) |
| | | }) |
| | |
| | | } |
| | | } |
| | | }) |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | } |
| | | }, |
| | | }; |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | |
| | | <!-- 工作日志 --> |
| | | <!-- 走访日志 --> |
| | | <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> |
| | |
| | | </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() { |
| | |
| | | ], |
| | | }, |
| | | data: [], |
| | | }; |
| | | } |
| | | }, |
| | | watch: { |
| | | }, |
| | |
| | | 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("确定将选择数据删除?", { |
| | |
| | | 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: "确定", |
| | |
| | | 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) |
| | | }) |
| | |
| | | } |
| | | } |
| | | }) |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | } |
| | | }, |
| | | }; |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | |
| | | <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> |
| | |
| | | </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() { |
| | |
| | | index: true, |
| | | selection: true, |
| | | labelWidth: 120, |
| | | menuWidth: 300, |
| | | menuWidth: 280, |
| | | viewBtn: true, |
| | | dialogClickModal: false, |
| | | tabs: true, |
| | |
| | | ] |
| | | }, |
| | | 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" |
| | | |
| | | } |
| | | }, |
| | |
| | | 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("确定将选择数据删除?", { |
| | |
| | | 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: "确定", |
| | |
| | | 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: "代码生成确认", |
| | |
| | | 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> |
| | |
| | | <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> |
| | |
| | | </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() { |
| | |
| | | viewBtn: true, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | menuWidth: 280, |
| | | column: [ |
| | | { |
| | | label: "名称", |
| | |
| | | ] |
| | | }, |
| | | data: [] |
| | | }; |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission"]), |
| | |
| | | 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("确定将选择数据删除?", { |
| | |
| | | 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: "确定", |
| | |
| | | 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> |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | 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() { |
| | |
| | | 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() |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | |
| | | 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: "取消", |
| | |
| | | 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("确定将选择数据删除?", { |
| | |
| | | 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: "确定", |
| | |
| | | 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: "取消", |
| | |
| | | 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> |
| | |
| | | addBtn: true, |
| | | dialogType: 'drawer', |
| | | dialogClickModal: false, |
| | | menuWidth:280, |
| | | column: [{ |
| | | label: "姓名", |
| | | prop: "name", |
| | |
| | | <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> |
| | | |
| | |
| | | <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> |
| | |
| | | </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() { |
| | |
| | | viewBtn: false, |
| | | delBtn: false, |
| | | dialogWidth: 900, |
| | | menuWidth: 200, |
| | | menuWidth: 280, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | |
| | | ] |
| | | }, |
| | | 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("确定签收此任务?", { |
| | |
| | | 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> |
| | |
| | | <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> |
| | |
| | | </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() { |
| | |
| | | viewBtn: false, |
| | | delBtn: false, |
| | | dialogWidth: 900, |
| | | menuWidth: 150, |
| | | menuWidth: 280, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | |
| | | ] |
| | | }, |
| | | 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> |
| | |
| | | <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> |
| | |
| | | </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() { |
| | |
| | | viewBtn: false, |
| | | delBtn: false, |
| | | dialogWidth: 900, |
| | | menuWidth: 150, |
| | | menuWidth: 280, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | |
| | | ] |
| | | }, |
| | | 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> |
| | |
| | | <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> |
| | |
| | | </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> |
| | |
| | | </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() { |
| | |
| | | addBtn: false, |
| | | viewBtn: false, |
| | | delBtn: false, |
| | | menuWidth: 150, |
| | | menuWidth: 280, |
| | | dialogWidth: 900, |
| | | dialogClickModal: false, |
| | | column: [ |
| | |
| | | ] |
| | | }, |
| | | 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> |
| | |
| | | <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> |
| | |
| | | </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() { |
| | |
| | | viewBtn: false, |
| | | delBtn: false, |
| | | dialogWidth: 900, |
| | | menuWidth: 200, |
| | | menuWidth: 280, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | |
| | | ] |
| | | }, |
| | | 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> |