5 files modified
3 files added
| New file |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | // export const getList = (current, size, params) => { |
| | | // return request({ |
| | | // url: '/api/accreditationRecords/page', |
| | | // method: 'get', |
| | | // params: { |
| | | // current, |
| | | // size, |
| | | // ...params |
| | | // } |
| | | // }) |
| | | // } |
| | | |
| | | export const getJurisdictionTree = () => { |
| | | return request({ |
| | | url: '/api/jurisdiction/lazy-trees', |
| | | method: 'get', |
| | | params: {} |
| | | }) |
| | | } |
| New file |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export const getList = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/registerUnit/page', |
| | | method: 'get', |
| | | params: { |
| | | current, |
| | | size, |
| | | ...params |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getDetail = (id) => { |
| | | return request({ |
| | | url: '/api/registerUnit/detail', |
| | | method: 'get', |
| | | params: { |
| | | id |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | export const remove = (ids) => { |
| | | return request({ |
| | | url: '/api/registerUnit/remove', |
| | | method: 'post', |
| | | params: { |
| | | ids, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const submit = (row) => { |
| | | return request({ |
| | | url: '/api/registerUnit/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const add = (row) => { |
| | | return request({ |
| | | url: '/api/registerUnit/save', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const update = (row) => { |
| | | return request({ |
| | | url: '/api/registerUnit/update', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | |
| | | export const audit = (row) => { |
| | | return request({ |
| | | url: '/api/registerUnit/audit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | |
| | | export const batchAudit = (row) => { |
| | | return request({ |
| | | url: '/api/registerUnit/batchAudit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export const getList = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/blade-resource/oss/list', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | return request({ |
| | | url: '/api/blade-resource/oss/list', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getDetail = (id) => { |
| | | return request({ |
| | | url: '/api/blade-resource/oss/detail', |
| | | method: 'get', |
| | | params: { |
| | | id |
| | | } |
| | | }) |
| | | return request({ |
| | | url: '/api/blade-resource/oss/detail', |
| | | method: 'get', |
| | | params: { |
| | | id |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const remove = (ids) => { |
| | | return request({ |
| | | url: '/api/blade-resource/oss/remove', |
| | | method: 'post', |
| | | params: { |
| | | ids, |
| | | } |
| | | }) |
| | | return request({ |
| | | url: '/api/blade-resource/oss/remove', |
| | | method: 'post', |
| | | params: { |
| | | ids, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const add = (row) => { |
| | | return request({ |
| | | url: '/api/blade-resource/oss/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | return request({ |
| | | url: '/api/blade-resource/oss/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const update = (row) => { |
| | | return request({ |
| | | url: '/api/blade-resource/oss/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | return request({ |
| | | url: '/api/blade-resource/oss/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const enable = (id) => { |
| | | return request({ |
| | | url: '/api/blade-resource/oss/enable', |
| | | method: 'post', |
| | | params: { |
| | | id |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const putFile = (data) => { |
| | | return request({ |
| | | url: '/api/blade-resource/oss/endpoint/put-files', |
| | | method: 'post', |
| | | data: data, |
| | | headers: { 'Content-Type': 'multipart/form-data' } |
| | | }) |
| | | } |
| | |
| | | <template> |
| | | <el-form |
| | | class="login-form" |
| | | status-icon |
| | | :rules="loginRules" |
| | | ref="loginForm" |
| | | :model="loginForm" |
| | | label-width="0" |
| | | > |
| | | <el-form-item prop="username"> |
| | | <el-input |
| | | size="small" |
| | | @keyup.enter.native="handleLogin" |
| | | v-model="loginForm.username" |
| | | auto-complete="off" |
| | | :placeholder="$t('login.username')" |
| | | <div> |
| | | <avue-tabs :option="option" @change="handleChange"></avue-tabs> |
| | | <span v-if="type.prop === 'tab1'"> |
| | | <el-form |
| | | class="login-form" |
| | | status-icon |
| | | :rules="loginRules" |
| | | ref="loginForm" |
| | | :model="loginForm" |
| | | label-width="0" |
| | | > |
| | | <i slot="prefix" class="icon-yonghu" /> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="password"> |
| | | <el-input |
| | | size="small" |
| | | @keyup.enter.native="handleLogin" |
| | | v-model="loginForm.password" |
| | | auto-complete="off" |
| | | show-password |
| | | :placeholder="$t('login.password')" |
| | | <el-form-item prop="username"> |
| | | <el-input |
| | | size="small" |
| | | @keyup.enter.native="handleLogin" |
| | | v-model="loginForm.username" |
| | | auto-complete="off" |
| | | :placeholder="$t('login.username')" |
| | | clearable="true" |
| | | > |
| | | <i slot="prefix" class="icon-yonghu" /> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="password"> |
| | | <el-input |
| | | size="small" |
| | | @keyup.enter.native="handleLogin" |
| | | v-model="loginForm.password" |
| | | auto-complete="off" |
| | | show-password |
| | | :placeholder="$t('login.password')" |
| | | clearable="true" |
| | | > |
| | | <i slot="prefix" class="icon-mima" /> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="password2"> |
| | | <el-input |
| | | size="small" |
| | | @keyup.enter.native="handleLogin" |
| | | v-model="loginForm.password2" |
| | | auto-complete="off" |
| | | show-password |
| | | :placeholder="$t('login.password2')" |
| | | clearable="true" |
| | | > |
| | | <i slot="prefix" class="icon-mima" /> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="sname"> |
| | | <el-input |
| | | size="small" |
| | | @keyup.enter.native="handleLogin" |
| | | v-model="loginForm.sname" |
| | | auto-complete="off" |
| | | :placeholder="$t('login.name')" |
| | | clearable="true" |
| | | > |
| | | <i slot="prefix" class="icon-yonghu" /> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="cardid"> |
| | | <el-input |
| | | size="small" |
| | | v-model="loginForm.cardid" |
| | | auto-complete="off" |
| | | :placeholder="$t('login.cardid')" |
| | | clearable="true" |
| | | > |
| | | <i slot="prefix" class="icon-shouji" /> |
| | | </el-input> |
| | | </el-form-item> |
| | | <avue-input-tree |
| | | style="width: 580px !important" |
| | | :defaultExpandAll="loginForm.defaultFlag" |
| | | v-model="loginForm.deptid" |
| | | placeholder="请选择部门" |
| | | type="tree" |
| | | :dic="dic" |
| | | ></avue-input-tree> |
| | | <el-form-item class="z-login-submit-prv"> |
| | | <el-button |
| | | size="small" |
| | | type="primary" |
| | | @click.native.prevent="handleLogin" |
| | | class="z-login-submit" |
| | | >{{ $t("login.zc") }} |
| | | </el-button> |
| | | <el-button |
| | | size="small" |
| | | @click.native.prevent="gbs" |
| | | class="z-login-submit" |
| | | >{{ $t("login.gb") }} |
| | | </el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </span> |
| | | <!-- 企业注册 --> |
| | | <span v-else-if="type.prop === 'tab2'"> |
| | | <el-form |
| | | class="login-form" |
| | | status-icon |
| | | :rules="unitRules" |
| | | ref="unitForm" |
| | | :model="unitForm" |
| | | label-width="0" |
| | | > |
| | | <i slot="prefix" class="icon-mima" /> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="password2"> |
| | | <el-input |
| | | size="small" |
| | | @keyup.enter.native="handleLogin" |
| | | v-model="loginForm.password2" |
| | | auto-complete="off" |
| | | show-password |
| | | :placeholder="$t('login.password2')" |
| | | > |
| | | <i slot="prefix" class="icon-mima" /> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="sname"> |
| | | <el-input |
| | | size="small" |
| | | @keyup.enter.native="handleLogin" |
| | | v-model="loginForm.sname" |
| | | auto-complete="off" |
| | | :placeholder="$t('login.name')" |
| | | > |
| | | <i slot="prefix" class="icon-yonghu" /> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="cardid"> |
| | | <el-input |
| | | size="small" |
| | | v-model="loginForm.cardid" |
| | | auto-complete="off" |
| | | :placeholder="$t('login.cardid')" |
| | | > |
| | | <i slot="prefix" class="icon-shouji" /> |
| | | </el-input> |
| | | </el-form-item> |
| | | <avue-input-tree |
| | | style="width: 580px !important" |
| | | :defaultExpandAll="loginForm.defaultFlag" |
| | | v-model="loginForm.deptid" |
| | | placeholder="请选择部门" |
| | | type="tree" |
| | | :dic="dic" |
| | | ></avue-input-tree> |
| | | <el-form-item class="z-login-submit-prv"> |
| | | <el-button |
| | | size="small" |
| | | type="primary" |
| | | @click.native.prevent="handleLogin" |
| | | class="z-login-submit" |
| | | >{{ $t("login.zc") }} |
| | | </el-button> |
| | | <el-button size="small" @click.native.prevent="gbs" class="z-login-submit" |
| | | >{{ $t("login.gb") }} |
| | | </el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-form-item prop="deptName"> |
| | | <el-input |
| | | size="small" |
| | | @keyup.enter.native="handleUnitRegister" |
| | | v-model="unitForm.deptName" |
| | | auto-complete="off" |
| | | placeholder="企业名称" |
| | | clearable="true" |
| | | > |
| | | <i slot="prefix" class="el-icon-house" /> |
| | | </el-input> |
| | | </el-form-item> |
| | | <div style="margin-top: -1.5rem"> |
| | | <i |
| | | slot="prefix" |
| | | style="position: relative; top: 1.9rem; left: 0.5rem" |
| | | class="el-icon-position" |
| | | /> |
| | | <div style="position: relative"> |
| | | <el-form-item prop="jurisdiction"> |
| | | <avue-input-tree |
| | | :props="props" |
| | | :parent="false" |
| | | :defaultExpandedKeys="defaultExpandedKeys" |
| | | v-model="unitForm.jurisdiction" |
| | | style="width: 35rem !important; padding-left: 0.9rem !important" |
| | | placeholder="请选择辖区" |
| | | type="tree" |
| | | :dic="jurisdictionDic" |
| | | > |
| | | </avue-input-tree> |
| | | </el-form-item> |
| | | </div> |
| | | </div> |
| | | <div style="margin-top: -1.5rem"> |
| | | <i |
| | | slot="prefix" |
| | | style="position: relative; top: 1.9rem; left: 0.5rem" |
| | | class="el-icon-wallet" |
| | | /> |
| | | <div style="position: relative"> |
| | | <el-form-item prop="stats"> |
| | | <avue-select |
| | | default-expand-all |
| | | :props="statsProps" |
| | | v-model="unitForm.stats" |
| | | style="width: 35rem !important; padding-left: 0.9rem !important" |
| | | placeholder="请选择企业属性" |
| | | type="tree" |
| | | :dic="statsDic" |
| | | > |
| | | </avue-select> |
| | | </el-form-item> |
| | | </div> |
| | | </div> |
| | | <el-form-item prop="linkman"> |
| | | <el-input |
| | | size="small" |
| | | @keyup.enter.native="handleUnitRegister" |
| | | v-model="unitForm.linkman" |
| | | auto-complete="off" |
| | | placeholder="联系人" |
| | | clearable="true" |
| | | > |
| | | <i slot="prefix" class="el-icon-user" /> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="phone"> |
| | | <el-input |
| | | size="small" |
| | | v-model="unitForm.phone" |
| | | auto-complete="off" |
| | | placeholder="联系人电话" |
| | | clearable="true" |
| | | > |
| | | <i slot="prefix" class="icon-shouji" /> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="address"> |
| | | <el-input |
| | | size="small" |
| | | v-model="unitForm.address" |
| | | auto-complete="off" |
| | | placeholder="企业注册地址" |
| | | clearable="true" |
| | | > |
| | | <i slot="prefix" class="el-icon-map-location" /> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="unit"> |
| | | <el-input |
| | | size="small" |
| | | v-model="unitForm.unit" |
| | | auto-complete="off" |
| | | placeholder="登记机关" |
| | | clearable="true" |
| | | > |
| | | <i slot="prefix" class="el-icon-office-building" /> |
| | | </el-input> |
| | | </el-form-item> |
| | | <div style="margin-top: -1.5rem"> |
| | | <i |
| | | slot="prefix" |
| | | style="position: relative; top: 1.9rem; left: 0.5rem" |
| | | class="el-icon-picture-outline" |
| | | /> |
| | | <div style="position: relative; left: 3rem; top: 1rem"> |
| | | <el-form-item prop="businessLicense"> |
| | | <i slot="prefix" class="el-icon-picture-outline" /> |
| | | <el-upload |
| | | class="avatar-uploader" |
| | | action="" |
| | | :show-file-list="false" |
| | | :on-success="handleAvatarSuccess" |
| | | :before-upload="beforeAvatarUpload" |
| | | :http-request="httpRequest" |
| | | placeholder="营业执照" |
| | | > |
| | | <img v-if="imageUrl" :src="imageUrl" class="avatar" /> |
| | | <i v-else class="el-icon-plus avatar-uploader-icon"></i> |
| | | <div class="el-upload__tip" slot="tip"> |
| | | 请上传营业执照,只能上传jpg/png文件,且不超过2MB |
| | | </div> |
| | | </el-upload> |
| | | </el-form-item> |
| | | </div> |
| | | </div> |
| | | <el-form-item class="z-login-submit-prv"> |
| | | <el-button |
| | | size="small" |
| | | type="primary" |
| | | @click.native.prevent="handleUnitRegister" |
| | | class="z-login-submit" |
| | | >{{ $t("login.zc") }} |
| | | </el-button> |
| | | <el-button |
| | | size="small" |
| | | @click.native.prevent="gbs" |
| | | class="z-login-submit" |
| | | >{{ $t("login.gb") }} |
| | | </el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </span> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { isvalidatemobile } from "@/util/validate"; |
| | | import { inster } from "@/api/zc/zc"; |
| | | import { ss, rs } from "@/api/system/dept"; |
| | | import { add } from "@/api/registerUnit/registerUnit"; |
| | | import { ss } from "@/api/system/dept"; |
| | | import { getDictionary } from "@/api/system/dictbiz"; |
| | | import { getJurisdictionTree } from "@/api/jurisdiction/jurisdiction"; |
| | | import { putFile } from "@/api/resource/oss"; |
| | | import { mapGetters } from "vuex"; |
| | | |
| | | export default { |
| | |
| | | } |
| | | }; |
| | | return { |
| | | defaultExpandedKeys: [], |
| | | imageUrl: "", |
| | | props: { |
| | | label: "title", |
| | | }, |
| | | // statsProps: { |
| | | // label: "dictValue", |
| | | // value: "dictKey", |
| | | // }, |
| | | msgText: "", |
| | | msgTime: "", |
| | | dic: [], |
| | | jurisdictionDic: [], |
| | | statsDic: [ |
| | | { |
| | | label:"本市保安公司", |
| | | value:"2" |
| | | }, |
| | | { |
| | | label:"自招保安单位", |
| | | value:"0" |
| | | }, |
| | | { |
| | | label:"跨区域保安公司", |
| | | value:"4" |
| | | }, |
| | | { |
| | | label:"保安培训学校", |
| | | value:"1" |
| | | } |
| | | ], |
| | | dicr: [], |
| | | msgKey: false, |
| | | type: {}, |
| | | option: { |
| | | column: [ |
| | | { |
| | | label: "个人注册", |
| | | prop: "tab1", |
| | | }, |
| | | { |
| | | label: "企业注册", |
| | | prop: "tab2", |
| | | }, |
| | | ], |
| | | }, |
| | | loginForm: { |
| | | cardid: "", |
| | | username: "", |
| | |
| | | deptid: "", |
| | | roleid: "", |
| | | password2: "", |
| | | }, |
| | | unitForm: { |
| | | deptName: "", |
| | | stats: "", |
| | | jurisdiction: "", |
| | | linkman: "", |
| | | phone: "", |
| | | address: "", |
| | | unit: "", |
| | | businessLicense: "", |
| | | }, |
| | | value: "", |
| | | options: [], |
| | |
| | | { required: true, message: "请输入用户名", trigger: "blur" }, |
| | | ], |
| | | }, |
| | | unitRules: { |
| | | deptName: [ |
| | | { required: true, message: "请输入企业名称", trigger: "blur" }, |
| | | ], |
| | | linkman: [{ required: true, message: "请输入联系人", trigger: "blur" }], |
| | | phone: [{ required: true, message: "请输入联系电话", trigger: "blur" }], |
| | | address: [ |
| | | { required: true, message: "请输入企业注册地址", trigger: "blur" }, |
| | | ], |
| | | unit: [{ required: true, message: "请输入登记机关", trigger: "blur" }], |
| | | jurisdiction: [ |
| | | { required: true, message: "请选择辖区", trigger: "blur" }, |
| | | ], |
| | | stats: [ |
| | | { required: true, message: "请选择企业属性", trigger: "blur" }, |
| | | ], |
| | | }, |
| | | passwordType: "password", |
| | | passwordTypes: "password2", |
| | | }; |
| | | }, |
| | | created() { |
| | | this.type = this.option.column[0]; |
| | | this.msgText = this.config.MSGINIT; |
| | | this.msgTime = this.config.MSGTIME; |
| | | // defaultFlag |
| | | this.getJurisdictionTree(); |
| | | // this.getDictionary(); |
| | | }, |
| | | mounted() { |
| | | var that = this; |
| | |
| | | }; |
| | | }, |
| | | }, |
| | | props: [], |
| | | methods: { |
| | | //图片上传 |
| | | beforeAvatarUpload(file) { |
| | | var isJPG = true; |
| | | const picType = file.type; |
| | | const isLt2M = file.size / 1024 / 1024 < 2; |
| | | |
| | | if ( |
| | | picType != "image/jpeg" && |
| | | picType != "image/jpg" && |
| | | picType != "image/png" |
| | | ) { |
| | | isJPG = true; |
| | | this.$message.error("必须时图片格式!"); |
| | | } |
| | | if (!isLt2M) { |
| | | this.$message.error("头像图片不能大于 2MB!"); |
| | | } |
| | | return picType && isLt2M; |
| | | }, |
| | | //自定义上传 |
| | | httpRequest(opt) { |
| | | var that = this; |
| | | const file = opt.file; |
| | | // 根据后台需求数据格式 |
| | | const form = new FormData(); |
| | | // 文件对象 |
| | | form.append("file", file); |
| | | putFile(form).then((res) => { |
| | | that.imageUrl = res.data.data.url; |
| | | }); |
| | | }, |
| | | //注册 tag 切换 |
| | | handleChange(column) { |
| | | this.type = column; |
| | | var height = "500px"; |
| | | if (column.prop == "tab2") { |
| | | height = "800px"; |
| | | } |
| | | this.$emit("height", height); |
| | | }, |
| | | //获取辖区数据 |
| | | getJurisdictionTree() { |
| | | var that = this; |
| | | getJurisdictionTree().then((res) => { |
| | | that.jurisdictionDic = res.data.data; |
| | | that.defaultExpandedKeys = []; |
| | | res.data.data.forEach((item) => { |
| | | that.defaultExpandedKeys.push(item.id); |
| | | }); |
| | | }); |
| | | }, |
| | | //获取企业属性数据 |
| | | getDictionary() { |
| | | var that = this; |
| | | var data = { |
| | | code: "stats", |
| | | }; |
| | | getDictionary(data).then((res) => { |
| | | // console.log(res.data.data, 111111); |
| | | that.statsDic = res.data.data; |
| | | }); |
| | | }, |
| | | ergodicData(val) { |
| | | var arr = []; |
| | | |
| | | val.forEach((item, index) => { |
| | | arr.push({ |
| | | label: item.title, |
| | |
| | | var z = document.querySelector(".z"); |
| | | z.style.display = "none"; |
| | | this.clearValidate("loginForm"); |
| | | this.clearValidate("loginForm"); |
| | | }, |
| | | gb() { |
| | | this.loginForm.cardid = ""; |
| | |
| | | ? (this.passwordType = "password2") |
| | | : (this.passwordType = ""); |
| | | }, |
| | | //个人注册提交 |
| | | handleLogin() { |
| | | this.$refs.loginForm.validate((valid) => { |
| | | if (valid) { |
| | | this.refreshCode(this.loginForm); |
| | | // this.message("dahsiofhiusa"); |
| | | return Promise.reject(new Error("注册成功,待审核")); |
| | | } |
| | | }); |
| | | }, |
| | | //公司注册提交 |
| | | handleUnitRegister() { |
| | | var that = this; |
| | | this.$refs.unitForm.validate((valid) => { |
| | | if (valid) { |
| | | this.unitForm.businessLicense = this.imageUrl; |
| | | //提交 |
| | | add(this.unitForm).then((res) => { |
| | | //恢复表单默认值 |
| | | that.$refs["unitForm"].resetFields(); |
| | | that.imageUrl = ""; |
| | | this.$message({ |
| | | type: "success", |
| | | message: "注冊成功,待审核!", |
| | | }); |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | -webkit-transition: 0.25s; |
| | | transition: 0.25s; |
| | | } |
| | | |
| | | .avatar-uploader .el-upload { |
| | | border: 1px dashed #d9d9d9; |
| | | border-radius: 6px; |
| | | cursor: pointer; |
| | | position: relative; |
| | | overflow: hidden; |
| | | } |
| | | .avatar-uploader .el-upload:hover { |
| | | border-color: #409eff; |
| | | } |
| | | .avatar-uploader-icon { |
| | | font-size: 28px; |
| | | color: #8c939d; |
| | | width: 178px; |
| | | height: 178px; |
| | | line-height: 178px; |
| | | text-align: center; |
| | | } |
| | | .avatar { |
| | | width: 178px; |
| | | height: 178px; |
| | | display: block; |
| | | } |
| | | </style> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="z" v-show="activeName == 'code'"> |
| | | <codeLogin></codeLogin> |
| | | <div class="z" v-show="activeName == 'code'" :style="{height:height}"> |
| | | <codeLogin v-on:height='setHeight'></codeLogin> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | state: "", |
| | | link: "", |
| | | }, |
| | | height:"500px" |
| | | }; |
| | | }, |
| | | watch: { |
| | |
| | | }, |
| | | props: [], |
| | | methods: { |
| | | //获取高度 |
| | | setHeight(height){ |
| | | // console.log(height,8888); |
| | | this.height = height; |
| | | }, |
| | | getTime() { |
| | | setInterval(() => { |
| | | this.time = dateFormat(new Date()); |
| New file |
| | |
| | | <template> |
| | | <basic-container |
| | | :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']" |
| | | > |
| | | <avue-crud |
| | | :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page.sync="page" |
| | | :search.sync="search" |
| | | :permission="permissionList" |
| | | :before-open="beforeOpen" |
| | | v-model="form" |
| | | ref="crud" |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | | @row-del="rowDel" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="permission.zc_delete" |
| | | @click="handleDelete" |
| | | >删 除 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{ row }" slot="auditStatus"> |
| | | <el-tag>{{ |
| | | row.auditStatus === "1" |
| | | ? "待审核" |
| | | : row.auditStatus === "2" |
| | | ? "审核通过" |
| | | : "审核不通过" |
| | | }}</el-tag> |
| | | </template> |
| | | |
| | | <template slot-scope="{ row }" slot="roleName"> |
| | | <el-tag>{{ row.roleName }}</el-tag> |
| | | </template> |
| | | <template slot-scope="{ row,size,type }" slot="menu"> |
| | | <el-button |
| | | icon="el-icon-check" |
| | | :type="type" |
| | | :size="size" |
| | | @click.stop="handleAudit(row)" |
| | | >审核</el-button |
| | | > |
| | | </template> |
| | | </avue-crud> |
| | | <el-dialog |
| | | title="审核" |
| | | :visible.sync="dialogFormVisible" |
| | | modal-append-to-body="false" |
| | | append-to-body="true" |
| | | :close-on-click-model="true" |
| | | > |
| | | <avue-form |
| | | ref="formAudit" |
| | | v-model="Audit" |
| | | :option="optionAudit" |
| | | @reset-change="emptytChange" |
| | | @submit="submit" |
| | | ></avue-form> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getList, getDetail, add, update, remove,audit } from "@/api/registerUnit/registerUnit"; |
| | | import { getRoleTree } from "@/api/system/role"; |
| | | import { mapGetters } from "vuex"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | form: {}, |
| | | query: {}, |
| | | search: {}, |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | ...this.$store.state.control.changePageSize, |
| | | }, |
| | | selectionList: [], |
| | | Audit: {}, |
| | | dialogFormVisible: false, |
| | | optionAudit: { |
| | | height: "auto", |
| | | calcHeight: 30, |
| | | dialogWidth: 1000, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: true, |
| | | index: true, |
| | | stripe: true, |
| | | viewBtn: false, |
| | | addBtn: false, |
| | | editBtn: false, |
| | | selection: true, |
| | | excelBtn: false, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: "审核状态", |
| | | search: true, |
| | | searchSpan: 5, |
| | | span: 24, |
| | | prop: "auditStatus", |
| | | slot: true, |
| | | editDisplay: false, |
| | | addDisplay: false, |
| | | type: "select", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择审核类型", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | dicData: [ |
| | | { |
| | | label: "待审核", |
| | | value: "1", |
| | | }, |
| | | { |
| | | label: "审核通过", |
| | | value: "2", |
| | | }, |
| | | { |
| | | label: "审核不通过", |
| | | value: "3", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "审核明细", |
| | | span: 24, |
| | | type: "textarea", |
| | | prop: "auditDetail", |
| | | }, |
| | | ], |
| | | }, |
| | | option: { |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 4, |
| | | border: true, |
| | | index: true, |
| | | viewBtn: false, |
| | | // selection: true, |
| | | headerAlign: "center", |
| | | menuWidth:150, |
| | | align: "center", |
| | | dialogClickModal: false, |
| | | ...this.$store.state.control.clearOtherBut, |
| | | column: [ |
| | | { |
| | | label: "注册企业名称", |
| | | searchSpan: 5, |
| | | display: false, |
| | | searchLabelWidth: 110, |
| | | search: true, |
| | | disabled: true, |
| | | prop: "deptName", |
| | | minWidth:100, |
| | | overHidden:true, |
| | | }, |
| | | { |
| | | label: "联系人", |
| | | display: false, |
| | | width:80, |
| | | search: true, |
| | | searchSpan: 4, |
| | | disabled: true, |
| | | prop: "linkman", |
| | | }, |
| | | { |
| | | label: "联系电话", |
| | | width:100, |
| | | disabled: true, |
| | | display: false, |
| | | prop: "phone", |
| | | }, |
| | | { |
| | | label: "企业属性", |
| | | prop: "stats", |
| | | type:"select", |
| | | width:100, |
| | | dicData:[ |
| | | { |
| | | label:"本市保安公司", |
| | | value:"2" |
| | | }, |
| | | { |
| | | label:"自招保安单位", |
| | | value:"0" |
| | | }, |
| | | { |
| | | label:"跨区域保安公司", |
| | | value:"4" |
| | | }, |
| | | { |
| | | label:"保安培训学校", |
| | | value:"1" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "所属辖区", |
| | | prop: "jurisdictionName", |
| | | width:100, |
| | | }, |
| | | { |
| | | label: "企业注册地址", |
| | | prop: "address", |
| | | }, |
| | | { |
| | | label: "登记机关", |
| | | prop: "unit", |
| | | }, |
| | | { |
| | | label: "申请时间", |
| | | prop: "createTime", |
| | | searchLabelWidth: 90, |
| | | width: 140, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | }, |
| | | { |
| | | label: "营业执照", |
| | | prop: "businessLicense", |
| | | type: "upload", |
| | | width:100, |
| | | listType: "picture-img", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | }, |
| | | { |
| | | label: "审核状态", |
| | | prop: "auditStatus", |
| | | search: true, |
| | | slot: true, |
| | | searchSpan: 4, |
| | | width:100, |
| | | type: "select", |
| | | dicData: [ |
| | | { |
| | | label: "全部", |
| | | value: "4", |
| | | }, |
| | | { |
| | | label: "待审核", |
| | | value: "1", |
| | | }, |
| | | { |
| | | label: "审核通过", |
| | | value: "2", |
| | | }, |
| | | { |
| | | label: "审核不通过", |
| | | value: "3", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "审核明细", |
| | | span: 24, |
| | | type: "textarea", |
| | | prop: "auditDetail", |
| | | width:100, |
| | | overHidden:true, |
| | | }, |
| | | ], |
| | | }, |
| | | data: [], |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userInfo", "permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.zc_add, false), |
| | | viewBtn: this.vaildData(this.permission.zc_view, true), |
| | | delBtn: this.vaildData(this.permission.zc_delete, false), |
| | | editBtn: this.vaildData(this.permission.zc_edit, false), |
| | | }; |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | }, |
| | | created(){ |
| | | if(this.userInfo.role_name=="公安管理员"){ |
| | | this.search['auditStatus'] = "1"; |
| | | } |
| | | }, |
| | | methods: { |
| | | //审核 |
| | | submit(row, done, loading) { |
| | | const data = { |
| | | id: row.id, |
| | | auditStatus: row.auditStatus, |
| | | auditDetail: row.auditDetail, |
| | | auditUser: this.userInfo.Id, |
| | | }; |
| | | |
| | | audit(data).then( |
| | | () => { |
| | | this.dialogFormVisible = false; |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | // loading(); |
| | | done(); |
| | | } |
| | | ); |
| | | }, |
| | | initData(d) { |
| | | getRoleTree().then((res) => { |
| | | const column = this.findObject(this.option.column, "parentId"); |
| | | var k = res.data.data; |
| | | var b = []; |
| | | if (d == "保安公司管理员") { |
| | | console.log(k); |
| | | for (var n in k) { |
| | | if (k[n].title == "保安" || k[n].title == "保安公司管理员") { |
| | | b.push(k[n]); |
| | | } |
| | | } |
| | | column.dicData = b; |
| | | } else { |
| | | column.dicData = k; |
| | | } |
| | | }); |
| | | }, |
| | | //审核 |
| | | handleAudit(row) { |
| | | this.dialogFormVisible = true; |
| | | this.Audit = row; |
| | | }, |
| | | rowSave(row, done, loading) { |
| | | add(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | loading(); |
| | | window.console.log(error); |
| | | } |
| | | ); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | loading(); |
| | | console.log(error); |
| | | } |
| | | ); |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | }); |
| | | }, |
| | | 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(); |
| | | }, |
| | | 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(); |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | params = this.search; |
| | | this.loading = true; |
| | | if(this.userInfo.role_name=="公安管理员"){ |
| | | params['jurisdiction'] = this.userInfo.jurisdiction; |
| | | } |
| | | 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(); |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | </style> |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | // { |
| | | // label: "发证日期", |
| | | // prop: "paperTime", |
| | | // hide: true, |
| | | // type: "date", |
| | | // format: "yyyy-MM-dd", |
| | | // valueFormat: "yyyy-MM-dd", |
| | | // }, |
| | | { |
| | | label: "保安证书照片", |
| | | prop: "email", |
| | |
| | | tip: "上传jpg,png格式图片,大小不超过2M", |
| | | span: 12, |
| | | }, |
| | | // { |
| | | // label: "籍贯", |
| | | // prop: "nativeplace", |
| | | // }, |
| | | { |
| | | label: "民族", |
| | | prop: "nation", |
| | |
| | | parent: false, |
| | | labelWidth: 145, |
| | | type: "tree", |
| | | dicUrl: "/api//jurisdiction/lazy-trees", |
| | | dicUrl: "/api/jurisdiction/lazy-trees", |
| | | props: { |
| | | label: "title", |
| | | value: "id", |