| | |
| | | ids, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getRailTree = (type, deptId) => { |
| | | return request({ |
| | | url: '/api/blade-system/dept/lazy-tree-rail', |
| | | method: 'get', |
| | | params: { |
| | | type, |
| | | deptId, |
| | | } |
| | | }) |
| | | } |
| | |
| | | :class="[ |
| | | 'securityUnit', |
| | | $store.state.control.screenSize == 1366 ? 'smallSize' : 'normalSize', |
| | | $store.state.control.windowWidth >= 1024 ? 'tooRowSearch1' : '' |
| | | $store.state.control.windowWidth >= 1024 ? 'tooRowSearch1' : '', |
| | | ]" |
| | | > |
| | | <avue-crud |
| | |
| | | :option="option" |
| | | :data="data" |
| | | :page.sync="page" |
| | | v-model="form" |
| | | ref="crud" |
| | | :permission="permissionList" |
| | | @on-load="onLoad" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getList, |
| | | add, |
| | | update, |
| | | remove |
| | | } from "@/api/rail/rail"; |
| | | import { getList, add, update, remove, getRailTree } from "@/api/rail/rail"; |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | data() { |
| | |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | ...this.$store.state.control.changePageSize |
| | | ...this.$store.state.control.changePageSize, |
| | | }, |
| | | form: {}, |
| | | query: {}, |
| | | data: [], |
| | | dicData1: [], |
| | | dicData2: [], |
| | | dicData3: [], |
| | | option: { |
| | | index: true, |
| | | tip:false, |
| | | tip: false, |
| | | addBtn: true, |
| | | viewBtn: true, |
| | | searchSize: "mini", |
| | |
| | | searchSpan: 4, |
| | | labelWidth: 145, |
| | | minWidth: 160, |
| | | span:24, |
| | | span: 24, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入围栏名称", |
| | | trigger: "click" |
| | | } |
| | | trigger: "click", |
| | | }, |
| | | ], |
| | | overHidden: true |
| | | overHidden: true, |
| | | }, |
| | | |
| | | { |
| | | label: "类型", |
| | | prop: "type", |
| | | span: 12, |
| | | labelWidth: 145, |
| | | disabled: false, |
| | | search: true, |
| | | searchSpan: 4, |
| | | type: "select", |
| | | dicData: [ |
| | | { |
| | | label: "本单位", |
| | | value: 1, |
| | | }, |
| | | { |
| | | label: "分公司", |
| | | value: 2, |
| | | }, |
| | | { |
| | | label: "服务单位", |
| | | value: 3, |
| | | }, |
| | | ], |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择类型", |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "企业名称", |
| | | prop: "partyb", |
| | | span: 12, |
| | | labelWidth: 145, |
| | | disabled: false, |
| | | prop: "companyName", |
| | | display:false, |
| | | minWidth: 160, |
| | | span: 24, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入企业名称", |
| | | trigger: "blur" |
| | | } |
| | | trigger: "click", |
| | | }, |
| | | ], |
| | | overHidden: true, |
| | | }, |
| | | { |
| | | label: "企业名称", |
| | | prop: "companyId", |
| | | span: 12, |
| | | labelWidth: 145, |
| | | type: "tree", |
| | | hide:true, |
| | | props: { |
| | | label: "title", |
| | | value: "id", |
| | | }, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入企业名称", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | dicData: [ |
| | | |
| | | ] |
| | | }, |
| | | { |
| | |
| | | type: "date", |
| | | format: "yyyy-MM-dd HH:mm:ss", |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | | addDisabled:false, |
| | | addDisplay:false, |
| | | display:false, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择创建日期", |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "路线展示", |
| | |
| | | span: 24, |
| | | formslot: true, |
| | | addDisplay: true, |
| | | } |
| | | }, |
| | | ], |
| | | ...this.$store.state.control.clearOtherBut |
| | | } |
| | | ...this.$store.state.control.clearOtherBut, |
| | | }, |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getRailLazyTree(); |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userInfo", "permission"]), |
| | |
| | | addBtn: this.vaildData(this.permission.rail_add, false), |
| | | viewBtn: this.vaildData(this.permission.rail_view, false), |
| | | delBtn: this.vaildData(this.permission.rail_delete, false), |
| | | editBtn: this.vaildData(this.permission.rail_edit, false) |
| | | editBtn: this.vaildData(this.permission.rail_edit, false), |
| | | }; |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach(ele => { |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | }, |
| | | watch: { |
| | | "form.type": { |
| | | handler(val) { |
| | | var companyIdcolumn = this.findObject(this.option.column, "companyId"); |
| | | if(val==1){ |
| | | companyIdcolumn.dicData = this.dicData1; |
| | | } |
| | | if(val==2){ |
| | | companyIdcolumn.dicData = this.dicData2; |
| | | } |
| | | if(val==3){ |
| | | companyIdcolumn.dicData = this.dicData3; |
| | | } |
| | | }, |
| | | immediate: true, |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.$store.commit("setWindowSizeHeightAdd"); |
| | | }, |
| | | methods: { |
| | | //获取单位树数据 |
| | | getRailLazyTree() { |
| | | let that = this; |
| | | getRailTree(1,this.userInfo.dept_id).then((res) => { |
| | | that.dicData1 = res.data.data; |
| | | }); |
| | | getRailTree(2,this.userInfo.dept_id).then((res) => { |
| | | that.dicData2 = res.data.data; |
| | | }); |
| | | getRailTree(3,this.userInfo.dept_id).then((res) => { |
| | | that.dicData3 = res.data.data; |
| | | }); |
| | | }, |
| | | sizeChange(val) { |
| | | this.page1.currentPage = 1; |
| | | this.page1.pageSize = val; |
| | |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | rowSave(form, done, loading) { |
| | | add(form).then(res => { |
| | | add(form).then((res) => { |
| | | if (res.data.success) { |
| | | this.$message({ |
| | | message: "操作成功", |
| | | type: "success" |
| | | type: "success", |
| | | }); |
| | | this.refreshChange(); |
| | | done(); |
| | | } else { |
| | | this.$message({ |
| | | message: "操作失败", |
| | | type: "warning" |
| | | type: "warning", |
| | | }); |
| | | done(); |
| | | } |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | error => { |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm( |
| | | "确定删除当前合同信息数据?", |
| | | { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | } |
| | | ) |
| | | this.$confirm("确定删除当前合同信息数据?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | console.log(row); |
| | | return remove(row.id); |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | this.$confirm("确定批量将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids).then(res => { |
| | | return remove(this.ids).then((res) => { |
| | | this.refreshChange(); |
| | | }); |
| | | }) |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | message: "操作成功!", |
| | | }); |
| | | this.$refs.crudrec.toggleSelection(); |
| | | }) |
| | | .catch(res => {}); |
| | | .catch((res) => {}); |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | if(this.userInfo.role_name == "公安管理员" || this.userInfo.role_name == "民警" || this.userInfo.role_name == "administrator"){ |
| | | if ( |
| | | this.userInfo.role_name == "公安管理员" || |
| | | this.userInfo.role_name == "民警" || |
| | | this.userInfo.role_name == "administrator" |
| | | ) { |
| | | params["jurisdiction"] = this.userInfo.jurisdiction; |
| | | } |
| | | this.loading = true; |
| | |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.query) |
| | | ).then(res => { |
| | | ).then((res) => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | |
| | | this.$store.commit("setWindowSizeHeightAdd"); |
| | | this.loading = false; |
| | | }); |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | // border: 1px solid #000; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | |
| | | .mapClass div label { |
| | | display: none; |
| | |
| | | { |
| | | label: "是否持证", |
| | | prop: "hold", |
| | | // dicUrl: "/api/blade-system/dict-biz/dictionary?code=equipage", |
| | | // props: { |
| | | // label: "dictValue", |
| | | // value: "dictKey", |
| | | // }, |
| | | type: "select", |
| | | dicData: [ |
| | | { |
| | |
| | | "securitynumber" |
| | | ); |
| | | // var emailcolumn = this.findObject(this.option.group, "email"); |
| | | // console.log(val,1234); |
| | | console.log(val,1234); |
| | | if (val == 1) { |
| | | securitynumbercolumn.display = true; |
| | | securitynumbercolumn.rules = [ |
| | |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | //获取查询条件 |
| | | // const { releaseTimeRange } = this.search; |
| | | // if (releaseTimeRange) { |
| | | // this.search["startTime"] = releaseTimeRange[0]; |
| | | // this.search["endTime"] = releaseTimeRange[1]; |
| | | // } |
| | | var data = { |
| | | cardid: this.search.cardid, |
| | | deptId: this.search.deptId, |
| | |
| | | size="small" |
| | | plain |
| | | icon="el-icon-checked" |
| | | v-if="permission.batch_vip" |
| | | @click="usesVipConfirmBatch" |
| | | >批量缴费 |
| | | </el-button> |