13 files modified
2 files added
| | |
| | | }); |
| | | }; |
| | | |
| | | export const updatePoiLabelColor = (placeId, color) => { |
| | | return request({ |
| | | url: "/api/blade-place/place/updatePoiLabelColor", |
| | | method: "get", |
| | | params: { |
| | | placeId, |
| | | color |
| | | }, |
| | | }); |
| | | }; |
| | | |
| | | export const getPlaceDetaill = (houseCode) => { |
| | | return request({ |
| | | url: "/api/blade-place/place/getDetail", |
| | |
| | | }; |
| | | |
| | | export const setCheckPlaceExt = (data) => { |
| | | return request({ |
| | | url: "/api//blade-placeExt/placeExt/checkPlaceExt", |
| | | method: "post", |
| | | data |
| | | }); |
| | | }; |
| | | |
| | | |
| | | //获取从业人员列表 |
| | | export const getPractitionerList = (current, size, params) => { |
| | | return request({ |
| | | url: "/api/blade-placePractitioner/placePractitioner/page", |
| | | method: "get", |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | }, |
| | | }); |
| | | }; |
| | | |
| | | //获取未成年人 、 少数民族从业人员数量 |
| | | export const getWarningPersonnelCount = (params) => { |
| | | return request({ |
| | | url: "/api/blade-placePractitioner/placePractitioner/countByType", |
| | | method: "get", |
| | | params: params |
| | | }); |
| | | }; |
| | | return request({ |
| | | url: "/api//blade-placeExt/placeExt/checkPlaceExt", |
| | | method: "post", |
| | | data |
| | | }); |
| | | }; |
| | | |
| | | |
| | | // 标准地址 |
| | | export const getPlaceAddressList = (params) => { |
| | | return request({ |
| | | url: "/api/blade-doorplateAddress/doorplateAddress/getPlaceList", |
| | | method: "get", |
| | | params: params |
| | | }); |
| | | }; |
| | | //获取从业人员列表 |
| | | export const getPractitionerList = (current, size, params) => { |
| | | return request({ |
| | | url: "/api/blade-placePractitioner/placePractitioner/page", |
| | | method: "get", |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | }, |
| | | }); |
| | | }; |
| | | |
| | | //获取未成年人 、 少数民族从业人员数量 |
| | | export const getWarningPersonnelCount = (params) => { |
| | | return request({ |
| | | url: "/api/blade-placePractitioner/placePractitioner/countByType", |
| | | method: "get", |
| | | params: params |
| | | }); |
| | | }; |
| | | |
| | | |
| | | // 标准地址 |
| | | export const getPlaceAddressList = (params) => { |
| | | return request({ |
| | | url: "/api/blade-doorplateAddress/doorplateAddress/getPlaceList", |
| | | method: "get", |
| | | params: params |
| | | }); |
| | | }; |
| | |
| | | 'Tenant-Id': tenantId, |
| | | 'Dept-Id': (website.switchMode ? deptId : ''), |
| | | 'Role-Id': (website.switchMode ? roleId : ''), |
| | | // 'Captcha-Key': key, |
| | | // 'Captcha-Code': code, |
| | | 'Captcha-Key': key, |
| | | 'Captcha-Code': code, |
| | | }, |
| | | params: { |
| | | tenantId, |
| | | username, |
| | | password, |
| | | grant_type:"password", |
| | | grant_type: "captcha", |
| | | scope: "all", |
| | | type, |
| | | // 查全部-暂定 |
| | | loginType:1 |
| | | loginType: 1 |
| | | } |
| | | }); |
| | | |
| | |
| | | url: '/api/blade-auth/oauth/clear-cache', |
| | | method: 'get', |
| | | authorization: false |
| | | }); |
| | | }); |
| | |
| | | <template> |
| | | <el-form class="login-form" status-icon :rules="loginRules" ref="loginForm" :model="loginForm" label-width="0"> |
| | | <!-- <el-form-item v-if="tenantMode" prop="tenantId"> |
| | | <el-input size="small" |
| | | @keyup.enter.native="handleLogin" |
| | | v-model="loginForm.tenantId" |
| | | auto-complete="off" |
| | | :placeholder="$t('login.tenantId')"> |
| | | <i slot="prefix" class="icon-quanxian"/> |
| | | <el-input size="small" @keyup.enter.native="handleLogin" v-model="loginForm.tenantId" auto-complete="off" |
| | | :placeholder="$t('login.tenantId')"> |
| | | <i slot="prefix" class="icon-quanxian" /> |
| | | </el-input> |
| | | </el-form-item> --> |
| | | <el-form-item prop="username"> |
| | |
| | | <i slot="prefix" class="icon-mima" /> |
| | | </el-input> |
| | | </el-form-item> |
| | | <!-- <el-form-item v-if="this.website.captchaMode" prop="code"> |
| | | <el-form-item v-if="this.website.captchaMode" prop="code"> |
| | | <el-row :span="24"> |
| | | <el-col :span="16"> |
| | | <el-input size="small" |
| | | @keyup.enter.native="handleLogin" |
| | | v-model="loginForm.code" |
| | | auto-complete="off" |
| | | :placeholder="$t('login.code')"> |
| | | <i slot="prefix" class="icon-yanzhengma"/> |
| | | <el-input size="small" @keyup.enter.native="handleLogin" v-model="loginForm.code" auto-complete="off" |
| | | :placeholder="$t('login.code')"> |
| | | <i slot="prefix" class="icon-yanzhengma" /> |
| | | </el-input> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <div class="login-code"> |
| | | <img :src="loginForm.image" class="login-code-img" @click="refreshCode" |
| | | /> |
| | | <img :src="loginForm.image" class="login-code-img" @click="refreshCode" /> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form-item> --> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" size="small" @click.native.prevent="handleLogin" class="login-submit">{{ |
| | | $t('login.submit') }} |
| | |
| | | import { |
| | | info |
| | | } from "@/api/system/tenant" |
| | | // import {getCaptcha} from "@/api/user"; |
| | | import { |
| | | getCaptcha |
| | | } from "@/api/user"; |
| | | import { |
| | | getTopUrl |
| | | } from "@/util/util" |
| | |
| | | username: [{ |
| | | required: true, |
| | | message: "请输入用户名", |
| | | trigger: "blur" |
| | | }], |
| | | code: [{ |
| | | required: true, |
| | | message: "请输入验证码", |
| | | trigger: "blur" |
| | | }], |
| | | password: [{ |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | this.getTenant() |
| | | // this.refreshCode(); |
| | | // this.getTenant() |
| | | this.refreshCode(); |
| | | }, |
| | | mounted() {}, |
| | | watch: { |
| | |
| | | }, |
| | | props: [], |
| | | methods: { |
| | | // refreshCode () { |
| | | // if (this.website.captchaMode) { |
| | | // getCaptcha().then(res => { |
| | | // const data = res.data |
| | | // this.loginForm.key = data.key |
| | | // this.loginForm.image = data.image |
| | | // }) |
| | | // } |
| | | // }, |
| | | refreshCode() { |
| | | if (this.website.captchaMode) { |
| | | getCaptcha().then(res => { |
| | | const data = res.data |
| | | this.loginForm.key = data.key |
| | | this.loginForm.image = data.image |
| | | }) |
| | | } |
| | | }, |
| | | showPassword() { |
| | | this.passwordType === "" ? |
| | | (this.passwordType = "password") : |
| | |
| | | loading.close() |
| | | }).catch(() => { |
| | | loading.close() |
| | | // this.refreshCode() |
| | | this.refreshCode() |
| | | }) |
| | | } |
| | | }) |
| | |
| | | hide: true, |
| | | searchSpan: 5, |
| | | searchLabelWidth: 76, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | }, { |
| | | overHidden: true, |
| | | label: "宣传标题", |
| | |
| | | width: 120 |
| | | }, |
| | | { |
| | | labelWidth: 120, |
| | | label: "所属街道", |
| | | parent: false, |
| | | search: true, |
| | |
| | | hide: true, |
| | | searchSpan: 5, |
| | | searchLabelWidth: 76, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | }, { |
| | | label: "地址", |
| | | prop: "address", |
| | | // align: 'center', |
| | | minWidth: 210, |
| | | search: true, |
| | | searchSpan: 5, |
| | |
| | | }, { |
| | | label: "核实内容信息", |
| | | prop: "recContent", |
| | | // align: 'center', |
| | | minWidth: 150, |
| | | labelWidth: 120, |
| | | type: "textarea", |
| | |
| | | overHidden: true, |
| | | }, |
| | | { |
| | | label: "核实现场照片", |
| | | prop: "sceUrls", |
| | | // align: 'center', |
| | | labelWidth: 120, |
| | | row: true, |
| | | span: 24, |
| | | fileType: 'img', |
| | | type: "upload", |
| | | listType: "picture-card", |
| | | dataType: "string", |
| | | width: 110, |
| | | }, { |
| | | label: "创建时间", |
| | | prop: "createTime", |
| | | labelWidth: 120, |
| | | align: 'center', |
| | | width: 156, |
| | | row: true, |
| | | searchPlaceholder: '请输入' |
| | | searchPlaceholder: '请输入', |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | }, { |
| | | label: "民警姓名", |
| | | prop: "policeman", |
| | |
| | | // }, |
| | | { |
| | | searchLabelWidth: 90, |
| | | labelWidth: 120, |
| | | label: "辖区派出所", |
| | | search: true, |
| | | searchSpan: 4, |
| | |
| | | labelWidth: 120, |
| | | searchLabelWidth: 96, |
| | | searchPlaceholder: '请输入宣防单位' |
| | | } |
| | | }, { |
| | | label: "核实现场照片", |
| | | prop: "sceUrls", |
| | | // align: 'center', |
| | | labelWidth: 120, |
| | | row: true, |
| | | span: 24, |
| | | fileType: 'img', |
| | | type: "upload", |
| | | listType: "picture-card", |
| | | dataType: "string", |
| | | width: 110, |
| | | }, |
| | | ], |
| | | }, |
| | | data: [] |
| | |
| | | <!-- 走访日志 --> |
| | | <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"> |
| | | <template slot="householdIdType" slot-scope="{item,value,label}"> |
| | | <span>{{ showNamePhone(item) }}</span> |
| | | </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"> |
| | | <template slot="householdIdType" slot-scope="{item,value,label}"> |
| | | <span>{{ showNamePhone(item) }}</span> |
| | | </template> |
| | | |
| | | <template slot="menuLeft"> |
| | | <el-button size="small" icon="el-icon-delete" plain v-if="permission.gridWorkLog_delete" |
| | | @click="handleDelete">删 除 |
| | | </el-button> |
| | | </template> |
| | | <template slot="menuLeft"> |
| | | <el-button size="small" icon="el-icon-delete" plain v-if="permission.gridWorkLog_delete" @click="handleDelete">删 |
| | | 除 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{row, size}" slot="phone"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, 'phoneflag')" |
| | | v-text="textDispose(row, 'phoneflag', 'phone')"> |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | <template slot-scope="{row, size}" slot="phone"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, 'phoneflag')" |
| | | v-text="textDispose(row, 'phoneflag', 'phone')"> |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getPersonPublicSelect } from "@/api/public" |
| | | import { getDetatils as householdDetail } from "@/api/userHouse/list/houseHold" |
| | | import { getList, remove, update, add, getGridWorkLog } from "@/api/grid/gridWorkLog" |
| | | import { getList as getHouseholdList, getDetatils as getHouseholdDetail } from "@/api/userHouse/list/houseHold" |
| | | import { mapGetters } from "vuex" |
| | | import website from '@/config/website' |
| | | import { |
| | | getPersonPublicSelect |
| | | } from "@/api/public" |
| | | import { |
| | | getDetatils as householdDetail |
| | | } from "@/api/userHouse/list/houseHold" |
| | | import { |
| | | getList, |
| | | remove, |
| | | update, |
| | | add, |
| | | getGridWorkLog |
| | | } from "@/api/grid/gridWorkLog" |
| | | import { |
| | | getList as getHouseholdList, |
| | | getDetatils as getHouseholdDetail |
| | | } from "@/api/userHouse/list/houseHold" |
| | | import { |
| | | mapGetters |
| | | } from "vuex" |
| | | import website from '@/config/website' |
| | | |
| | | export default { |
| | | data () { |
| | | return { |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | export default { |
| | | data() { |
| | | return { |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | }, |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 120, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 210, |
| | | |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | border: true, |
| | | //stripe:true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | excelBtn: true, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | width: 120, |
| | | label: "走访类型", |
| | | prop: "type", |
| | | span: 12, |
| | | searchSpan: 4, |
| | | search: true, |
| | | searchLabelWidth: 80, |
| | | type: "select", |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=haveType", |
| | | dataType: "number", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey", |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择走访类型", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 120, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 210, |
| | | |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | border: true, |
| | | //stripe:true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | excelBtn: true, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | width: 120, |
| | | label: "走访类型", |
| | | prop: "type", |
| | | span: 12, |
| | | searchSpan: 4, |
| | | search: true, |
| | | searchLabelWidth: 76, |
| | | type: "select", |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=haveType", |
| | | dataType: "number", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey", |
| | | }, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择走访类型", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | { |
| | | overHidden: true, |
| | | label: "重点人群", |
| | | prop: "personType", |
| | | span: 12, |
| | | type: "tree", |
| | | dicUrl: "/api/blade-label/label/getLabelList?parentId=100", |
| | | props: { |
| | | label: "name", |
| | | value: "id" |
| | | }, |
| | | searchSpan: 4, |
| | | search: true, |
| | | change: ({ value, column, item, dic }) => { |
| | | this.getUserList(value) |
| | | }, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择重点人群", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | { |
| | | width: 110, |
| | | display: false, |
| | | label: "被访人姓名", |
| | | prop: "name", |
| | | searchLabelWidth: 120, |
| | | searchSpan: 5, |
| | | search: true, |
| | | }, |
| | | |
| | | { |
| | | disabled: true, |
| | | label: "被访人姓名", |
| | | prop: "householdId", |
| | | type: 'select', |
| | | remote: true, |
| | | hide: true, |
| | | dicUrl: "", |
| | | props: { |
| | | label: 'name', |
| | | value: 'id', |
| | | }, |
| | | dicData: [], |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '请输入姓名', |
| | | trigger: 'blur' |
| | | } |
| | | ], |
| | | }, |
| | | |
| | | { |
| | | width: 120, |
| | | label: "联系方式", |
| | | prop: "phone", |
| | | span: 12, |
| | | disabled: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | slot: true |
| | | }, |
| | | |
| | | { |
| | | width: 156, |
| | | overHidden: true, |
| | | label: "走访地址", |
| | | prop: "address", |
| | | span: 24, |
| | | disabled: true, |
| | | }, |
| | | |
| | | { |
| | | width: 110, |
| | | label: "所属街道", |
| | | display: false, |
| | | prop: "townName", |
| | | }, |
| | | |
| | | { |
| | | width: 156, |
| | | overHidden: true, |
| | | label: "所属社区", |
| | | display: false, |
| | | prop: "neiName", |
| | | search: true, |
| | | searchSpan: 4 |
| | | }, |
| | | |
| | | { |
| | | width: 110, |
| | | overHidden: true, |
| | | label: "所属网格", |
| | | display: false, |
| | | prop: "gridName", |
| | | }, |
| | | { |
| | | width: 144, |
| | | label: "走访时间", |
| | | prop: "workTime", |
| | | searchLabelWidth: 120, |
| | | type: "date", |
| | | row: true, |
| | | format: "yyyy-MM-dd HH:mm:ss", |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入走访时间", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | { |
| | | overHidden: true, |
| | | label: "走访内容", |
| | | prop: "context", |
| | | type: "textarea", |
| | | span: 24, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入走访内容", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | { |
| | | width: 110, |
| | | label: "走访取证", |
| | | prop: "url", |
| | | type: "upload", |
| | | listType: "picture-card", |
| | | dataType: "string", |
| | | multiple: true, |
| | | action: "/api/blade-resource/oss/endpoint/put-file", |
| | | propsHttp: { |
| | | res: "data", |
| | | name: 'name', |
| | | url: "link", |
| | | }, |
| | | span: 24, |
| | | }, |
| | | |
| | | { |
| | | width: 110, |
| | | label: "录入人", |
| | | display: false, |
| | | prop: "createUserName", |
| | | }, |
| | | |
| | | |
| | | |
| | | { |
| | | display: false, |
| | | width: 144, |
| | | label: "上报时间", |
| | | prop: "createTime", |
| | | searchLabelWidth: 120, |
| | | type: "date", |
| | | format: "yyyy-MM-dd HH:mm:ss", |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入上报时间", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | { |
| | | overHidden: true, |
| | | label: "重点人群", |
| | | prop: "personType", |
| | | span: 12, |
| | | type: "tree", |
| | | dicUrl: "/api/blade-label/label/getLabelList?parentId=1000", |
| | | props: { |
| | | label: "name", |
| | | value: "id" |
| | | }, |
| | | searchSpan: 4, |
| | | search: true, |
| | | change: ({ |
| | | value, |
| | | column, |
| | | item, |
| | | dic |
| | | }) => { |
| | | this.getUserList(value) |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择重点人群", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | data: [], |
| | | } |
| | | |
| | | { |
| | | width: 110, |
| | | display: false, |
| | | label: "被访人姓名", |
| | | prop: "name", |
| | | searchLabelWidth: 120, |
| | | searchSpan: 5, |
| | | search: true, |
| | | }, |
| | | |
| | | { |
| | | disabled: true, |
| | | label: "被访人姓名", |
| | | prop: "householdId", |
| | | type: 'select', |
| | | remote: true, |
| | | hide: true, |
| | | dicUrl: "", |
| | | props: { |
| | | label: 'name', |
| | | value: 'id', |
| | | }, |
| | | dicData: [], |
| | | rules: [{ |
| | | required: true, |
| | | message: '请输入姓名', |
| | | trigger: 'blur' |
| | | }], |
| | | }, |
| | | |
| | | { |
| | | width: 100, |
| | | label: "联系方式", |
| | | prop: "phone", |
| | | span: 12, |
| | | disabled: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | slot: true |
| | | }, |
| | | |
| | | { |
| | | width: 156, |
| | | overHidden: true, |
| | | label: "走访地址", |
| | | prop: "address", |
| | | span: 24, |
| | | disabled: true, |
| | | }, |
| | | |
| | | { |
| | | width: 110, |
| | | label: "所属街道", |
| | | display: false, |
| | | prop: "townName", |
| | | }, |
| | | |
| | | { |
| | | width: 156, |
| | | overHidden: true, |
| | | label: "所属社区", |
| | | display: false, |
| | | prop: "neiName", |
| | | search: true, |
| | | searchSpan: 4 |
| | | }, |
| | | |
| | | { |
| | | width: 110, |
| | | overHidden: true, |
| | | label: "所属网格", |
| | | display: false, |
| | | prop: "gridName", |
| | | }, |
| | | { |
| | | width: 110, |
| | | searchLabelWidth: 80, |
| | | overHidden: true, |
| | | label: "状态", |
| | | display: false, |
| | | prop: "status", |
| | | type: 'select', |
| | | search: true, |
| | | searchSpan: 4, |
| | | dicData: [{ |
| | | label: "未走访", |
| | | value: "1", |
| | | }, |
| | | { |
| | | label: "已走访", |
| | | value: "2", |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | width: 140, |
| | | label: "走访时间", |
| | | prop: "workTime", |
| | | searchLabelWidth: 120, |
| | | type: "date", |
| | | row: true, |
| | | format: "yyyy-MM-dd HH:mm:ss", |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入走访时间", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | width: 140, |
| | | overHidden: true, |
| | | label: "走访内容", |
| | | prop: "context", |
| | | type: "textarea", |
| | | span: 24, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入走访内容", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | width: 110, |
| | | label: "走访取证", |
| | | prop: "url", |
| | | type: "upload", |
| | | listType: "picture-card", |
| | | dataType: "string", |
| | | multiple: true, |
| | | action: "/api/blade-resource/oss/endpoint/put-file", |
| | | propsHttp: { |
| | | res: "data", |
| | | name: 'name', |
| | | url: "link", |
| | | }, |
| | | span: 24, |
| | | }, |
| | | |
| | | { |
| | | width: 110, |
| | | label: "录入人", |
| | | display: false, |
| | | prop: "createUserName", |
| | | }, |
| | | |
| | | |
| | | |
| | | { |
| | | display: false, |
| | | width: 144, |
| | | label: "上报时间", |
| | | prop: "createTime", |
| | | searchLabelWidth: 120, |
| | | type: "date", |
| | | format: "yyyy-MM-dd HH:mm:ss", |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入上报时间", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | ], |
| | | }, |
| | | data: [], |
| | | } |
| | | }, |
| | | |
| | | watch: { |
| | | "form.householdId": { |
| | | handler (val) { |
| | | if (val) { |
| | | "form.householdId": { |
| | | handler(val) { |
| | | if (val) { |
| | | |
| | | householdDetail(val).then(res => { |
| | | let data = res.data.data |
| | | householdDetail(val).then(res => { |
| | | let data = res.data.data |
| | | |
| | | this.form.phone = data.phoneNumber |
| | | this.form.address = data.currentAddress |
| | | }) |
| | | this.form.phone = data.phoneNumber |
| | | this.form.address = data.currentAddress |
| | | }) |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | |
| | | 'form.personType': { |
| | | handler(newData) { |
| | | let householdIdColumn = this.findObject( |
| | | this.option.column, |
| | | 'householdId' |
| | | ) |
| | | |
| | | if (newData) { |
| | | householdIdColumn.disabled = false |
| | | } else { |
| | | householdIdColumn.disabled = true |
| | | } |
| | | }, |
| | | }, |
| | | |
| | | 'form.personType': { |
| | | handler (newData) { |
| | | let householdIdColumn = this.findObject( |
| | | this.option.column, |
| | | 'householdId' |
| | | ) |
| | | 'form.type': { |
| | | handler(newData) { |
| | | let householdIdColumn = this.findObject( |
| | | this.option.column, |
| | | 'householdId' |
| | | ) |
| | | |
| | | if (newData) { |
| | | householdIdColumn.disabled = false |
| | | } else { |
| | | householdIdColumn.disabled = true |
| | | } |
| | | }, |
| | | let personTypeColumn = this.findObject( |
| | | this.option.column, |
| | | 'personType' |
| | | ) |
| | | |
| | | if (newData == 1) { |
| | | householdIdColumn.disabled = false |
| | | personTypeColumn.display = false |
| | | } else { |
| | | householdIdColumn.disabled = true |
| | | personTypeColumn.display = true |
| | | } |
| | | }, |
| | | |
| | | 'form.type': { |
| | | handler (newData) { |
| | | let householdIdColumn = this.findObject( |
| | | this.option.column, |
| | | 'householdId' |
| | | ) |
| | | |
| | | let personTypeColumn = this.findObject( |
| | | this.option.column, |
| | | 'personType' |
| | | ) |
| | | |
| | | if (newData == 1) { |
| | | householdIdColumn.disabled = false |
| | | personTypeColumn.display = false |
| | | } else { |
| | | householdIdColumn.disabled = true |
| | | personTypeColumn.display = true |
| | | } |
| | | }, |
| | | }, |
| | | }, |
| | | }, |
| | | |
| | | computed: { |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | permissionList () { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.gridWorkLog_add, true), |
| | | 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 = [] |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(",") |
| | | }, |
| | | |
| | | showNamePhone () { |
| | | return (data) => { |
| | | if (data.phoneNumber && data.phoneNumber.trim() != '') { |
| | | return `${data.name}(${data.phoneNumber})` |
| | | } |
| | | |
| | | return data.name |
| | | } |
| | | }, |
| | | |
| | | textDispose () { |
| | | return (row, flag, type) => { |
| | | if (row[flag] || row[type] == null) { |
| | | return row[type] |
| | | } else { |
| | | if (type == 'principalIdCard') { |
| | | return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2") |
| | | } else { |
| | | return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2") |
| | | } |
| | | } |
| | | } |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.gridWorkLog_add, true), |
| | | 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 = [] |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(",") |
| | | }, |
| | | |
| | | showNamePhone() { |
| | | return (data) => { |
| | | if (data.phoneNumber && data.phoneNumber.trim() != '') { |
| | | return `${data.name}(${data.phoneNumber})` |
| | | } |
| | | |
| | | return data.name |
| | | } |
| | | }, |
| | | |
| | | textDispose() { |
| | | return (row, flag, type) => { |
| | | if (row[flag] || row[type] == null) { |
| | | return row[type] |
| | | } else { |
| | | if (type == 'principalIdCard') { |
| | | return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2") |
| | | } else { |
| | | return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2") |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | |
| | | created () { |
| | | this.getUserList() |
| | | created() { |
| | | this.getUserList() |
| | | }, |
| | | |
| | | methods: { |
| | | showStringDispose (row, type) { |
| | | row[type] = !row[type] |
| | | }, |
| | | showStringDispose(row, type) { |
| | | row[type] = !row[type] |
| | | }, |
| | | |
| | | getUserList (param = '') { |
| | | let dicUrl = `/api/blade-household/household/selectHouseholdList?labelId=${param}&searchKey={{key}}&limit=20` |
| | | const column = this.findObject(this.option.column, "householdId") |
| | | column.dicUrl = dicUrl |
| | | }, |
| | | getUserList(param = '') { |
| | | let dicUrl = `/api/blade-household/household/selectHouseholdList?labelId=${param}&searchKey={{key}}&limit=20` |
| | | const column = this.findObject(this.option.column, "householdId") |
| | | column.dicUrl = dicUrl |
| | | }, |
| | | |
| | | rowSave (row, done, loading) { |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | add(row).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | rowUpdate (row, index, done, loading) { |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | rowDel (row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | }) |
| | | }, |
| | | searchReset () { |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange (params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange (list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear () { |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | handleDelete () { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | beforeOpen (done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getGridWorkLog(this.form.id).then((res) => { |
| | | this.form = res.data.data |
| | | if (this.form.url) { |
| | | if (this.form.url.length > 0) { |
| | | var urls = [] |
| | | var names = this.form.url.split(",") |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | this.form.url = urls.join(",") |
| | | } |
| | | } |
| | | getPersonPublicSelect({ |
| | | id: this.form.householdId |
| | | }).then(res => { |
| | | const column = this.findObject(this.option.column, "householdId") |
| | | column.dicData = res.data.data |
| | | }) |
| | | }) |
| | | } |
| | | // con |
| | | done() |
| | | }, |
| | | currentChange (currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange (pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange () { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad (page, params = {}) { |
| | | 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 |
| | | getList(page.currentPage, page.pageSize, values).then((res) => { |
| | | const data = res.data.data |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.data.forEach(item => { |
| | | this.$set(item, 'phoneflag', false) |
| | | if (item.url) { |
| | | if (item.url.length > 0) { |
| | | var urls = [] |
| | | var names = item.url.split(",") |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | item.url = urls.join(",") |
| | | } |
| | | } |
| | | }) |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | rowSave(row, done, loading) { |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | add(row).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | }) |
| | | }, |
| | | searchReset() { |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getGridWorkLog(this.form.id).then((res) => { |
| | | this.form = res.data.data |
| | | if (this.form.url) { |
| | | if (this.form.url.length > 0) { |
| | | var urls = [] |
| | | var names = this.form.url.split(",") |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | this.form.url = urls.join(",") |
| | | } |
| | | } |
| | | getPersonPublicSelect({ |
| | | id: this.form.householdId |
| | | }).then(res => { |
| | | const column = this.findObject(this.option.column, "householdId") |
| | | column.dicData = res.data.data |
| | | }) |
| | | }) |
| | | } |
| | | // con |
| | | done() |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | 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 |
| | | getList(page.currentPage, page.pageSize, values).then((res) => { |
| | | const data = res.data.data |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.data.forEach(item => { |
| | | this.$set(item, 'phoneflag', false) |
| | | if (item.url) { |
| | | if (item.url.length > 0) { |
| | | var urls = [] |
| | | var names = item.url.split(",") |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | item.url = urls.join(",") |
| | | } |
| | | } |
| | | }) |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .avue-upload__icon { |
| | | .avue-upload__icon { |
| | | line-height: 6; |
| | | } |
| | | </style> |
| | | } |
| | | </style> |
| New file |
| | |
| | | <!-- 走访日志 --> |
| | | <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"> |
| | | <template slot="householdIdType" slot-scope="{item,value,label}"> |
| | | <span>{{ showNamePhone(item) }}</span> |
| | | </template> |
| | | |
| | | <template slot="menuLeft"> |
| | | <el-button size="small" icon="el-icon-delete" plain v-if="permission.gridWorkLog_delete" @click="handleDelete">删 |
| | | 除 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{row, size}" slot="phone"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, 'phoneflag')" |
| | | v-text="textDispose(row, 'phoneflag', 'phone')"> |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getPersonPublicSelect |
| | | } from "@/api/public" |
| | | import { |
| | | getDetatils as householdDetail |
| | | } from "@/api/userHouse/list/houseHold" |
| | | import { |
| | | getList, |
| | | remove, |
| | | update, |
| | | add, |
| | | getGridWorkLog |
| | | } from "@/api/grid/gridWorkLog" |
| | | import { |
| | | getList as getHouseholdList, |
| | | getDetatils as getHouseholdDetail |
| | | } from "@/api/userHouse/list/houseHold" |
| | | import { |
| | | mapGetters |
| | | } from "vuex" |
| | | import website from '@/config/website' |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | }, |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 120, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 210, |
| | | |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | border: true, |
| | | //stripe:true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | excelBtn: true, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | width: 120, |
| | | label: "走访类型", |
| | | prop: "type", |
| | | span: 12, |
| | | searchSpan: 4, |
| | | search: true, |
| | | searchLabelWidth: 80, |
| | | type: "select", |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=haveType", |
| | | dataType: "number", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey", |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择走访类型", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | |
| | | { |
| | | overHidden: true, |
| | | label: "重点人群", |
| | | prop: "personType", |
| | | span: 12, |
| | | type: "tree", |
| | | dicUrl: "/api/blade-label/label/getLabelList?parentId=1000", |
| | | props: { |
| | | label: "name", |
| | | value: "id" |
| | | }, |
| | | searchSpan: 4, |
| | | search: true, |
| | | change: ({ |
| | | value, |
| | | column, |
| | | item, |
| | | dic |
| | | }) => { |
| | | this.getUserList(value) |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择重点人群", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | |
| | | { |
| | | width: 110, |
| | | display: false, |
| | | label: "被访人姓名", |
| | | prop: "name", |
| | | searchLabelWidth: 120, |
| | | searchSpan: 5, |
| | | search: true, |
| | | }, |
| | | |
| | | { |
| | | disabled: true, |
| | | label: "被访人姓名", |
| | | prop: "householdId", |
| | | type: 'select', |
| | | remote: true, |
| | | hide: true, |
| | | dicUrl: "", |
| | | props: { |
| | | label: 'name', |
| | | value: 'id', |
| | | }, |
| | | dicData: [], |
| | | rules: [{ |
| | | required: true, |
| | | message: '请输入姓名', |
| | | trigger: 'blur' |
| | | }], |
| | | }, |
| | | |
| | | { |
| | | width: 100, |
| | | label: "联系方式", |
| | | prop: "phone", |
| | | span: 12, |
| | | disabled: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | slot: true |
| | | }, |
| | | |
| | | { |
| | | width: 156, |
| | | overHidden: true, |
| | | label: "走访地址", |
| | | prop: "address", |
| | | span: 24, |
| | | disabled: true, |
| | | }, |
| | | |
| | | { |
| | | width: 110, |
| | | label: "所属街道", |
| | | display: false, |
| | | prop: "townName", |
| | | }, |
| | | |
| | | { |
| | | width: 156, |
| | | overHidden: true, |
| | | label: "所属社区", |
| | | display: false, |
| | | prop: "neiName", |
| | | search: true, |
| | | searchSpan: 4 |
| | | }, |
| | | |
| | | { |
| | | width: 110, |
| | | overHidden: true, |
| | | label: "所属网格", |
| | | display: false, |
| | | prop: "gridName", |
| | | }, |
| | | { |
| | | width: 110, |
| | | searchLabelWidth: 80, |
| | | overHidden: true, |
| | | label: "状态", |
| | | display: false, |
| | | prop: "status", |
| | | type: 'select', |
| | | search: true, |
| | | searchSpan: 4, |
| | | dicData: [{ |
| | | label: "未走访", |
| | | value: "1", |
| | | }, |
| | | { |
| | | label: "已走访", |
| | | value: "2", |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | width: 140, |
| | | label: "走访时间", |
| | | prop: "workTime", |
| | | searchLabelWidth: 120, |
| | | type: "date", |
| | | row: true, |
| | | format: "yyyy-MM-dd HH:mm:ss", |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入走访时间", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | width: 140, |
| | | overHidden: true, |
| | | label: "走访内容", |
| | | prop: "context", |
| | | type: "textarea", |
| | | span: 24, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入走访内容", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | width: 110, |
| | | label: "走访取证", |
| | | prop: "url", |
| | | type: "upload", |
| | | listType: "picture-card", |
| | | dataType: "string", |
| | | multiple: true, |
| | | action: "/api/blade-resource/oss/endpoint/put-file", |
| | | propsHttp: { |
| | | res: "data", |
| | | name: 'name', |
| | | url: "link", |
| | | }, |
| | | span: 24, |
| | | }, |
| | | |
| | | { |
| | | width: 110, |
| | | label: "录入人", |
| | | display: false, |
| | | prop: "createUserName", |
| | | }, |
| | | |
| | | |
| | | |
| | | { |
| | | display: false, |
| | | width: 144, |
| | | label: "上报时间", |
| | | prop: "createTime", |
| | | searchLabelWidth: 120, |
| | | type: "date", |
| | | format: "yyyy-MM-dd HH:mm:ss", |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入上报时间", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | ], |
| | | }, |
| | | data: [], |
| | | } |
| | | }, |
| | | |
| | | watch: { |
| | | "form.householdId": { |
| | | handler(val) { |
| | | if (val) { |
| | | |
| | | householdDetail(val).then(res => { |
| | | let data = res.data.data |
| | | |
| | | this.form.phone = data.phoneNumber |
| | | this.form.address = data.currentAddress |
| | | }) |
| | | |
| | | } |
| | | } |
| | | }, |
| | | |
| | | 'form.personType': { |
| | | handler(newData) { |
| | | let householdIdColumn = this.findObject( |
| | | this.option.column, |
| | | 'householdId' |
| | | ) |
| | | |
| | | if (newData) { |
| | | householdIdColumn.disabled = false |
| | | } else { |
| | | householdIdColumn.disabled = true |
| | | } |
| | | }, |
| | | }, |
| | | |
| | | 'form.type': { |
| | | handler(newData) { |
| | | let householdIdColumn = this.findObject( |
| | | this.option.column, |
| | | 'householdId' |
| | | ) |
| | | |
| | | let personTypeColumn = this.findObject( |
| | | this.option.column, |
| | | 'personType' |
| | | ) |
| | | |
| | | if (newData == 1) { |
| | | householdIdColumn.disabled = false |
| | | personTypeColumn.display = false |
| | | } else { |
| | | householdIdColumn.disabled = true |
| | | personTypeColumn.display = true |
| | | } |
| | | }, |
| | | }, |
| | | }, |
| | | |
| | | computed: { |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.gridWorkLog_add, true), |
| | | 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 = [] |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(",") |
| | | }, |
| | | |
| | | showNamePhone() { |
| | | return (data) => { |
| | | if (data.phoneNumber && data.phoneNumber.trim() != '') { |
| | | return `${data.name}(${data.phoneNumber})` |
| | | } |
| | | |
| | | return data.name |
| | | } |
| | | }, |
| | | |
| | | textDispose() { |
| | | return (row, flag, type) => { |
| | | if (row[flag] || row[type] == null) { |
| | | return row[type] |
| | | } else { |
| | | if (type == 'principalIdCard') { |
| | | return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2") |
| | | } else { |
| | | return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2") |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | |
| | | created() { |
| | | this.getUserList() |
| | | }, |
| | | |
| | | methods: { |
| | | showStringDispose(row, type) { |
| | | row[type] = !row[type] |
| | | }, |
| | | |
| | | getUserList(param = '') { |
| | | let dicUrl = `/api/blade-household/household/selectHouseholdList?labelId=${param}&searchKey={{key}}&limit=20` |
| | | const column = this.findObject(this.option.column, "householdId") |
| | | column.dicUrl = dicUrl |
| | | }, |
| | | |
| | | rowSave(row, done, loading) { |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | add(row).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | }) |
| | | }, |
| | | searchReset() { |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getGridWorkLog(this.form.id).then((res) => { |
| | | this.form = res.data.data |
| | | if (this.form.url) { |
| | | if (this.form.url.length > 0) { |
| | | var urls = [] |
| | | var names = this.form.url.split(",") |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | this.form.url = urls.join(",") |
| | | } |
| | | } |
| | | getPersonPublicSelect({ |
| | | id: this.form.householdId |
| | | }).then(res => { |
| | | const column = this.findObject(this.option.column, "householdId") |
| | | column.dicData = res.data.data |
| | | }) |
| | | }) |
| | | } |
| | | // con |
| | | done() |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | 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 |
| | | getList(page.currentPage, page.pageSize, values).then((res) => { |
| | | const data = res.data.data |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.data.forEach(item => { |
| | | this.$set(item, 'phoneflag', false) |
| | | if (item.url) { |
| | | if (item.url.length > 0) { |
| | | var urls = [] |
| | | var names = item.url.split(",") |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | item.url = urls.join(",") |
| | | } |
| | | } |
| | | }) |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .avue-upload__icon { |
| | | line-height: 6; |
| | | } |
| | | </style> |
| | |
| | | searchSpan: 4, |
| | | type: "tree", |
| | | // search: true, |
| | | row: true, |
| | | // row: true, |
| | | hide: true, |
| | | dicUrl: "/api/blade-policeStation/policeStation/tree", |
| | | props: { |
| | |
| | | search: true, |
| | | searchSpan: 4, |
| | | // parent: false, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | prop: "pcsName", |
| | | type: "tree", |
| | | dicUrl: "/api/blade-system/dept/treeByDept?deptId=1727974759086493697", |
| | |
| | | label: "所属社区", |
| | | prop: "communityName", |
| | | search: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | searchSpan: 4, |
| | | width: 150, |
| | | type: "tree", |
| | |
| | | <box-title class="m10" :classVal="9" :title="'房东信息'"></box-title> |
| | | <avue-form v-if="restShow" ref="restForm" :option="houseOwnerOption" v-model="placeForm"></avue-form> |
| | | |
| | | <box-title class="m10" :classVal="9" :title="'其他信息'"></box-title> |
| | | <avue-form v-if="restShow" ref="restForm" :option="optionDetail" v-model="placeForm"></avue-form> |
| | | <box-title class="m10" :classVal="9" :title="'学校信息'" v-if="schoolShow"></box-title> |
| | | <avue-form v-if="schoolShow" ref="restForm" :option="optionDetail" v-model="placeForm"></avue-form> |
| | | |
| | | <box-title class="m10" :classVal="9" :title="'从业人员'"></box-title> |
| | | <avue-crud :option="placeOption" :table-loading="loading" :data="placeExt" ref="crud" v-model="houseHoldForm" |
| | |
| | | roleBox: false, |
| | | baseShow: false, |
| | | restShow: false, |
| | | schoolShow: false, |
| | | |
| | | placeExt: [], |
| | | |
| | |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | |
| | | |
| | | |
| | | { |
| | | label: "负责人", |
| | | prop: "principal", |
| | |
| | | prop: "addressName", |
| | | span: 12 |
| | | }, |
| | | |
| | | // { |
| | | // width: 160, |
| | | // overHidden: true, |
| | | // slot: true, |
| | | // label: "标准地址", |
| | | // prop: "houseCodeBinds", |
| | | // span: 24, |
| | | // type: 'select', |
| | | // labelWidth:120, |
| | | // dataType: "object", |
| | | // remote: true, |
| | | // multiple: true, |
| | | // hide: true, |
| | | // display: false, |
| | | // filterable:true, |
| | | // dicUrl: `/api/blade-doorplateAddress/doorplateAddress/getPlaceList`, |
| | | // props: { |
| | | // label: 'addressName', |
| | | // value: 'addressCode', |
| | | // }, |
| | | // dicData: [], |
| | | // rules: [{ |
| | | // required: false, |
| | | // message: "请选择标准地址", |
| | | // trigger: "blur", |
| | | // }, ] |
| | | // }, |
| | | { |
| | | span: 24, |
| | | hide: true, |
| | |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | |
| | | |
| | | { |
| | | label: "营业执照", |
| | | prop: "imageUrls", |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | loading: true, |
| | | placeOption: { |
| | | menu: true, |
| | |
| | | label: "身份证号", |
| | | prop: "idCard", |
| | | }, |
| | | |
| | | { |
| | | labelWidth: 100, |
| | | label: "电话号码", |
| | |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | |
| | | { |
| | | labelWidth: 100, |
| | | label: "现居住地", |
| | |
| | | prop: "jobNature", |
| | | // hide: true |
| | | }, |
| | | |
| | | { |
| | | label: "从业人员照片", |
| | | prop: "employerImg", |
| | |
| | | type: "datetime", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | // format: "yyyy-MM-dd hh:mm:ss", |
| | | // valueFormat: "yyyy-MM-dd hh:mm:ss", |
| | | rules: [{ |
| | | required: false, |
| | | message: "请选择离职时间", |
| | |
| | | } |
| | | ], |
| | | }, |
| | | |
| | | ] |
| | | }, |
| | | holdPage: { |
| | |
| | | slot: true, |
| | | overHidden: true, |
| | | rules: [{ |
| | | // validator: validatorPhone, |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | |
| | | userOption: { |
| | | submitBtn: false, |
| | | emptyBtn: false, |
| | | column: [ |
| | | |
| | | { |
| | | column: [{ |
| | | width: 96, |
| | | label: "电话", |
| | | prop: "legalTel", |
| | |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | |
| | | |
| | | |
| | | ], |
| | | }, |
| | | |
| | | standardAddressList: [], //标准地址数据 |
| | | standardAddress: "", |
| | | standardAddressSearchKey: "" |
| | |
| | | this.roleBox = true |
| | | this.baseShow = false |
| | | this.restShow = false |
| | | this.schoolShow = false |
| | | this.form = {} |
| | | this.placeForm = {} |
| | | |
| | |
| | | .join(",") |
| | | } |
| | | |
| | | if ( |
| | | that.form.placePoiLabelVOList && |
| | | that.form.placePoiLabelVOList.length |
| | | ) { |
| | | if (that.form.placePoiLabelVOList && that.form.placePoiLabelVOList.length) { |
| | | let lebelTwo = that.form.placePoiLabelVOList.find((item) => { |
| | | return item.type == 2 |
| | | }) |
| | |
| | | |
| | | that.baseShow = true |
| | | const data = restInfo.data.data |
| | | |
| | | |
| | | |
| | | |
| | | if (data) { |
| | | let imageUrls = data.imageUrls |
| | |
| | | |
| | | } |
| | | } |
| | | |
| | | console.log("***********1**********", that.form) |
| | | if (that.form.label === '1601') { |
| | | that.schoolShow = true |
| | | } |
| | | that.restShow = true |
| | | }) |
| | | ) |
| | |
| | | this.$refs.restForm && this.$refs.restForm.resetForm() |
| | | this.baseShow = false |
| | | this.restShow = false |
| | | this.schoolShow = false |
| | | this.roleBox = false |
| | | }, |
| | | |
| | |
| | | justify-content: center; |
| | | } |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | </template> |
| | | |
| | | <template slot-scope="{row, size}" slot="number1"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, '1033')"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, '1025')"> |
| | | {{ row.number1 }} |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{row, size}" slot="number2"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, '15')"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, '23')"> |
| | | {{ row.number2 }} |
| | | </el-button> |
| | | </template> |
| | |
| | | }, |
| | | { |
| | | span: 12, |
| | | label: "孤寡老人", |
| | | label: "取保监居", |
| | | prop: "number1", |
| | | align: 'center', |
| | | searchSpan: 4, |
| | | }, |
| | | { |
| | | span: 12, |
| | | label: "留守儿童", |
| | | label: "关注人员", |
| | | prop: "number2", |
| | | align: 'center', |
| | | searchSpan: 4, |
| | |
| | | |
| | | showStringDispose(row, type) { |
| | | row.labelId = type |
| | | row.parentId = 1032 |
| | | row.parentId = 103 |
| | | this.userPopup = true |
| | | var that = this |
| | | this.$nextTick(() => { |
| | |
| | | <el-button type="text" :size="size" plain @click.stop="getDetail(row)"> |
| | | 详情 |
| | | </el-button> |
| | | <el-button type="text" :size="size" icon="el-icon-s-check" v-if="permission.place_check" |
| | | :disabled="row.status != 1" plain @click=" goAudit(row)">审 核 |
| | | |
| | | <el-button type="text" :size="size" v-if="permission.place_check" :disabled="row.status != 1" plain |
| | | @click=" goAudit(row)">审 核 |
| | | </el-button> |
| | | <!-- <el-button type="text" :size="size" icon="el-icon-delete" v-if="permission.place_del" plain |
| | | @click="rowDel(row)">删 除 |
| | | </el-button> --> |
| | | |
| | | <!-- <el-button type="text" :size="size" icon="el-icon-view" plain @click="rowDel(row)"> 删除 |
| | | </el-button> --> |
| | | |
| | | <el-button type="text" :size="size" plain @click="rowUpdateLabelColor(row)"> 标签颜色 |
| | | </el-button> |
| | | |
| | | </template> |
| | | |
| | | <template slot="status" slot-scope="{row, size}"> |
| | |
| | | <el-dialog :visible.sync="visible" append-to-body destroy-on-close title="审核" width="30%" |
| | | custom-class="flow-design-dialog" :before-close="handleClose"> |
| | | <audit-base @handleSubmit="submitAudit"></audit-base> |
| | | </el-dialog> |
| | | |
| | | <el-dialog :visible.sync="visibleLabelColor" append-to-body destroy-on-close title="标签颜色" width="600px" |
| | | custom-class="flow-design-dialog" :before-close="handleLabelColorClose"> |
| | | |
| | | <div class="labelColor"> |
| | | |
| | | <div style="width:200px; margin: auto; |
| | | "> |
| | | <div> |
| | | <el-radio-group v-model="color" @input="changColor"> |
| | | <el-radio-button label="green">绿</el-radio-button> |
| | | <el-radio-button label="yellow">黄</el-radio-button> |
| | | <el-radio-button label="red">红</el-radio-button> |
| | | </el-radio-group> |
| | | </div> |
| | | |
| | | <div style=" width:200px;margin: auto; text-align: center;"> |
| | | <el-button style="margin-top: 40px;" @click="saveLabelColor()" type="primary">保存</el-button> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </el-dialog> |
| | | |
| | | <el-drawer title="消防自查详情" :visible.sync="isDetail" :append-to-body="true" size="40%" direction="rtl"> |
| | |
| | | {{ item.remark }} |
| | | </div> |
| | | </div> |
| | | <div class="yh-pic-box"> |
| | | <!-- <div class="yh-pic-box"> |
| | | <div class="yh-pic-name"> |
| | | 整改后图片 |
| | | </div> |
| | |
| | | <div class="yh-remark-value"> |
| | | {{ item.rectificationRemark }} |
| | | </div> |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | </div> |
| | | </el-drawer> |
| | |
| | | update, |
| | | add, |
| | | } from "@/api/task/task" |
| | | |
| | | import { |
| | | updatePoiLabelColor |
| | | } from '@/api/place/place' |
| | | |
| | | import { |
| | | mapGetters |
| | |
| | | } |
| | | |
| | | return { |
| | | color: 'green', |
| | | placeId: '', |
| | | isDetail: false, |
| | | refreshNum: 1, |
| | | rowDetail: [], |
| | |
| | | }], |
| | | }, |
| | | visible: false, |
| | | visibleLabelColor: false, |
| | | taskType: 0, |
| | | curRow: {}, |
| | | roleBox: false, |
| | |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 200, |
| | | menuWidth: 260, |
| | | // menu: false, |
| | | height: "auto", |
| | | calcHeight: 54, |
| | |
| | | searchSpan: 5, |
| | | searchLabelWidth: 76, |
| | | }, { |
| | | width: 140, |
| | | label: "场所名称", |
| | | prop: "placeName", |
| | | span: 24, |
| | |
| | | align: 'center' |
| | | }, |
| | | { |
| | | width: 140, |
| | | label: "场所地址", |
| | | prop: "location", |
| | | span: 24, |
| | |
| | | searchLabelWidth: 46, |
| | | overHidden: true, |
| | | align: 'center' |
| | | }, { |
| | | }, |
| | | { |
| | | width: 120, |
| | | label: "场所类别", |
| | | prop: "nineType", |
| | | align: 'center', |
| | |
| | | align: 'center' |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "场所负责人电话", |
| | | prop: "principalPhone", |
| | | span: 24, |
| | |
| | | prop: "status", |
| | | span: 24, |
| | | align: 'center', |
| | | slot: true, |
| | | // slot: true, |
| | | type: "select", |
| | | searchSpan: 4, |
| | | search: true, |
| | | dicData: [{ |
| | | label: "待审核", |
| | | value: 1 |
| | | }, |
| | | { |
| | | label: "已审核", |
| | | value: 2 |
| | | }, |
| | | { |
| | | label: "未通过", |
| | | value: 3 |
| | | }, |
| | | { |
| | | label: "待完成", |
| | | value: 4 |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | label: "标签颜色", |
| | | prop: "color", |
| | | span: 24, |
| | | row: true, |
| | | searchLabelWidth: 46, |
| | | align: 'center', |
| | | dicData: [{ |
| | | label: "绿", |
| | | value: "green", |
| | | }, |
| | | { |
| | | label: "黄", |
| | | value: "yellow", |
| | | }, |
| | | { |
| | | label: "红", |
| | | value: "red", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | width: 120, |
| | | label: "创建时间", |
| | | prop: "createTime", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | searchLabelWidth: 46, |
| | | align: 'center' |
| | | }, |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | changColor(e) { |
| | | console.log("*******************", e) |
| | | this.color = e |
| | | }, |
| | | |
| | | saveLabelColor() { |
| | | updatePoiLabelColor(this.placeId, this.color).then(res => { |
| | | if (res.data) { |
| | | this.visibleLabelColor = false |
| | | this.onLoad(this.page, this.query) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | rowUpdateLabelColor(row) { |
| | | this.visibleLabelColor = true |
| | | this.color = row.color |
| | | this.placeId = row.placeId |
| | | }, |
| | | // 点击展开收缩 |
| | | flodQL(index) { |
| | | this.rowDetail.qTypeList[index].isShowQList = !this.rowDetail.qTypeList[index].isShowQList |
| | |
| | | // 弹窗关闭回调 |
| | | handleClose() { |
| | | this.cancelAudit() |
| | | }, |
| | | // 弹窗关闭回调 |
| | | handleLabelColorClose() { |
| | | // this.cancelAudit() |
| | | this.visibleLabelColor = false |
| | | }, |
| | | |
| | | // 取消审核 |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .labelColor { |
| | | // display: flex; |
| | | // justify-content: center; |
| | | /* 居中对齐 */ |
| | | } |
| | | </style> |
| New file |
| | |
| | | <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"> |
| | | |
| | | <template slot-scope="{row, size}" slot="menu"> |
| | | <!-- <el-button type="text" :size="size" icon="el-icon-view" v-if="permission.place_view" plain |
| | | @click="lookDetail(row, 0)">查 看 |
| | | </el-button> --> |
| | | <el-button type="text" :size="size" plain @click.stop="getDetail(row)"> |
| | | 详情 |
| | | </el-button> |
| | | |
| | | <el-button type="text" :size="size" v-if="permission.place_check" :disabled="row.status != 1" plain |
| | | @click=" goAudit(row)">审 核 |
| | | </el-button> |
| | | |
| | | <!-- <el-button type="text" :size="size" icon="el-icon-view" plain @click="rowDel(row)"> 删除 |
| | | </el-button> --> |
| | | |
| | | <el-button type="text" :size="size" plain @click="rowUpdateLabelColor(row)"> 标签颜色 |
| | | </el-button> |
| | | |
| | | </template> |
| | | |
| | | <template slot="status" slot-scope="{row, size}"> |
| | | <el-tag :size="size" :type="showStatus(row.status).type"> |
| | | {{ showStatus(row.status).text }} |
| | | </el-tag> |
| | | </template> |
| | | |
| | | <template slot-scope="{row, size}" slot="principalPhone"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, 'principalPhoneflag')" |
| | | v-text="textDispose(row, 'principalPhoneflag', 'principalPhone')"> |
| | | </el-button> |
| | | </template> |
| | | <template slot="menuLeft"> |
| | | <el-button type="warning" size="small" plain icon="el-icon-download" @click="handleExport">导出 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | |
| | | |
| | | <el-dialog title="" append-to-body :visible.sync="auditBasePopup" width="60%"> |
| | | <campusReporting @colseDetail="colseDetail" v-if="taskType == 6" ref="campusReporting"></campusReporting> |
| | | <hotelReporting @colseDetail="colseDetail" v-if="taskType == 2" ref="hotelReporting"></hotelReporting> |
| | | <labelReporting @colseDetail="colseDetail" v-if="taskType == 3" ref="labelReporting"></labelReporting> |
| | | </el-dialog> |
| | | |
| | | <el-dialog :visible.sync="visible" append-to-body destroy-on-close title="审核" width="30%" |
| | | custom-class="flow-design-dialog" :before-close="handleClose"> |
| | | <audit-base @handleSubmit="submitAudit"></audit-base> |
| | | </el-dialog> |
| | | |
| | | <el-dialog :visible.sync="visibleLabelColor" append-to-body destroy-on-close title="标签颜色" width="600px" |
| | | custom-class="flow-design-dialog" :before-close="handleLabelColorClose"> |
| | | |
| | | <div class="labelColor"> |
| | | |
| | | <div style="width:200px; margin: auto; |
| | | "> |
| | | <div> |
| | | <el-radio-group v-model="color" @input="changColor"> |
| | | <el-radio-button label="green">绿</el-radio-button> |
| | | <el-radio-button label="yellow">黄</el-radio-button> |
| | | <el-radio-button label="red">红</el-radio-button> |
| | | </el-radio-group> |
| | | </div> |
| | | |
| | | <div style=" width:200px;margin: auto; text-align: center;"> |
| | | <el-button style="margin-top: 40px;" @click="saveLabelColor()" type="primary">保存</el-button> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </el-dialog> |
| | | |
| | | <el-drawer title="消防自查详情" :visible.sync="isDetail" :append-to-body="true" size="40%" direction="rtl"> |
| | | <div class="title"> |
| | | <div class="icon">{{ refreshNum }}</div> |
| | | 基础信息 |
| | | </div> |
| | | <div class="basic-info" v-loading="drawerLoading"> |
| | | <div class="info-item"> |
| | | <div class="info-name">场所名称</div> |
| | | <div class="info-value">{{ rowDetail.placeName }}</div> |
| | | </div> |
| | | <div class="info-item"> |
| | | <div class="info-name">检查人</div> |
| | | <div class="info-value">{{ rowDetail.name }}</div> |
| | | </div> |
| | | <div class="info-item"> |
| | | <div class="info-name">检查时间</div> |
| | | <div class="info-value">{{ rowDetail.createTime }}</div> |
| | | </div> |
| | | </div> |
| | | <div class="title"> |
| | | <div class="icon"></div> |
| | | 检查记录 |
| | | </div> |
| | | |
| | | <div class="question-list" v-for="(tItem, tIndex) in rowDetail.qTypeList" :key='tIndex' v-loading="drawerLoading"> |
| | | <div class="question-type" @click="flodQL(tIndex)"> |
| | | <div class="type-name"> |
| | | {{ CNNum[tIndex] }}、{{ tItem.questionName }} |
| | | </div> |
| | | <div class="icon-box"><i class="el-icon-arrow-down" v-show="tItem.isShowQList"></i><i class="el-icon-arrow-up" |
| | | v-show="!tItem.isShowQList"></i></div> |
| | | </div> |
| | | <div class="question-item" v-for="(item, index) in tItem.questionList" :key='index' v-show="tItem.isShowQList"> |
| | | <div class="question-name"> |
| | | <div class="key">{{ index + 1 }}、{{ item.itemsNameTitle }}</div> |
| | | <div class="value"><el-radio v-model="radio" label="1" disabled>存在</el-radio> |
| | | <el-radio v-model="radio" label="2" disabled>不存在</el-radio> |
| | | </div> |
| | | </div> |
| | | <div class="yh-pic-box"> |
| | | <div class="yh-pic-name"> |
| | | 隐患图片 |
| | | </div> |
| | | <div class="yh-pic-list"> |
| | | <div class="pic-item" v-for="pic in item.imageUrlsList"> |
| | | <el-image style="width: 100px; height: 100px" :src="pic" :fit="fit"></el-image> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="yh-remark"> |
| | | <div class="yh-remark-name"> |
| | | 隐患描述 |
| | | </div> |
| | | <div class="yh-remark-value"> |
| | | {{ item.remark }} |
| | | </div> |
| | | </div> |
| | | <!-- <div class="yh-pic-box"> |
| | | <div class="yh-pic-name"> |
| | | 整改后图片 |
| | | </div> |
| | | <div class="yh-pic-list"> |
| | | <div class="pic-item" v-for="pic in item.rectificationImageUrlsList"> |
| | | <el-image style="width: 100px; height: 100px" :src="pic" :fit="fit"></el-image> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="yh-remark"> |
| | | <div class="yh-remark-name"> |
| | | 整改后描述 |
| | | </div> |
| | | <div class="yh-remark-value"> |
| | | {{ item.rectificationRemark }} |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | </div> |
| | | </el-drawer> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getTaskPlaceSelfCheckList, |
| | | removeTask, |
| | | update, |
| | | add, |
| | | } from "@/api/task/task" |
| | | |
| | | import { |
| | | updatePoiLabelColor |
| | | } from '@/api/place/place' |
| | | |
| | | import { |
| | | mapGetters |
| | | } from "vuex" |
| | | import { |
| | | applyTaskExamine, |
| | | getTaskPlaceSelfCheckInfo |
| | | } from "@/api/publicSecurity/keynoteManage" |
| | | import { |
| | | getPatrolGroupTree, |
| | | getDictBizTree |
| | | } from "@/api/publicSecurity/ninePlaceManage" |
| | | import website from '@/config/website' |
| | | import NProgress from 'nprogress' |
| | | import 'nprogress/nprogress.css' |
| | | import Qs from "qs" |
| | | import { |
| | | exportBlob |
| | | } from "@/api/common" |
| | | import { |
| | | getToken |
| | | } from '@/util/auth' |
| | | import { |
| | | downloadXls |
| | | } from "@/util/util" |
| | | import { |
| | | dateNow |
| | | } from "@/util/date" |
| | | import campusReporting from './components/campusReporting' |
| | | import hotelReporting from './components/hotelReporting' |
| | | import labelReporting from './components/labelReporting' |
| | | |
| | | export default { |
| | | data() { |
| | | //手机号格式校验 |
| | | let validatorPhone = function(rule, value, callback) { |
| | | if (value) { |
| | | if (!/^1[3456789]\d{9}$/.test(value)) { |
| | | callback(new Error('手机号格式有误!')) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | callback() |
| | | } |
| | | |
| | | return { |
| | | color: 'green', |
| | | placeId: '', |
| | | isDetail: false, |
| | | refreshNum: 1, |
| | | rowDetail: [], |
| | | auditRules: { |
| | | status: [{ |
| | | required: true, |
| | | message: "必填" |
| | | }], |
| | | remark: [{ |
| | | required: true, |
| | | message: "必填" |
| | | }], |
| | | }, |
| | | visible: false, |
| | | visibleLabelColor: false, |
| | | taskType: 0, |
| | | curRow: {}, |
| | | roleBox: false, |
| | | |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | drawerLoading: false, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | }, |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 120, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 260, |
| | | // menu: false, |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | border: true, |
| | | addBtn: false, |
| | | delBtn: false, |
| | | //stripe:true, |
| | | index: true, |
| | | editBtn: false, |
| | | viewBtn: false, |
| | | // selection: true, |
| | | excelBtn: false, |
| | | refreshBtn: false, |
| | | searchShowBtn: false, |
| | | columnBtn: false, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | label: "自查时间", |
| | | prop: "dateRange", |
| | | type: "daterange", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | searchRange: true, |
| | | startPlaceholder: '开始日期', |
| | | endPlaceholder: '结束日期', |
| | | align: 'center', |
| | | search: true, |
| | | hide: true, |
| | | searchSpan: 5, |
| | | searchLabelWidth: 76, |
| | | }, { |
| | | width: 140, |
| | | label: "场所名称", |
| | | prop: "placeName", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | align: 'center' |
| | | }, |
| | | { |
| | | width: 140, |
| | | label: "场所地址", |
| | | prop: "location", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | searchLabelWidth: 46, |
| | | overHidden: true, |
| | | align: 'center' |
| | | }, |
| | | { |
| | | width: 120, |
| | | label: "场所类别", |
| | | prop: "nineType", |
| | | align: 'center', |
| | | dicUrl: "/api/blade-system/dict-biz/tree?code=nineType", |
| | | props: { |
| | | label: "title", |
| | | value: "key", |
| | | }, |
| | | type: 'select', |
| | | search: true, |
| | | searchSpan: 4, |
| | | searchLabelWidth: 96, |
| | | align: 'center' |
| | | }, |
| | | { |
| | | label: "所属街道", |
| | | parent: false, |
| | | search: true, |
| | | searchSpan: 4, |
| | | prop: "streetName", |
| | | type: "tree", |
| | | dicUrl: "/api/blade-system/region/getTownTree", |
| | | props: { |
| | | label: "name", |
| | | value: "name" |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择所属街道", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | |
| | | { |
| | | parent: false, |
| | | label: "所属社区", |
| | | prop: "communityName", |
| | | search: true, |
| | | searchSpan: 4, |
| | | width: 150, |
| | | type: "tree", |
| | | dicUrl: "/api/blade-system/region/treeToCommunity", |
| | | props: { |
| | | label: "name", |
| | | value: "name", |
| | | }, |
| | | cascader: ["gridCode"], |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择所属社区", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | label: "所属网格", |
| | | prop: "gridName", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | align: 'center' |
| | | }, |
| | | { |
| | | label: "场所隐患", |
| | | prop: "remark", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | align: 'center' |
| | | }, |
| | | { |
| | | label: "场所负责人", |
| | | prop: "principal", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | align: 'center' |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "场所负责人电话", |
| | | prop: "principalPhone", |
| | | span: 24, |
| | | row: true, |
| | | slot: true, |
| | | searchSpan: 4, |
| | | align: 'center' |
| | | }, |
| | | { |
| | | width: 110, |
| | | label: "签名", |
| | | prop: "signaturePath", |
| | | type: "upload", |
| | | listType: "picture-img", |
| | | span: 24, |
| | | align: 'center' |
| | | }, |
| | | { |
| | | width: 110, |
| | | label: "审核状态", |
| | | prop: "status", |
| | | span: 24, |
| | | align: 'center', |
| | | // slot: true, |
| | | type: "select", |
| | | searchSpan: 4, |
| | | search: true, |
| | | dicData: [{ |
| | | label: "待审核", |
| | | value: 1 |
| | | }, |
| | | { |
| | | label: "已审核", |
| | | value: 2 |
| | | }, |
| | | { |
| | | label: "未通过", |
| | | value: 3 |
| | | }, |
| | | { |
| | | label: "待完成", |
| | | value: 4 |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | label: "标签颜色", |
| | | prop: "color", |
| | | span: 24, |
| | | row: true, |
| | | searchLabelWidth: 46, |
| | | align: 'center', |
| | | dicData: [{ |
| | | label: "绿", |
| | | value: "green", |
| | | }, |
| | | { |
| | | label: "黄", |
| | | value: "yellow", |
| | | }, |
| | | { |
| | | label: "红", |
| | | value: "red", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | width: 120, |
| | | label: "创建时间", |
| | | prop: "createTime", |
| | | span: 24, |
| | | row: true, |
| | | searchLabelWidth: 46, |
| | | align: 'center' |
| | | }, |
| | | ], |
| | | }, |
| | | data: [], |
| | | |
| | | auditBasePopup: false, |
| | | questionTypeList: [], |
| | | CNNum: ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二', '十三', '十四', '十五'], |
| | | nineTypeList: [], |
| | | radio: '1', |
| | | } |
| | | }, |
| | | |
| | | provide() { |
| | | return { |
| | | placeElement: this, |
| | | } |
| | | }, |
| | | |
| | | components: { |
| | | campusReporting, |
| | | hotelReporting, |
| | | labelReporting, |
| | | }, |
| | | |
| | | watch: {}, |
| | | |
| | | created() { |
| | | this.getPatrolGroupTree() |
| | | this.getDictBizTree() |
| | | }, |
| | | |
| | | computed: { |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.place_add, false), |
| | | viewBtn: this.vaildData(this.permission.place_view, true), |
| | | delBtn: this.vaildData(this.permission.place_del, true), |
| | | // editBtn: this.vaildData(this.permission.place_edit, true), |
| | | } |
| | | }, |
| | | ids() { |
| | | let ids = [] |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(",") |
| | | }, |
| | | showStatus() { |
| | | return (data) => { |
| | | let tags = {} |
| | | if (data == 1) { |
| | | tags = { |
| | | type: 'warning', |
| | | text: '待审核' |
| | | } |
| | | } else if (data == 2) { |
| | | tags = { |
| | | type: 'success', |
| | | text: '已审核' |
| | | } |
| | | } else if (data == 3) { |
| | | tags = { |
| | | type: 'danger', |
| | | text: '未通过' |
| | | } |
| | | } else if (data == 4) { |
| | | tags = { |
| | | type: 'warning', |
| | | text: '待完成' |
| | | } |
| | | } |
| | | |
| | | return tags |
| | | } |
| | | }, |
| | | |
| | | textDispose() { |
| | | return (row, flag, type) => { |
| | | if (row[flag] || row[type] == null) { |
| | | return row[type] |
| | | } else { |
| | | if (type == 'principalIdCard') { |
| | | return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2") |
| | | } else { |
| | | return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2") |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | changColor(e) { |
| | | console.log("*******************", e) |
| | | this.color = e |
| | | }, |
| | | |
| | | saveLabelColor() { |
| | | updatePoiLabelColor(this.placeId, this.color).then(res => { |
| | | if (res.data) { |
| | | this.visibleLabelColor = false |
| | | this.onLoad(this.page, this.query) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | rowUpdateLabelColor(row) { |
| | | this.visibleLabelColor = true |
| | | this.color = row.color |
| | | this.placeId = row.placeId |
| | | }, |
| | | // 点击展开收缩 |
| | | flodQL(index) { |
| | | this.rowDetail.qTypeList[index].isShowQList = !this.rowDetail.qTypeList[index].isShowQList |
| | | this.refreshNum += 1 |
| | | }, |
| | | |
| | | // 对数组按属性分组 |
| | | groupBy(arr, key) { |
| | | return arr.reduce((acc, curr) => { |
| | | (acc[curr[key]] = acc[curr[key]] || []).push(curr) |
| | | return acc |
| | | }, {}) |
| | | }, |
| | | |
| | | // 九小类型字典接口 |
| | | getDictBizTree() { |
| | | getDictBizTree({ |
| | | code: 'nineType' |
| | | }).then(res => { |
| | | this.nineTypeList = res.data.data |
| | | }) |
| | | }, |
| | | |
| | | // 九小类型转换 |
| | | switchNineType(type) { |
| | | return this.nineTypeList.find(item => item.key === type) ? this.nineTypeList.find(item => item.key === type) |
| | | .title : '' |
| | | }, |
| | | |
| | | // 获取问题类型 |
| | | getPatrolGroupTree() { |
| | | getPatrolGroupTree({ |
| | | type: 1, |
| | | childType: 1 |
| | | }).then(res => { |
| | | this.questionTypeList = res.data.data |
| | | }) |
| | | }, |
| | | |
| | | getDetail(rowData) { |
| | | this.drawerLoading = true |
| | | this.isDetail = true |
| | | getTaskPlaceSelfCheckInfo({ |
| | | taskId: rowData.taskId |
| | | }).then(res => { |
| | | let row = res.data.data |
| | | if (row.taskPlaceRecordVOList) { |
| | | row.taskPlaceRecordVOList.forEach(item => { |
| | | item.imageUrlsList = [] |
| | | item.rectificationImageUrlsList = [] |
| | | if (item.imageUrls) { |
| | | item.imageUrlsList = item.imageUrls.split(',').map(ele => { |
| | | return website.minioUrl + ele |
| | | }) |
| | | } |
| | | if (item.rectificationImageUrls) { |
| | | item.rectificationImageUrlsList = item.rectificationImageUrls.split(',').map(ele => { |
| | | return website.minioUrl + ele |
| | | }) |
| | | } |
| | | // 查询问题类型 |
| | | this.questionTypeList.forEach(qItem => { |
| | | qItem.children.forEach(qChild => { |
| | | if (qChild.id == item.itemId) { |
| | | item.qType = qItem.title |
| | | item.itemsNameTitle = qChild.title |
| | | } |
| | | }) |
| | | }) |
| | | }) |
| | | } |
| | | if (row.taskPlaceRecordVOList) { |
| | | // 把相同类型问题分组 |
| | | let obj = this.groupBy(row.taskPlaceRecordVOList, 'qType') |
| | | let arr = Object.entries(obj) |
| | | let newArr = [] |
| | | arr.forEach(part => { |
| | | newArr.push({ |
| | | questionName: part[0], |
| | | questionList: part[1], |
| | | isShowQList: true |
| | | }) |
| | | }) |
| | | row.qTypeList = newArr |
| | | } |
| | | // 九小类型转换 |
| | | row.nineTypeName = this.switchNineType(row.nineType) |
| | | this.rowDetail = row |
| | | this.drawerLoading = false |
| | | }) |
| | | |
| | | }, |
| | | |
| | | handleExport() { |
| | | this.$confirm("是否导出消防自查数据?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }).then(() => { |
| | | NProgress.start() |
| | | var data = { |
| | | ...this.query |
| | | } |
| | | // data.isNine = 1 |
| | | data = Qs.stringify(data) |
| | | exportBlob( |
| | | `/api/blade-taskPlaceSelfCheck/taskPlaceSelfCheck/export-taskPlaceSelfCheck?${this.website.tokenHeader}=${getToken()}&` + |
| | | data |
| | | ).then(res => { |
| | | console.log('exportBlob', res) |
| | | downloadXls(res.data, `消防自查${dateNow()}.xlsx`) |
| | | NProgress.done() |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | showStringDispose(row, type) { |
| | | row[type] = !row[type] |
| | | }, |
| | | |
| | | // 弹窗关闭回调 |
| | | handleClose() { |
| | | this.cancelAudit() |
| | | }, |
| | | // 弹窗关闭回调 |
| | | handleLabelColorClose() { |
| | | // this.cancelAudit() |
| | | this.visibleLabelColor = false |
| | | }, |
| | | |
| | | // 取消审核 |
| | | cancelAudit() { |
| | | this.visible = false |
| | | }, |
| | | |
| | | // 确认提交审核 |
| | | submitAudit(form) { |
| | | let auditForm = { |
| | | status: form.status == '1' ? '2' : '3', |
| | | remark: form.confirmNotion, |
| | | reportType: 2 |
| | | } |
| | | |
| | | applyTaskExamine(Object.assign(this.auditParams, auditForm)).then(res => { |
| | | if (res.data.code == 200) { |
| | | this.$message.warning("审核成功") |
| | | this.onLoad(this.page) |
| | | this.cancelAudit() |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | // 审核按钮 |
| | | goAudit(row) { |
| | | this.auditParams = { |
| | | id: row.taskId, |
| | | reportType: row.reportType |
| | | } |
| | | this.visible = true |
| | | }, |
| | | |
| | | colseDetail() { |
| | | this.auditBasePopup = false |
| | | this.onLoad(this.page) |
| | | }, |
| | | |
| | | lookDetail(row, applyType) { |
| | | this.auditBasePopup = true |
| | | var that = this |
| | | if (row.reportType == 6) { |
| | | this.taskType = 6 |
| | | this.$nextTick(() => { |
| | | that.$refs.campusReporting.init(row, applyType) |
| | | }) |
| | | } |
| | | if (row.reportType == 2) { |
| | | this.taskType = 2 |
| | | this.$nextTick(() => { |
| | | that.$refs.hotelReporting.init(row, applyType) |
| | | }) |
| | | } |
| | | if (row.reportType == 3 || row.reportType == 4 || row.reportType == 5) { |
| | | this.taskType = 3 |
| | | this.$nextTick(() => { |
| | | that.$refs.labelReporting.init(row, applyType) |
| | | }) |
| | | } |
| | | }, |
| | | auditCur(row) { |
| | | this.curAuditRow = row |
| | | this.auditBasePopup = true |
| | | }, |
| | | |
| | | roleBoxClose() { |
| | | this.curRow = {} |
| | | }, |
| | | |
| | | ManageTenants(item) { |
| | | this.curRow = item |
| | | this.roleBox = true |
| | | }, |
| | | |
| | | rowSave(row, done, loading) { |
| | | if (row.imageUrls && row.imageUrls.length > 0) { |
| | | var urls = [] |
| | | var split = row.imageUrls.split(",").filter(item => item != '') |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.imageUrls = urls.join(",") |
| | | } |
| | | |
| | | let label = row.label |
| | | |
| | | if (row.smallLabel != '') { |
| | | label = label + ',' + row.smallLabel |
| | | } |
| | | |
| | | delete row.smallLabel |
| | | |
| | | add({ |
| | | ...row, |
| | | label |
| | | }).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | |
| | | rowUpdate(row, index, done, loading) { |
| | | if (row.imageUrls.length > 0) { |
| | | var urls = [] |
| | | var split = row.imageUrls.split(",").filter(item => item != '') |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.imageUrls = urls.join(",") |
| | | } |
| | | |
| | | let label = row.label |
| | | |
| | | if (row.smallLabel != '') { |
| | | label = label + ',' + row.smallLabel |
| | | } |
| | | |
| | | delete row.smallLabel |
| | | |
| | | update({ |
| | | ...row, |
| | | label |
| | | }).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | row.isDeleted = 1 |
| | | return removeTask(row) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | }) |
| | | }, |
| | | searchReset() { |
| | | this.query = {} |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | let dateRange = params.dateRange |
| | | if (params.dateRange) { |
| | | params.startTime = dateRange[0] |
| | | params.endTime = dateRange[1] |
| | | delete params.dateRange |
| | | } |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = [] |
| | | this.$nextTick(() => { |
| | | this.$refs.crud && this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) {} else { |
| | | done() |
| | | } |
| | | }, |
| | | |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | refreshChange() { |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | const {} = this.query |
| | | let values = { |
| | | ...params, |
| | | } |
| | | values.type = 1 |
| | | |
| | | this.loading = true |
| | | getTaskPlaceSelfCheckList(page.currentPage, page.pageSize, values).then((res) => { |
| | | const data = { |
| | | ...res.data.data, |
| | | records: res.data.data.records.map(item => { |
| | | return { |
| | | ...item, |
| | | 'createTime': item.createTime.slice(0, 16), |
| | | 'principalPhoneflag': false, |
| | | } |
| | | }) |
| | | } |
| | | data.records.forEach(item => { |
| | | if (item.signaturePath && item.signaturePath.length > 0) { |
| | | var urls = [] |
| | | var names = item.signaturePath.split(",") |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | item.signaturePath = urls.join(",") |
| | | } |
| | | }) |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | :deep(.cur-container-box) { |
| | | padding: 0; |
| | | } |
| | | |
| | | :deep(.el-button--text) { |
| | | border: 0; |
| | | background: transparent !important; |
| | | } |
| | | |
| | | :deep(.el-radio__input.is-disabled+span.el-radio__label) { |
| | | color: #000; |
| | | } |
| | | |
| | | :deep(.el-radio__input.is-checked+.el-radio__label) { |
| | | color: #409EFF !important; |
| | | } |
| | | |
| | | :deep(.el-radio__input.is-checked .el-radio__inner::after) { |
| | | background-color: #FFF; |
| | | } |
| | | |
| | | :deep(.el-radio__input.is-checked .el-radio__inner) { |
| | | background-color: #409EFF; |
| | | } |
| | | |
| | | :deep(.avue-crud__img) { |
| | | height: 30px !important; |
| | | } |
| | | |
| | | :deep(.el-radio) { |
| | | margin-right: 20px; |
| | | } |
| | | |
| | | .avue-upload__icon { |
| | | line-height: 6; |
| | | } |
| | | |
| | | .cur-container-box { |
| | | display: flex; |
| | | flex-direction: column; |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow: hidden; |
| | | |
| | | .content-box { |
| | | margin: 0 4px; |
| | | padding: 0 16px; |
| | | height: 0; |
| | | flex: 1; |
| | | overflow: hidden; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .footer-btn-box { |
| | | margin-top: 10px; |
| | | display: flex; |
| | | justify-content: center; |
| | | } |
| | | } |
| | | |
| | | .title { |
| | | margin: 10px; |
| | | height: 40px; |
| | | background-color: #eee; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | .icon { |
| | | width: 4px; |
| | | height: 18px; |
| | | background-color: #409dfe; |
| | | margin: 0 10px; |
| | | color: transparent; |
| | | } |
| | | } |
| | | |
| | | .basic-info { |
| | | padding: 0 20px; |
| | | font-size: 14px; |
| | | |
| | | .info-item { |
| | | display: flex; |
| | | padding: 10px; |
| | | |
| | | .info-name { |
| | | width: 100px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .info-value { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .question-list { |
| | | padding: 0 20px; |
| | | font-size: 14px; |
| | | |
| | | .question-type { |
| | | height: 60px; |
| | | display: flex; |
| | | align-items: center; |
| | | cursor: pointer; |
| | | justify-content: space-between; |
| | | padding-right: 20px; |
| | | |
| | | .type-name {} |
| | | |
| | | .icon-box {} |
| | | } |
| | | |
| | | .question-item { |
| | | margin-bottom: 20px; |
| | | padding: 10px; |
| | | background: #f5f7fa; |
| | | border-radius: 8px; |
| | | |
| | | &>div { |
| | | margin: 14px 0; |
| | | } |
| | | |
| | | .question-name { |
| | | display: flex; |
| | | |
| | | .key { |
| | | width: 80%; |
| | | padding-right: 20px; |
| | | word-break: break-all; |
| | | } |
| | | |
| | | .value { |
| | | width: 20%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | } |
| | | |
| | | .yh-pic-box { |
| | | display: flex; |
| | | height: 100px; |
| | | |
| | | .yh-pic-name { |
| | | width: 100px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: left; |
| | | } |
| | | |
| | | .yh-pic-list { |
| | | width: 0; |
| | | flex: 1; |
| | | display: flex; |
| | | } |
| | | } |
| | | |
| | | .yh-remark { |
| | | display: flex; |
| | | |
| | | .yh-remark-name { |
| | | width: 100px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: left; |
| | | } |
| | | |
| | | .yh-remark-value { |
| | | word-break: break-all; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .labelColor { |
| | | // display: flex; |
| | | // justify-content: center; |
| | | /* 居中对齐 */ |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :permission="permissionList" |
| | | v-model="form" ref="crud" @row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel" |
| | | :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" plain v-if="permission.job_del" |
| | | @click="handleDelete">删 除 |
| | | </el-button> |
| | | </template> |
| | | <basic-container> |
| | | <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :permission="permissionList" |
| | | v-model="form" ref="crud" @row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel" :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" plain v-if="permission.job_del" |
| | | @click="handleDelete">删 除 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{ row, size, index }" slot="menu"> |
| | | <el-button :size="size" type="text" icon="el-icon-video-pause" v-if="permission.job_enable && row.triggerStatus==1" |
| | | @click="handleEnable(row,0)">停止 |
| | | </el-button> |
| | | <el-button :size="size" type="text" icon="el-icon-video-play" v-if="permission.job_enable && row.triggerStatus==0" |
| | | @click.stop="handleEnable(row,1)">启用 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{ row, size, index }" slot="menu"> |
| | | <el-button :size="size" type="text" icon="el-icon-video-pause" |
| | | v-if="permission.job_enable && row.triggerStatus==1" @click="handleEnable(row,0)">停止 |
| | | </el-button> |
| | | <el-button :size="size" type="text" icon="el-icon-video-play" |
| | | v-if="permission.job_enable && row.triggerStatus==0" @click.stop="handleEnable(row,1)">启用 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{row, size}" slot="status"> |
| | | <el-tag :size="size" :type="row.statusName == '是' ? 'success' : 'info'">{{ row.statusName }}</el-tag> |
| | | </template> |
| | | <template slot-scope="{row, size}" slot="category"> |
| | | <el-tag :size="size">{{ row.categoryName }}</el-tag> |
| | | </template> |
| | | <template slot-scope="{row, size}" slot="category"> |
| | | <el-tag :size="size">{{ row.categoryName }}</el-tag> |
| | | </template> |
| | | <template slot-scope="{row, size}" slot="status"> |
| | | <el-tag :size="size" :type="row.statusName == '是' ? 'success' : 'info'">{{ row.statusName }}</el-tag> |
| | | </template> |
| | | <template slot-scope="{row, size}" slot="category"> |
| | | <el-tag :size="size">{{ row.categoryName }}</el-tag> |
| | | </template> |
| | | <template slot-scope="{row, size}" slot="category"> |
| | | <el-tag :size="size">{{ row.categoryName }}</el-tag> |
| | | </template> |
| | | |
| | | <template slot-scope="{type,disabled}" slot="cronForm"> |
| | | <el-input placeholder="请选择cron"> |
| | | <el-button slot="append" icon="el-icon-s-tools" @click="handlerClick()"></el-button> |
| | | </el-input> |
| | | </template> |
| | | <template slot-scope="{type,disabled}" slot="cronForm"> |
| | | <el-input placeholder="请选择cron"> |
| | | <el-button slot="append" icon="el-icon-s-tools" @click="handlerClick()"></el-button> |
| | | </el-input> |
| | | </template> |
| | | |
| | | |
| | | </avue-crud> |
| | | <el-dialog title="Cron" append-to-body :visible.sync="cronPopover" width="550px"> |
| | | <!-- <el-popover v-model="cronPopover"> --> |
| | | </avue-crud> |
| | | <el-dialog title="Cron" append-to-body :visible.sync="cronPopover" width="550px"> |
| | | <!-- <el-popover v-model="cronPopover"> --> |
| | | |
| | | <!-- <div> 测试 </div> --> |
| | | <vueCron @change="changeCron" @close="cronPopover = false" i18n="cn" /> |
| | | <!-- <el-input |
| | | <!-- <div> 测试 </div> --> |
| | | <vueCron @change="changeCron" @close="cronPopover = false" i18n="cn" /> |
| | | <!-- <el-input |
| | | slot="reference" |
| | | v-model="ruleForm.execTime" |
| | | placeholder="定时策略" |
| | | @click="cronPopover=true" |
| | | /> --> |
| | | <!-- </el-popover> --> |
| | | </el-dialog> |
| | | <!-- </el-popover> --> |
| | | </el-dialog> |
| | | |
| | | </basic-container> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getList, add, update, remove, start,stop } from "@/api/xxljob/xxljob" |
| | | import { mapGetters } from "vuex" |
| | | import func from "@/util/func" |
| | | import vueCron from 'vue-cron' |
| | | export default { |
| | | import { |
| | | getList, |
| | | add, |
| | | update, |
| | | remove, |
| | | start, |
| | | stop |
| | | } from "@/api/xxljob/xxljob" |
| | | import { |
| | | mapGetters |
| | | } from "vuex" |
| | | import func from "@/util/func" |
| | | import vueCron from 'vue-cron' |
| | | export default { |
| | | components: { |
| | | vueCron |
| | | vueCron |
| | | }, |
| | | data () { |
| | | return { |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | box: false, |
| | | cronPopover: false, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | data() { |
| | | return { |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | box: false, |
| | | cronPopover: false, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 120, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 280, |
| | | height: 'auto', |
| | | calcHeight: 30, |
| | | tip: false, |
| | | border: true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | dialogWidth: 880, |
| | | dialogClickModal: false, |
| | | dialogDirection: 'rtl', |
| | | dialogType: 'dialog', |
| | | column: [{ |
| | | label: "任务描述", |
| | | searchLabelWidth: 76, |
| | | prop: "jobDesc", |
| | | labelWidth: 150, |
| | | search: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入任务描述", |
| | | trigger: "blur" |
| | | }], |
| | | }, |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 120, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 280, |
| | | height: 'auto', |
| | | calcHeight: 30, |
| | | tip: false, |
| | | border: true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | dialogWidth: 880, |
| | | dialogClickModal: false, |
| | | dialogDirection: 'rtl', |
| | | dialogType: 'dialog', |
| | | column: [ |
| | | { |
| | | label: "任务描述", |
| | | searchLabelWidth: 76, |
| | | prop: "jobDesc", |
| | | labelWidth:150, |
| | | search: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入任务描述", |
| | | trigger: "blur" |
| | | }], |
| | | }, |
| | | // { |
| | | // label: "调度类型", |
| | | // width: 120, |
| | | // searchLabelWidth: 76, |
| | | // labelWidth:150, |
| | | // prop: "scheduleType", |
| | | // rules: [{ |
| | | // required: true, |
| | | // message: "请选择调度类型", |
| | | // trigger: "blur" |
| | | // }], |
| | | // display: false |
| | | // }, |
| | | { |
| | | label: "表达式", |
| | | prop: "scheduleConf", |
| | | // width: 120, |
| | | labelWidth:150, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入表达式", |
| | | trigger: "blur" |
| | | }], |
| | | }, |
| | | { |
| | | label: "执行器任务handler", |
| | | prop: "executorHandler", |
| | | labelWidth:150, |
| | | width: 160, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入执行器任务handler", |
| | | trigger: "blur" |
| | | }], |
| | | }, |
| | | { |
| | | label: "负责人", |
| | | prop: "author", |
| | | width: 120, |
| | | labelWidth:150, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入负责人", |
| | | trigger: "blur" |
| | | }], |
| | | }, |
| | | |
| | | { |
| | | label: "报警邮件", |
| | | prop: "alarmEmail", |
| | | width: 150, |
| | | labelWidth:150, |
| | | overHidden: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入报警邮件", |
| | | trigger: "blur" |
| | | }], |
| | | },{ |
| | | label: "状态", |
| | | prop: "triggerStatus", |
| | | search: true, |
| | | searchSpan:4, |
| | | type:"select", |
| | | align:"center", |
| | | labelWidth:150, |
| | | width: 120, |
| | | searchLabelWidth: 66, |
| | | viewDisplay:true, |
| | | addDisplay:false, |
| | | editDisplay:false, |
| | | dataType:"number", |
| | | dicData:[ |
| | | { |
| | | label:"运行", |
| | | value: 1 |
| | | }, |
| | | { |
| | | label:"停止", |
| | | value: 0 |
| | | } |
| | | ], |
| | | }, |
| | | ], |
| | | // group: [ |
| | | // { |
| | | // label: '基础配置', |
| | | // prop: 'jbxx', |
| | | // column: [ |
| | | // { |
| | | // label: '执行器', |
| | | // prop: '', |
| | | // type: 'select', |
| | | // }, |
| | | // { |
| | | // label: '任务描述', |
| | | // prop: '' |
| | | // }, |
| | | // { |
| | | // label: '负责人', |
| | | // prop: '', |
| | | // { |
| | | // label: "调度类型", |
| | | // width: 120, |
| | | // searchLabelWidth: 76, |
| | | // labelWidth:150, |
| | | // prop: "scheduleType", |
| | | // rules: [{ |
| | | // required: true, |
| | | // message: "请选择调度类型", |
| | | // trigger: "blur" |
| | | // }], |
| | | // display: false |
| | | // }, |
| | | { |
| | | label: "表达式", |
| | | prop: "scheduleConf", |
| | | // width: 120, |
| | | labelWidth: 150, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入表达式", |
| | | trigger: "blur" |
| | | }], |
| | | }, |
| | | { |
| | | label: "执行器任务handler", |
| | | prop: "executorHandler", |
| | | labelWidth: 150, |
| | | width: 160, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入执行器任务handler", |
| | | trigger: "blur" |
| | | }], |
| | | }, |
| | | { |
| | | label: "负责人", |
| | | prop: "author", |
| | | width: 120, |
| | | labelWidth: 150, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入负责人", |
| | | trigger: "blur" |
| | | }], |
| | | }, |
| | | |
| | | // }, |
| | | // { |
| | | // label: '报警邮件', |
| | | // prop: '' |
| | | // } |
| | | // ] |
| | | // }, |
| | | // { |
| | | // label: '调度配置', |
| | | // prop: 'jbxx', |
| | | // column: [ |
| | | // { |
| | | // label: '调度类型', |
| | | // prop: '', |
| | | // type: 'select', |
| | | // }, |
| | | // { |
| | | // label: 'Cron', |
| | | // prop: 'cron', |
| | | // formslot: true, |
| | | // } |
| | | // ] |
| | | // }, |
| | | // { |
| | | // label: '任务配置', |
| | | // prop: 'jbxx', |
| | | // column: [ |
| | | // { |
| | | // label: '运行模式', |
| | | // prop: '', |
| | | // type: 'select', |
| | | // }, |
| | | // { |
| | | // label: 'JobHandler', |
| | | // prop: '' |
| | | // }, |
| | | // { |
| | | // label: '任务参数', |
| | | // prop: '', |
| | | // type: 'textarea', |
| | | // span: 24 |
| | | // } |
| | | // ] |
| | | // }, |
| | | // { |
| | | // label: '高级配置', |
| | | // prop: 'jbxx', |
| | | // column: [ |
| | | // { |
| | | // label: '调度类型', |
| | | // prop: '', |
| | | // type: 'select', |
| | | // }, |
| | | // { |
| | | // label: '子任务ID', |
| | | // prop: '' |
| | | // }, |
| | | // { |
| | | // label: '调度类型', |
| | | // prop: '', |
| | | // type: 'select', |
| | | // }, |
| | | // { |
| | | // label: '任务参数', |
| | | // prop: '', |
| | | // type: 'select', |
| | | // }, |
| | | // { |
| | | // label: '任务超时时间', |
| | | // prop: '', |
| | | // }, |
| | | // { |
| | | // label: '失败重试次数', |
| | | // prop: '', |
| | | // } |
| | | // ] |
| | | // }, |
| | | // ] |
| | | { |
| | | label: "报警邮件", |
| | | prop: "alarmEmail", |
| | | width: 150, |
| | | labelWidth: 150, |
| | | overHidden: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入报警邮件", |
| | | trigger: "blur" |
| | | }], |
| | | }, { |
| | | label: "状态", |
| | | prop: "triggerStatus", |
| | | search: true, |
| | | searchSpan: 4, |
| | | type: "select", |
| | | align: "center", |
| | | labelWidth: 150, |
| | | width: 120, |
| | | searchLabelWidth: 66, |
| | | viewDisplay: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | dataType: "number", |
| | | dicData: [{ |
| | | label: "运行", |
| | | value: 1 |
| | | }, |
| | | { |
| | | label: "停止", |
| | | value: 0 |
| | | } |
| | | ], |
| | | }, |
| | | data: [], |
| | | debugForm: { |
| | | code: '', |
| | | }, |
| | | } |
| | | ], |
| | | // group: [ |
| | | // { |
| | | // label: '基础配置', |
| | | // prop: 'jbxx', |
| | | // column: [ |
| | | // { |
| | | // label: '执行器', |
| | | // prop: '', |
| | | // type: 'select', |
| | | // }, |
| | | // { |
| | | // label: '任务描述', |
| | | // prop: '' |
| | | // }, |
| | | // { |
| | | // label: '负责人', |
| | | // prop: '', |
| | | |
| | | // }, |
| | | // { |
| | | // label: '报警邮件', |
| | | // prop: '' |
| | | // } |
| | | // ] |
| | | // }, |
| | | // { |
| | | // label: '调度配置', |
| | | // prop: 'jbxx', |
| | | // column: [ |
| | | // { |
| | | // label: '调度类型', |
| | | // prop: '', |
| | | // type: 'select', |
| | | // }, |
| | | // { |
| | | // label: 'Cron', |
| | | // prop: 'cron', |
| | | // formslot: true, |
| | | // } |
| | | // ] |
| | | // }, |
| | | // { |
| | | // label: '任务配置', |
| | | // prop: 'jbxx', |
| | | // column: [ |
| | | // { |
| | | // label: '运行模式', |
| | | // prop: '', |
| | | // type: 'select', |
| | | // }, |
| | | // { |
| | | // label: 'JobHandler', |
| | | // prop: '' |
| | | // }, |
| | | // { |
| | | // label: '任务参数', |
| | | // prop: '', |
| | | // type: 'textarea', |
| | | // span: 24 |
| | | // } |
| | | // ] |
| | | // }, |
| | | // { |
| | | // label: '高级配置', |
| | | // prop: 'jbxx', |
| | | // column: [ |
| | | // { |
| | | // label: '调度类型', |
| | | // prop: '', |
| | | // type: 'select', |
| | | // }, |
| | | // { |
| | | // label: '子任务ID', |
| | | // prop: '' |
| | | // }, |
| | | // { |
| | | // label: '调度类型', |
| | | // prop: '', |
| | | // type: 'select', |
| | | // }, |
| | | // { |
| | | // label: '任务参数', |
| | | // prop: '', |
| | | // type: 'select', |
| | | // }, |
| | | // { |
| | | // label: '任务超时时间', |
| | | // prop: '', |
| | | // }, |
| | | // { |
| | | // label: '失败重试次数', |
| | | // prop: '', |
| | | // } |
| | | // ] |
| | | // }, |
| | | // ] |
| | | }, |
| | | data: [], |
| | | debugForm: { |
| | | code: '', |
| | | }, |
| | | } |
| | | }, |
| | | watch: { |
| | | 'form.category' () { |
| | | const category = func.toInt(this.form.category) |
| | | this.$refs.crud.option.column.filter(item => { |
| | | if (item.prop === "appId") { |
| | | item.display = category === 4 |
| | | } |
| | | if (item.prop === "region") { |
| | | item.display = category === 4 || category === 5 |
| | | } |
| | | }) |
| | | }, |
| | | 'debugForm.code' () { |
| | | const column = this.findObject(this.debugOption.column, "backgroundUrl") |
| | | column.action = `/api/blade-resource/oss/endpoint/put-file?code=${this.debugForm.code}` |
| | | } |
| | | 'form.category'() { |
| | | const category = func.toInt(this.form.category) |
| | | this.$refs.crud.option.column.filter(item => { |
| | | if (item.prop === "appId") { |
| | | item.display = category === 4 |
| | | } |
| | | if (item.prop === "region") { |
| | | item.display = category === 4 || category === 5 |
| | | } |
| | | }) |
| | | }, |
| | | 'debugForm.code'() { |
| | | const column = this.findObject(this.debugOption.column, "backgroundUrl") |
| | | column.action = `/api/blade-resource/oss/endpoint/put-file?code=${this.debugForm.code}` |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userInfo", "permission"]), |
| | | permissionList () { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.job_add), |
| | | viewBtn: this.vaildData(this.permission.oss_view), |
| | | delBtn: this.vaildData(this.permission.job_del), |
| | | editBtn: this.vaildData(this.permission.job_update) |
| | | } |
| | | }, |
| | | ids () { |
| | | let ids = [] |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(",") |
| | | ...mapGetters(["userInfo", "permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.job_add), |
| | | viewBtn: this.vaildData(this.permission.oss_view), |
| | | delBtn: this.vaildData(this.permission.job_del), |
| | | editBtn: this.vaildData(this.permission.job_update) |
| | | } |
| | | }, |
| | | ids() { |
| | | let ids = [] |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(",") |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | changeCron (val) { |
| | | console.log("===>", val) |
| | | }, |
| | | changeCron(val) { |
| | | console.log("===>", val) |
| | | }, |
| | | |
| | | rowSave (row, done, loading) { |
| | | row['jobGroup'] = 1; |
| | | row['glueType'] = 'bean'; |
| | | row['scheduleType'] = 'CRON'; |
| | | row['executorParam'] = ''; |
| | | row['executorRouteStrategy'] = 'FIRST'; |
| | | row['misfireStrategy'] = 'DO_NOTHING'; |
| | | row['executorBlockStrategy'] = 'SERIAL_EXECUTION'; |
| | | row['executorTimeout'] = 0; |
| | | row['executorFailRetryCount'] = 0; |
| | | row['glueRemark'] = 'GLUE代码初始化'; |
| | | add(row).then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }) |
| | | done() |
| | | }, error => { |
| | | window.console.log(error) |
| | | loading() |
| | | }) |
| | | }, |
| | | rowUpdate (row, index, done, loading) { |
| | | update(row).then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }) |
| | | done() |
| | | }, error => { |
| | | window.console.log(error) |
| | | loading() |
| | | }) |
| | | }, |
| | | rowDel (row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }) |
| | | }) |
| | | }, |
| | | searchReset () { |
| | | this.query = {} |
| | | rowSave(row, done, loading) { |
| | | row['jobGroup'] = 1; |
| | | row['glueType'] = 'BEAN'; |
| | | row['scheduleType'] = 'CRON'; |
| | | row['executorParam'] = ''; |
| | | row['executorRouteStrategy'] = 'FIRST'; |
| | | row['misfireStrategy'] = 'DO_NOTHING'; |
| | | row['executorBlockStrategy'] = 'SERIAL_EXECUTION'; |
| | | row['executorTimeout'] = 0; |
| | | row['executorFailRetryCount'] = 0; |
| | | row['glueRemark'] = 'GLUE代码初始化'; |
| | | add(row).then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }) |
| | | done() |
| | | }, error => { |
| | | window.console.log(error) |
| | | loading() |
| | | }) |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | update(row).then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }) |
| | | done() |
| | | }, error => { |
| | | window.console.log(error) |
| | | loading() |
| | | }) |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange (params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange (list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear () { |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | handleEnable (row,status) { |
| | | var temstr = "" |
| | | if(status == 1){ |
| | | temstr = "启动" |
| | | }else{ |
| | | temstr = "停止" |
| | | } |
| | | this.$confirm("是否确定" + temstr + "当前任务?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | if(status==1){ |
| | | row.triggerStatus = 1 |
| | | return start(row) |
| | | }else{ |
| | | row.triggerStatus = 0 |
| | | return stop(row) |
| | | } |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | handleSubmit (form, done) { |
| | | this.$message({ |
| | | type: "success", |
| | | message: `获取到图片地址:[${form.backgroundUrl}]` |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }) |
| | | done() |
| | | }, |
| | | handleDelete () { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | beforeOpen (done, type) { |
| | | // if (["edit", "view"].includes(type)) { |
| | | // getDetail(this.form.id).then(res => { |
| | | // this.form = res.data.data |
| | | // }) |
| | | // } |
| | | done() |
| | | }, |
| | | currentChange (currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange (pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange () { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad (page, params = {}) { |
| | | 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() |
| | | }) |
| | | }, |
| | | handlerClick () { |
| | | console.log("111") |
| | | this.cronPopover = true |
| | | }) |
| | | }, |
| | | searchReset() { |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | handleEnable(row, status) { |
| | | var temstr = "" |
| | | if (status == 1) { |
| | | temstr = "启动" |
| | | } else { |
| | | temstr = "停止" |
| | | } |
| | | this.$confirm("是否确定" + temstr + "当前任务?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | if (status == 1) { |
| | | row.triggerStatus = 1 |
| | | return start(row) |
| | | } else { |
| | | row.triggerStatus = 0 |
| | | return stop(row) |
| | | } |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | handleSubmit(form, done) { |
| | | this.$message({ |
| | | type: "success", |
| | | message: `获取到图片地址:[${form.backgroundUrl}]` |
| | | }) |
| | | done() |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | beforeOpen(done, type) { |
| | | // if (["edit", "view"].includes(type)) { |
| | | // getDetail(this.form.id).then(res => { |
| | | // this.form = res.data.data |
| | | // }) |
| | | // } |
| | | done() |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | 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() |
| | | }) |
| | | }, |
| | | handlerClick() { |
| | | console.log("111") |
| | | this.cronPopover = true |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | } |
| | | </script> |
| | |
| | | @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad"> |
| | | |
| | | <template slot-scope="{row, size}" slot="menu"> |
| | | |
| | | <el-button size="small" type="text" icon="el-icon-edit" plain @click="handleEdit(row)">编辑 |
| | | </el-button> |
| | | |
| | |
| | | </el-button> |
| | | </template> |
| | | |
| | | <!-- <template slot="menu" slot-scope="{row, size, index}"> |
| | | <el-button size="small" type="text" icon="el-icon-share" plain @click="share(row)">分享 |
| | | </el-button> |
| | | </template> --> |
| | | |
| | | <!-- <template slot-scope="{row, size}" slot="phone"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, 'phoneflag')" |
| | | v-text="textDispose(row, 'phoneflag', 'phone')"> |
| | | </el-button> |
| | | </template> --> |
| | | |
| | | |
| | | |
| | | <!-- <template slot-scope="{type, disabled}" slot="sceneGeoForm"> |
| | | <el-button type="primary" style="font-size: 14px; border: none;" icon="el-icon-map-location" |
| | | @click="openMap()">获取位置</el-button> |
| | | |
| | | <avue-input-map style="position: fixed; top: -11111111111111px;" ref="avueInputMap" :params="form.params" |
| | | placeholder="请选择地图" v-model="form.sceneGeo"></avue-input-map> |
| | | </template> --> |
| | | |
| | | </avue-crud> |
| | | |
| | | <el-dialog title="编辑" append-to-body :visible.sync="editPopup" center @close="editClose"> |
| | | <avue-form ref="formRef" :option="option" v-model="editForm" @submit="handleSubmit"> |
| | | |
| | | <template slot-scope="{type, disabled}" slot="sceneGeo"> |
| | | <!-- <template slot-scope="{type, disabled}" slot="sceneGeo"> |
| | | <el-button type="primary" style="font-size: 14px; border: none;" icon="el-icon-map-location" |
| | | @click="openMapTwo()">获取位置</el-button> |
| | | |
| | | <avue-input-map style="position: fixed; top: -11111111111111px;" ref="avueInputMapTwo" |
| | | :params="editForm.params" placeholder="请选择地图" v-model="editForm.sceneGeo"></avue-input-map> |
| | | </template> |
| | | </template> --> |
| | | |
| | | </avue-form> |
| | | |
| | |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | span: 12, |
| | | searchSpan: 4, |
| | | label: "任务名称", |
| | | prop: "name", |
| | | search: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入任务名称", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | searchSpan: 4, |
| | | label: "任务类型", |
| | | prop: "taskType", |
| | | type: "select", |
| | | value: "1", |
| | | search: true, |
| | | dicData: [{ |
| | | label: "走访任务", |
| | | value: "0" |
| | |
| | | label: "自查任务", |
| | | value: "1" |
| | | }], |
| | | }, { |
| | | }, |
| | | // { |
| | | // label: "所属街道", |
| | | // parent: false, |
| | | // search: true, |
| | | // searchSpan: 4, |
| | | // prop: "townStreetName", |
| | | // type: "tree", |
| | | // dicUrl: "/api/blade-system/region/getTownTree", |
| | | // props: { |
| | | // label: "name", |
| | | // value: "name" |
| | | // }, |
| | | // rules: [{ |
| | | // required: true, |
| | | // message: "请选择所属街道", |
| | | // trigger: "blur", |
| | | // }, ], |
| | | // }, |
| | | { |
| | | hide: true, |
| | | // parent: false, |
| | | label: "任务范围", |
| | | prop: "taskRange", |
| | | search: false, |
| | | type: "tree", |
| | | dicUrl: "/api/blade-system/region/treeToCommunity", |
| | | props: { |
| | | label: "name", |
| | | value: "id", |
| | | }, |
| | | cascader: ["gridCode"], |
| | | // rules: [{ |
| | | // required: true, |
| | | // message: "请选择所属社区", |
| | | // trigger: "blur", |
| | | // }, ], |
| | | }, |
| | | { |
| | | label: "人员标签", |
| | | prop: "labelId", |
| | | type: "tree", |
| | | parent: false, |
| | | dicUrl: "/api/blade-label/label/getLabelList?parentId=1000", |
| | | display: false, |
| | | props: { |
| | | label: "name", |
| | | value: "id", |
| | | }, |
| | | }, { |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择人员标签", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | span: 7, |
| | | display: false, |
| | | label: "场所标签", |
| | | prop: "placeLabel", |
| | | labelWidth: 120, |
| | | type: "select", |
| | | dicUrl: "/api/blade-category/category/getCategory?level=2", |
| | | cascader: ["placeSmallLabel"], |
| | | props: { |
| | | label: "categoryName", |
| | | value: "categoryNo", |
| | | }, |
| | | dataType: "string", |
| | | // hide: true, |
| | | // rules: [{ |
| | | // required: true, |
| | | // message: "请选择场所标签", |
| | | // trigger: "blur", |
| | | // }, ], |
| | | }, |
| | | { |
| | | span: 5, |
| | | display: false, |
| | | label: "", |
| | | labelWidth: 20, |
| | | prop: "placeSmallLabel", |
| | | type: "select", |
| | | dicUrl: "/api/blade-category/category/getCategory?parentNo={{placeLabel}}", |
| | | props: { |
| | | label: "categoryName", |
| | | value: "categoryNo", |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择场所标签", |
| | | trigger: "blur", |
| | | }, ], |
| | | dataType: "string", |
| | | hide: true, |
| | | }, |
| | | { |
| | | label: "标签颜色", |
| | | prop: "labelColor", |
| | | type: "select", |
| | | display: true, |
| | | value: "green", |
| | | dicData: [{ |
| | | label: "绿", |
| | |
| | | value: "red", |
| | | }, |
| | | ], |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择标签颜色", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, { |
| | | label: "任务计划", |
| | | prop: "cron", |
| | |
| | | label: "title", |
| | | value: "remark", |
| | | }, |
| | | }, { |
| | | span: 7, |
| | | label: "场所标签", |
| | | prop: "placeLabel", |
| | | labelWidth: 120, |
| | | type: "select", |
| | | dicUrl: "/api/blade-category/category/getCategory?level=2", |
| | | cascader: ["placeSmallLabel"], |
| | | props: { |
| | | label: "categoryName", |
| | | value: "categoryNo", |
| | | }, |
| | | dataType: "string", |
| | | hide: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入场所标签", |
| | | message: "请选择任务计划", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | span: 5, |
| | | label: "", |
| | | labelWidth: 20, |
| | | prop: "placeSmallLabel", |
| | | type: "select", |
| | | dicUrl: "/api/blade-category/category/getCategory?parentNo={{placeLabel}}", |
| | | props: { |
| | | label: "categoryName", |
| | | value: "categoryNo", |
| | | }, |
| | | dataType: "string", |
| | | hide: true, |
| | | }, { |
| | | label: "九小类型", |
| | | display: false, |
| | | prop: "nineType", |
| | | searchSpan: 4, |
| | | dataType: "number", |
| | |
| | | label: "title", |
| | | value: "key", |
| | | }, |
| | | search: true, |
| | | // rules: [{ |
| | | // required: true, |
| | | // message: "请选择九小类型", |
| | | // trigger: "blur", |
| | | // }, ], |
| | | searchLabelWidth: 46, |
| | | }, |
| | | { |
| | | label: "状态", |
| | | prop: "taskStatus", |
| | | type: "select", |
| | | value: "1", |
| | | value: 1, |
| | | dicData: [{ |
| | | label: "停止", |
| | | value: "1", |
| | | value: 1, |
| | | }, |
| | | { |
| | | label: "启用", |
| | | value: "2", |
| | | value: 2, |
| | | } |
| | | ], |
| | | }, { |
| | | addDisplay: false, |
| | | }, |
| | | { |
| | | label: "创建时间", |
| | | prop: "createTime", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | } |
| | | }, |
| | | watch: { |
| | | "form.sceneGeo": { |
| | | "form.taskType": { |
| | | // form是表单或者表格绑定的数据集,v-model='form' |
| | | handler(val) { |
| | | if (typeof val == "object") { |
| | | console.log("*****11**********" + val) |
| | | console.log("*****789111**********" + !val) |
| | | if (val.length <= 0) { |
| | | return |
| | | } |
| | | console.log("*****789**********" + val) |
| | | |
| | | var arr = val |
| | | //经纬度替换 |
| | | this.form.sceneGeoLat = arr[1] |
| | | this.form.sceneGeoLng = arr[0] |
| | | this.form.location = arr[2] |
| | | handler(newData) { |
| | | console.log("*******************", newData) |
| | | const column = this.findObject(this.option.column, "placeLabel") |
| | | const column2 = this.findObject(this.option.column, "placeSmallLabel") |
| | | const column3 = this.findObject(this.option.column, "labelId") |
| | | const column5 = this.findObject(this.option.column, "nineType") |
| | | if (newData == 1) { |
| | | column.display = true |
| | | column5.display = true |
| | | column2.display = true |
| | | column3.display = false |
| | | } else { |
| | | column.display = false |
| | | column5.display = false |
| | | column2.display = false |
| | | column3.display = true |
| | | } |
| | | }, |
| | | }, |
| | | "editForm.taskType": { |
| | | // form是表单或者表格绑定的数据集,v-model='form' |
| | | handler(newData) { |
| | | console.log("*******************", newData) |
| | | const column = this.findObject(this.option.column, "placeLabel") |
| | | const column2 = this.findObject(this.option.column, "placeSmallLabel") |
| | | const column3 = this.findObject(this.option.column, "labelId") |
| | | const column5 = this.findObject(this.option.column, "nineType") |
| | | if (newData == 1) { |
| | | column.display = true |
| | | column5.display = true |
| | | column2.display = true |
| | | column3.display = false |
| | | } else { |
| | | column.display = false |
| | | column5.display = false |
| | | column2.display = false |
| | | column3.display = true |
| | | } |
| | | }, |
| | | }, |
| | | |
| | | "editForm.sceneGeo": { |
| | | // form是表单或者表格绑定的数据集,v-model='form' |
| | | handler(val) { |
| | | if (typeof val == "object") { |
| | | if (val.length <= 0) { |
| | | return |
| | | } |
| | | console.log("*****789**********" + val) |
| | | console.log("*****78910**********" + !val) |
| | | // "editForm.sceneGeo": { |
| | | // // form是表单或者表格绑定的数据集,v-model='form' |
| | | // handler(val) { |
| | | // if (typeof val == "object") { |
| | | // if (val.length <= 0) { |
| | | // return |
| | | // } |
| | | // console.log("*****789**********" + val) |
| | | // console.log("*****78910**********" + !val) |
| | | |
| | | var arr = val |
| | | //经纬度替换 |
| | | this.editForm.sceneGeoLat = arr[1] |
| | | this.editForm.sceneGeoLng = arr[0] |
| | | this.editForm.location = arr[2] |
| | | } |
| | | }, |
| | | }, |
| | | // var arr = val |
| | | // //经纬度替换 |
| | | // this.editForm.sceneGeoLat = arr[1] |
| | | // this.editForm.sceneGeoLng = arr[0] |
| | | // this.editForm.location = arr[2] |
| | | // } |
| | | // }, |
| | | // }, |
| | | }, |
| | | |
| | | computed: { |
| | |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetail(this.form.id).then((res) => { |
| | | console.log("********************", res.data) |
| | | this.form = res.data.data |
| | | }) |
| | | } |