17 files modified
4 files added
| | |
| | | plain |
| | | icon="el-icon-folder-checked" |
| | | @click="handleBatchExam" |
| | | |
| | | >生成考试 |
| | | </el-button> |
| | | <!-- v-if="examPersission" --> |
| | |
| | | </template> |
| | | |
| | | <template slot-scope="{ row }" slot="age"> |
| | | {{ row.age==-1? '':row.age }} |
| | | {{ row.age == -1 ? "" : row.age }} |
| | | </template> |
| | | </avue-crud> |
| | | |
| | |
| | | @reset-change="emptytChange" |
| | | @submit="submit" |
| | | ></avue-form> |
| | | |
| | | </el-dialog> |
| | | |
| | | <el-dialog |
| | |
| | | </avue-form> |
| | | </el-dialog> |
| | | |
| | | |
| | | <el-dialog |
| | | title="考试生成" |
| | | append-to-body |
| | | :visible.sync="dialogExamFormVisible" |
| | | width="900px" |
| | | @close='closeDialog' |
| | | @close="closeDialog" |
| | | > |
| | | <avue-form |
| | | ref="formExamApply" |
| | |
| | | addApply, |
| | | cancelApply, |
| | | remove, |
| | | addExam |
| | | addExam, |
| | | } from "@/api/examapi/applyexam"; |
| | | import { mapState } from "vuex"; |
| | | |
| | |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: false, |
| | | border: true, //liu |
| | | index: true, |
| | | stripe: true, |
| | | viewBtn: true, |
| | |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: false, |
| | | border: true, //liu |
| | | index: true, |
| | | stripe: true, |
| | | viewBtn: true, |
| | |
| | | editDisplay: false, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | viewDisplay: true |
| | | viewDisplay: true, |
| | | }, |
| | | // { |
| | | // label: "考试名称", |
| | |
| | | editDetail: false, |
| | | dicData:[ |
| | | { |
| | | label: '正常', |
| | | value: "1" |
| | | label: "正常", |
| | | value: "1", |
| | | }, |
| | | { |
| | | label: '异常', |
| | | value: "2" |
| | | } |
| | | label: "异常", |
| | | value: "2", |
| | | }, |
| | | ], |
| | | search:true, |
| | | type:"select" |
| | | type: "select", |
| | | }, |
| | | { |
| | | label: "审查明细", |
| | |
| | | }, |
| | | |
| | | handleTemplate() { |
| | | window.open( |
| | | `/api/apply/export-template` |
| | | ); |
| | | window.open(`/api/apply/export-template`); |
| | | }, |
| | | uploadAfter(res, done, loading, column) { |
| | | window.console.log(column); |
| | |
| | | append-to-body |
| | | :visible.sync="dialogBatchFormVisible" |
| | | width="1000px" |
| | | @close='closeDialog' |
| | | @close="closeDialog" |
| | | > |
| | | <avue-form |
| | | ref="formBatchApply" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { addApply, cancelApplyNotApplyId, remove } from "@/api/examapi/applyexam"; |
| | | import { |
| | | addApply, |
| | | cancelApplyNotApplyId, |
| | | remove, |
| | | } from "@/api/examapi/applyexam"; |
| | | import { getListApply,addBatchApply } from "@/api/securityGuard/securityGuard"; |
| | | import { mapState } from "vuex"; |
| | | |
| | |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: false, |
| | | border: true, //liu |
| | | index: true, |
| | | stripe: true, |
| | | viewBtn: false, |
| | |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: false, |
| | | border: true, //liu |
| | | index: true, |
| | | stripe: true, |
| | | viewBtn: true, |
| | |
| | | // } |
| | | |
| | | this.optionBatchApply.column[0].dicUrl = |
| | | "/api/blade-user/security-apply-tree?deptId=" + |
| | | this.userInfo.dept_id; |
| | | "/api/blade-user/security-apply-tree?deptId=" + this.userInfo.dept_id; |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | mounted() {}, |
| | | computed: { |
| | | ...mapState({ |
| | | userInfo: (state) => state.user.userInfo, |
| | |
| | | }) |
| | | .then(() => { |
| | | row.applyStatus = 4; |
| | | row['userId'] = row.id; |
| | | row["userId"] = row.id; |
| | | return cancelApplyNotApplyId(row); |
| | | }) |
| | | .then(() => { |
| | |
| | | window.console.log(error); |
| | | } |
| | | ); |
| | | }) |
| | | }); |
| | | }else{ |
| | | this.$confirm("确定选择人员报名?", { |
| | | confirmButtonText: "确定", |
| | |
| | | window.console.log(error); |
| | | } |
| | | ); |
| | | }) |
| | | }); |
| | | } |
| | | }, |
| | | |
| | |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: false, |
| | | border: true, |
| | | index: true, |
| | | stripe: true, |
| | | viewBtn: true, |
| | |
| | | excelBtn: false, |
| | | addBtnText:"发布", |
| | | addTitle:"发布", |
| | | saveBtnText:'发布', |
| | | saveBtnText: "发布", |
| | | menuWidth: 320, |
| | | dialogClickModal: false, |
| | | column: [ |
| | |
| | | <el-dialog |
| | | :title="this.id?'修改':'新增'" |
| | | width="60%" |
| | | modal-append-to-body='false' |
| | | append-to-body='true' |
| | | modal-append-to-body="false" |
| | | append-to-body="true" |
| | | :close-on-click-model="true" |
| | | :visible.sync="visible" |
| | | @close='closeDialog' |
| | | @close="closeDialog" |
| | | > |
| | | <el-row style="margin-left:60px;margin-bottom:40px"> |
| | | <el-radio-group v-model="choicesType"> |
| | |
| | | <el-radio label="3">实操题</el-radio> |
| | | </el-radio-group> |
| | | </el-row> |
| | | <avue-form ref="form" :option="option" v-model="form" @submit="submit" v-if="choicesType=='0'"></avue-form> |
| | | <avue-form ref="formCheckbox" :option="optionCheckbox" v-model="formCheckbox" @submit="submitCheckbox" v-if="choicesType=='1'"></avue-form> |
| | | <avue-form ref="formJudge" :option="optionJudge" v-model="formJudge" @submit="submitJudge" v-if="choicesType=='2'"></avue-form> |
| | | <avue-form ref="formFill" :option="optionFill" v-model="formFill" @submit="submitFill" v-if="choicesType=='3'"> |
| | | <avue-form |
| | | ref="form" |
| | | :option="option" |
| | | v-model="form" |
| | | @submit="submit" |
| | | v-if="choicesType == '0'" |
| | | ></avue-form> |
| | | <avue-form |
| | | ref="formCheckbox" |
| | | :option="optionCheckbox" |
| | | v-model="formCheckbox" |
| | | @submit="submitCheckbox" |
| | | v-if="choicesType == '1'" |
| | | ></avue-form> |
| | | <avue-form |
| | | ref="formJudge" |
| | | :option="optionJudge" |
| | | v-model="formJudge" |
| | | @submit="submitJudge" |
| | | v-if="choicesType == '2'" |
| | | ></avue-form> |
| | | <avue-form |
| | | ref="formFill" |
| | | :option="optionFill" |
| | | v-model="formFill" |
| | | @submit="submitFill" |
| | | v-if="choicesType == '3'" |
| | | > |
| | | <template slot="optionContent"> |
| | | <!-- <el-button type="success" icon="el-icon-plus" circle style="margin-bottom:20px" @click="addRows"></el-button> |
| | | <div v-for="(item,index) in list" :key="index"> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { mapState } from 'vuex' |
| | | import { mapState } from "vuex"; |
| | | import {saveSubjectChoicesAndOption} from "@/api/examapi/examSubjects"; |
| | | import {getSubjectAnswer} from "@/api/exam/subject"; |
| | | |
| | |
| | | arrContent:["1"], |
| | | list:[ |
| | | { |
| | | data:1 |
| | | data: 1, |
| | | }, |
| | | { |
| | | data:1 |
| | | data: 1, |
| | | }, |
| | | { |
| | | data:1 |
| | | data: 1, |
| | | }, |
| | | ], |
| | | // index:1, |
| | |
| | | choicesType:"0", |
| | | loading: true, |
| | | form:{ |
| | | score:1 |
| | | score: 1, |
| | | }, |
| | | option: { |
| | | height: "auto", |
| | |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: false, |
| | | border: true, //liu |
| | | stripe: true, |
| | | align: "center", |
| | | index: true, |
| | |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | span:24 |
| | | span: 24, |
| | | }, |
| | | { |
| | | label: "类型", |
| | |
| | | type: "checkbox", |
| | | dicData: [ |
| | | { |
| | | label: '简易题库', |
| | | value: 'A' |
| | | label: "简易题库", |
| | | value: "A", |
| | | }, |
| | | { |
| | | label: '复杂题库', |
| | | value: 'B' |
| | | label: "复杂题库", |
| | | value: "B", |
| | | }, |
| | | { |
| | | label: '模拟题库', |
| | | value: 'C' |
| | | } |
| | | label: "模拟题库", |
| | | value: "C", |
| | | }, |
| | | ], |
| | | rules: [ |
| | | { |
| | |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | span:24 |
| | | span: 24, |
| | | }, |
| | | { |
| | | label: "选项", |
| | | prop: "", |
| | | type:"text", |
| | | span:24 |
| | | span: 24, |
| | | }, |
| | | { |
| | | label: "A", |
| | |
| | | type: "radio", |
| | | dicData: [ |
| | | { |
| | | label: 'A', |
| | | value: 'A' |
| | | label: "A", |
| | | value: "A", |
| | | }, |
| | | { |
| | | label: 'B', |
| | | value: 'B' |
| | | label: "B", |
| | | value: "B", |
| | | }, |
| | | { |
| | | label: 'C', |
| | | value: 'C' |
| | | label: "C", |
| | | value: "C", |
| | | }, |
| | | { |
| | | label: 'D', |
| | | value: 'D' |
| | | } |
| | | label: "D", |
| | | value: "D", |
| | | }, |
| | | ], |
| | | rules: [ |
| | | { |
| | |
| | | label: "解析", |
| | | prop: "analysis", |
| | | span:24, |
| | | type:"textarea" |
| | | type: "textarea", |
| | | }, |
| | | { |
| | | label: "分值", |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | ], |
| | | |
| | | }, |
| | | formCheckbox:{ |
| | | score:1 |
| | | score: 1, |
| | | }, |
| | | optionCheckbox: { |
| | | height: "auto", |
| | |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: false, |
| | | border: true, //liu |
| | | stripe: true, |
| | | align: "center", |
| | | index: true, |
| | |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | span:24 |
| | | span: 24, |
| | | }, |
| | | { |
| | | label: "类型", |
| | |
| | | type: "checkbox", |
| | | dicData: [ |
| | | { |
| | | label: '简易题库', |
| | | value: 'A' |
| | | label: "简易题库", |
| | | value: "A", |
| | | }, |
| | | { |
| | | label: '复杂题库', |
| | | value: 'B' |
| | | label: "复杂题库", |
| | | value: "B", |
| | | }, |
| | | { |
| | | label: '模拟题库', |
| | | value: 'C' |
| | | } |
| | | label: "模拟题库", |
| | | value: "C", |
| | | }, |
| | | ], |
| | | rules: [ |
| | | { |
| | |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | span:24 |
| | | span: 24, |
| | | }, |
| | | { |
| | | label: "选项", |
| | | prop: "", |
| | | type:"text", |
| | | span:24 |
| | | span: 24, |
| | | }, |
| | | { |
| | | label: "A", |
| | |
| | | // type: "radio", |
| | | dicData: [ |
| | | { |
| | | label: 'A', |
| | | value: 'A' |
| | | label: "A", |
| | | value: "A", |
| | | }, |
| | | { |
| | | label: 'B', |
| | | value: 'B' |
| | | label: "B", |
| | | value: "B", |
| | | }, |
| | | { |
| | | label: 'C', |
| | | value: 'C' |
| | | label: "C", |
| | | value: "C", |
| | | }, |
| | | { |
| | | label: 'D', |
| | | value: 'D' |
| | | } |
| | | label: "D", |
| | | value: "D", |
| | | }, |
| | | ], |
| | | rules: [ |
| | | { |
| | |
| | | label: "解析", |
| | | prop: "analysis", |
| | | span:24, |
| | | type:"textarea" |
| | | type: "textarea", |
| | | }, |
| | | { |
| | | label: "分值", |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | ], |
| | | |
| | | }, |
| | | formJudge:{ |
| | | score:1 |
| | | score: 1, |
| | | }, |
| | | optionJudge: { |
| | | height: "auto", |
| | |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: false, |
| | | border: true, //liu |
| | | stripe: true, |
| | | align: "center", |
| | | index: true, |
| | |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | span:24 |
| | | span: 24, |
| | | }, |
| | | { |
| | | label: "类型", |
| | |
| | | type: "checkbox", |
| | | dicData: [ |
| | | { |
| | | label: '简易题库', |
| | | value: 'A' |
| | | label: "简易题库", |
| | | value: "A", |
| | | }, |
| | | { |
| | | label: '复杂题库', |
| | | value: 'B' |
| | | label: "复杂题库", |
| | | value: "B", |
| | | }, |
| | | { |
| | | label: '模拟题库', |
| | | value: 'C' |
| | | } |
| | | label: "模拟题库", |
| | | value: "C", |
| | | }, |
| | | ], |
| | | rules: [ |
| | | { |
| | |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | span:24 |
| | | span: 24, |
| | | }, |
| | | // { |
| | | // label: "选项", |
| | |
| | | type: "radio", |
| | | dicData: [ |
| | | { |
| | | label: '正确', |
| | | value: '正确' |
| | | label: "正确", |
| | | value: "正确", |
| | | }, |
| | | { |
| | | label: '错误', |
| | | value: '错误' |
| | | } |
| | | label: "错误", |
| | | value: "错误", |
| | | }, |
| | | ], |
| | | mock:{ |
| | | type:'dic', |
| | | type: "dic", |
| | | }, |
| | | rules: [ |
| | | { |
| | |
| | | label: "解析", |
| | | prop: "analysis", |
| | | span:24, |
| | | type:"textarea" |
| | | type: "textarea", |
| | | }, |
| | | { |
| | | label: "分值", |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | ], |
| | | |
| | | }, |
| | | formFill:{ |
| | | score:1 |
| | | score: 1, |
| | | }, |
| | | optionFill: { |
| | | height: "auto", |
| | |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: false, |
| | | border: true, //liu |
| | | stripe: true, |
| | | align: "center", |
| | | index: true, |
| | |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | span:24 |
| | | span: 24, |
| | | }, |
| | | { |
| | | label: "类型", |
| | |
| | | type: "checkbox", |
| | | dicData: [ |
| | | { |
| | | label: '简易题库', |
| | | value: 'A' |
| | | label: "简易题库", |
| | | value: "A", |
| | | }, |
| | | { |
| | | label: '复杂题库', |
| | | value: 'B' |
| | | label: "复杂题库", |
| | | value: "B", |
| | | }, |
| | | { |
| | | label: '模拟题库', |
| | | value: 'C' |
| | | } |
| | | label: "模拟题库", |
| | | value: "C", |
| | | }, |
| | | ], |
| | | rules: [ |
| | | { |
| | |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | span:24 |
| | | span: 24, |
| | | }, |
| | | { |
| | | label: "选项", |
| | | prop: "", |
| | | type:"text", |
| | | span:24 |
| | | span: 24, |
| | | }, |
| | | { |
| | | label: "1", |
| | |
| | | label: "3", |
| | | prop: "optionContent3", |
| | | span:24, |
| | | placeholder:"请输入内容" |
| | | placeholder: "请输入内容", |
| | | }, |
| | | { |
| | | label: "4", |
| | | prop: "optionContent4", |
| | | span:24, |
| | | placeholder:"请输入内容" |
| | | placeholder: "请输入内容", |
| | | }, |
| | | { |
| | | label: "5", |
| | | prop: "optionContent5", |
| | | span:24, |
| | | placeholder:"请输入内容" |
| | | placeholder: "请输入内容", |
| | | }, |
| | | { |
| | | label: "答案", |
| | |
| | | label: "解析", |
| | | prop: "analysis", |
| | | span:24, |
| | | type:"textarea" |
| | | type: "textarea", |
| | | }, |
| | | { |
| | | label: "分值", |
| | |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | } |
| | | |
| | | }, |
| | | ], |
| | | |
| | | }, |
| | | data: [], |
| | | } |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapState({ |
| | | userInfo: state => state.user.userInfo |
| | | }) |
| | | userInfo: (state) => state.user.userInfo, |
| | | }), |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | mounted() {}, |
| | | methods: { |
| | | //初始化 |
| | | inits(id) { |
| | | this.id = id || 0; |
| | | this.visible = true; |
| | | this.list = [{data:1}] |
| | | this.list = [{ data: 1 }]; |
| | | if(this.id){ |
| | | //查询题目信息 |
| | | this.getSubjectInfo(id); |
| | |
| | | getSubjectInfo(id){ |
| | | var that = this; |
| | | var param = { |
| | | id:id |
| | | } |
| | | getSubjectAnswer((param)).then(res => { |
| | | id: id, |
| | | }; |
| | | getSubjectAnswer(param).then((res) => { |
| | | var data = res.data.data; |
| | | that.choicesType = data.choicesType.toString(); |
| | | //单选题 |
| | |
| | | that.optionContentBId = data.examSubjectOptions[1].id; |
| | | that.optionContentCId = data.examSubjectOptions[2].id; |
| | | that.optionContentDId = data.examSubjectOptions[3].id; |
| | | that.formCheckbox.optionContentA = data.examSubjectOptions[0].optionContent; |
| | | that.formCheckbox.optionContentB = data.examSubjectOptions[1].optionContent; |
| | | that.formCheckbox.optionContentC = data.examSubjectOptions[2].optionContent; |
| | | that.formCheckbox.optionContentD = data.examSubjectOptions[3].optionContent; |
| | | that.formCheckbox.optionContentA = |
| | | data.examSubjectOptions[0].optionContent; |
| | | that.formCheckbox.optionContentB = |
| | | data.examSubjectOptions[1].optionContent; |
| | | that.formCheckbox.optionContentC = |
| | | data.examSubjectOptions[2].optionContent; |
| | | that.formCheckbox.optionContentD = |
| | | data.examSubjectOptions[3].optionContent; |
| | | } |
| | | //判断题 |
| | | if(data.choicesType==2){ |
| | |
| | | //实操题 |
| | | if(data.choicesType==3){ |
| | | that.formFill = data; |
| | | that.formFill.optionContent1 = data.examSubjectOptions[0].optionContent; |
| | | that.formFill.optionContent2 = data.examSubjectOptions[1].optionContent; |
| | | that.formFill.optionContent3 = data.examSubjectOptions[2].optionContent; |
| | | that.formFill.optionContent4 = data.examSubjectOptions[3].optionContent; |
| | | that.formFill.optionContent5 = data.examSubjectOptions[4].optionContent; |
| | | that.formFill.optionContent1 = |
| | | data.examSubjectOptions[0].optionContent; |
| | | that.formFill.optionContent2 = |
| | | data.examSubjectOptions[1].optionContent; |
| | | that.formFill.optionContent3 = |
| | | data.examSubjectOptions[2].optionContent; |
| | | that.formFill.optionContent4 = |
| | | data.examSubjectOptions[3].optionContent; |
| | | that.formFill.optionContent5 = |
| | | data.examSubjectOptions[4].optionContent; |
| | | } |
| | | }); |
| | | }, |
| | |
| | | } |
| | | this.index++; |
| | | this.list.push({ |
| | | data:this.index |
| | | }) |
| | | this.inputs[`input${this.index+1}`] = ''; |
| | | console.log(this.inputs) |
| | | data: this.index, |
| | | }); |
| | | this.inputs[`input${this.index + 1}`] = ""; |
| | | console.log(this.inputs); |
| | | console.log(this.list,111); |
| | | }, |
| | | //减一行 |
| | |
| | | //单选题提交(新增)数据 |
| | | submit(row, done, loading) { |
| | | var that = this; |
| | | row['choicesType'] = this.choicesType; |
| | | row['creator'] = this.userInfo.user_name; |
| | | row["choicesType"] = this.choicesType; |
| | | row["creator"] = this.userInfo.user_name; |
| | | row.tktype = row.tktype.join(","); |
| | | //选项信息 |
| | | const examSubjectOptions = [ |
| | |
| | | optionName:"D", |
| | | optionContent:row.optionContentD, |
| | | creator:this.userInfo.user_name, |
| | | } |
| | | ] |
| | | row['examSubjectOptions'] = examSubjectOptions; |
| | | }, |
| | | ]; |
| | | row["examSubjectOptions"] = examSubjectOptions; |
| | | saveSubjectChoicesAndOption(row).then( |
| | | () => { |
| | | this.$message({ |
| | |
| | | //多选题提交(新增)数据 |
| | | submitCheckbox(row, done, loading) { |
| | | var that = this; |
| | | row['choicesType'] = this.choicesType; |
| | | row['creator'] = this.userInfo.user_name; |
| | | row["choicesType"] = this.choicesType; |
| | | row["creator"] = this.userInfo.user_name; |
| | | row.tktype = row.tktype.join(","); |
| | | row.answer = row.answer.join(","); |
| | | //选项信息 |
| | |
| | | optionName:"D", |
| | | optionContent:row.optionContentD, |
| | | creator:this.userInfo.user_name, |
| | | } |
| | | ] |
| | | row['examSubjectOptions'] = examSubjectOptions; |
| | | }, |
| | | ]; |
| | | row["examSubjectOptions"] = examSubjectOptions; |
| | | saveSubjectChoicesAndOption(row).then( |
| | | () => { |
| | | this.$message({ |
| | |
| | | //判断题提交(新增)数据 |
| | | submitJudge(row, done, loading) { |
| | | var that = this; |
| | | row['choicesType'] = this.choicesType; |
| | | row['creator'] = this.userInfo.user_name; |
| | | row["choicesType"] = this.choicesType; |
| | | row["creator"] = this.userInfo.user_name; |
| | | row.tktype = row.tktype.join(","); |
| | | saveSubjectChoicesAndOption(row).then( |
| | | () => { |
| | |
| | | //填空排序题提交(新增)数据 |
| | | submitFill(row, done, loading) { |
| | | var that = this; |
| | | row['choicesType'] = this.choicesType; |
| | | row['creator'] = this.userInfo.user_name; |
| | | row["choicesType"] = this.choicesType; |
| | | row["creator"] = this.userInfo.user_name; |
| | | row.tktype = row.tktype.join(","); |
| | | //选项信息 |
| | | var examSubjectOptions = []; |
| | |
| | | optionName:"1", |
| | | optionContent:row.optionContent1, |
| | | creator:this.userInfo.user_name, |
| | | }) |
| | | }); |
| | | } |
| | | if(row.optionContent2){ |
| | | examSubjectOptions.push({ |
| | | optionName:"2", |
| | | optionContent:row.optionContent2, |
| | | creator:this.userInfo.user_name, |
| | | }) |
| | | }); |
| | | } |
| | | if(row.optionContent3){ |
| | | examSubjectOptions.push({ |
| | | optionName:"3", |
| | | optionContent:row.optionContent3, |
| | | creator:this.userInfo.user_name, |
| | | }) |
| | | }); |
| | | } |
| | | if(row.optionContent4){ |
| | | examSubjectOptions.push({ |
| | | optionName:"4", |
| | | optionContent:row.optionContent4, |
| | | creator:this.userInfo.user_name, |
| | | }) |
| | | }); |
| | | } |
| | | if(row.optionContent5){ |
| | | examSubjectOptions.push({ |
| | | optionName:"5", |
| | | optionContent:row.optionContent5, |
| | | creator:this.userInfo.user_name, |
| | | }) |
| | | }); |
| | | } |
| | | row['examSubjectOptions'] = examSubjectOptions; |
| | | row["examSubjectOptions"] = examSubjectOptions; |
| | | saveSubjectChoicesAndOption(row).then( |
| | | () => { |
| | | this.$message({ |
| | |
| | | if(this.choicesType==3){ |
| | | this.$refs.formFill.resetFields(); |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | |
| | | .optionContent-suffix{ |
| | | margin-top: 5px; |
| | | } |
| | |
| | | margin-left: -20px; |
| | | } |
| | | |
| | | |
| | | .optionContent-suffix .optionContent-input{ |
| | | width: 90%; |
| | | margin-left: 10px; |
| | | } |
| | | |
| | | |
| | | .optionContent-suffix .optionContent-botton{ |
| | | margin-left: 10px; |
| | | } |
| | | |
| | | </style> |
| | |
| | | height: "auto", |
| | | widtd: "auto", |
| | | calcHeight: 54, |
| | | border: false, |
| | | border: true, //liu |
| | | stripe: true, |
| | | tip: false, |
| | | index: true, |
| | |
| | | height: "auto", |
| | | widtd: "auto", |
| | | calcHeight: 54, |
| | | border: false, |
| | | border: true, //liu |
| | | stripe: true, |
| | | tip: false, |
| | | index: true, |
| | |
| | | <template> |
| | | <basic-container class="hasButTwo"> |
| | | <avue-crud :option="option" |
| | | <avue-crud |
| | | :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page.sync="page" |
| | |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | @on-load="onLoad" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button type="primary" |
| | | <el-button |
| | | type="primary" |
| | | size="small" |
| | | plain |
| | | v-if="permission.attach_upload" |
| | | icon="el-icon-upload2" |
| | | @click="handleUpload">上 传 |
| | | @click="handleUpload" |
| | | >上 传 |
| | | </el-button> |
| | | <el-button type="danger" |
| | | <el-button |
| | | type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="permission.attach_delete" |
| | | @click="handleDelete">删 除 |
| | | @click="handleDelete" |
| | | >删 除 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="scope" |
| | | slot="menu"> |
| | | <el-button type="text" |
| | | <template slot-scope="scope" slot="menu"> |
| | | <el-button |
| | | type="text" |
| | | icon="el-icon-download" |
| | | size="small" |
| | | v-if="permission.attach_download" |
| | | @click="handleDownload(scope.row)">下载222 |
| | | @click="handleDownload(scope.row)" |
| | | >下载222 |
| | | </el-button> |
| | | <el-button type="text" |
| | | <el-button |
| | | type="text" |
| | | icon="el-icon-picture-outline-round" |
| | | size="small" |
| | | v-show="!fileFormat(scope.row)" |
| | | @click="seeImages(scope.row)">预览 |
| | | @click="seeImages(scope.row)" |
| | | >预览 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{ row }" |
| | | slot="attachSize"> |
| | | <template slot-scope="{ row }" slot="attachSize"> |
| | | <el-tag>{{ `${row.attachSize} KB` }}</el-tag> |
| | | </template> |
| | | </avue-crud> |
| | | <el-dialog title="附件管理" |
| | | <el-dialog |
| | | title="附件管理" |
| | | append-to-body |
| | | :visible.sync="attachBox" |
| | | width="555px"> |
| | | <avue-form ref="form" |
| | | width="555px" |
| | | > |
| | | <avue-form |
| | | ref="form" |
| | | :option="attachOption" |
| | | v-model="attachForm" |
| | | :upload-after="uploadAfter"> |
| | | :upload-after="uploadAfter" |
| | | > |
| | | </avue-form> |
| | | </el-dialog> |
| | | |
| | | <el-dialog title="预览" |
| | | <el-dialog |
| | | title="预览" |
| | | append-to-body |
| | | :visible.sync="imgSee" |
| | | class="see-img-box"> |
| | | |
| | | <div class="img" |
| | | :style="{background: imgUrl}"> |
| | | |
| | | </div> |
| | | |
| | | class="see-img-box" |
| | | > |
| | | <div class="img" :style="{ background: imgUrl }"></div> |
| | | </el-dialog> |
| | | |
| | | </basic-container> |
| | | </template> |
| | | |
| | |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: false, |
| | | border: true, //liu |
| | | index: true, |
| | | stripe: true, |
| | | viewBtn: true, |
| | |
| | | ], |
| | | }, |
| | | imgSee: false, |
| | | imgUrl: "" |
| | | imgUrl: "", |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | var index = row.link.lastIndexOf("."); |
| | | var ext = row.link.substr(index + 1); |
| | | |
| | | return [ |
| | | 'png', 'jpg', 'jpeg', 'bmp', 'gif', 'webp', 'psd', 'svg', 'tiff']. |
| | | indexOf(ext.toLowerCase()) == -1; |
| | | } |
| | | return ( |
| | | [ |
| | | "png", |
| | | "jpg", |
| | | "jpeg", |
| | | "bmp", |
| | | "gif", |
| | | "webp", |
| | | "psd", |
| | | "svg", |
| | | "tiff", |
| | | ].indexOf(ext.toLowerCase()) == -1 |
| | | ); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: false, |
| | | border: true, //liu |
| | | index: true, |
| | | stripe: true, |
| | | viewBtn: true, |
| | |
| | | <template> |
| | | <basic-container class="hasButTwo"> |
| | | <avue-crud :option="option" |
| | | <avue-crud |
| | | :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page.sync="page" |
| | |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | @on-load="onLoad" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button type="primary" |
| | | <el-button |
| | | type="primary" |
| | | size="small" |
| | | plain |
| | | v-if="permission.attach_upload" |
| | | icon="el-icon-upload2" |
| | | @click="handleUpload">上 传 |
| | | @click="handleUpload" |
| | | >上 传 |
| | | </el-button> |
| | | <el-button type="danger" |
| | | <el-button |
| | | type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="permission.attach_delete" |
| | | @click="handleDelete">删 除 |
| | | @click="handleDelete" |
| | | >删 除 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="scope" |
| | | slot="menu"> |
| | | <el-button type="text" |
| | | <template slot-scope="scope" slot="menu"> |
| | | <el-button |
| | | type="text" |
| | | icon="el-icon-download" |
| | | size="small" |
| | | v-if="permission.attach_download" |
| | | @click="handleDownload(scope.row)">下载 |
| | | @click="handleDownload(scope.row)" |
| | | >下载 |
| | | </el-button> |
| | | <el-button type="text" |
| | | <el-button |
| | | type="text" |
| | | icon="el-icon-picture-outline-round" |
| | | size="small" |
| | | v-show="!fileFormat(scope.row)" |
| | | @click="seeImages(scope.row)">预览 |
| | | @click="seeImages(scope.row)" |
| | | >预览 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{ row }" |
| | | slot="attachSize"> |
| | | <template slot-scope="{ row }" slot="attachSize"> |
| | | <el-tag>{{ `${row.attachSize} KB` }}</el-tag> |
| | | </template> |
| | | </avue-crud> |
| | | <el-dialog title="附件管理" |
| | | <el-dialog |
| | | title="附件管理" |
| | | append-to-body |
| | | :visible.sync="attachBox" |
| | | width="555px"> |
| | | <avue-form ref="form" |
| | | width="555px" |
| | | > |
| | | <avue-form |
| | | ref="form" |
| | | :option="attachOption" |
| | | v-model="attachForm" |
| | | :upload-after="uploadAfter"> |
| | | :upload-after="uploadAfter" |
| | | > |
| | | </avue-form> |
| | | </el-dialog> |
| | | |
| | | <el-dialog title="预览" |
| | | <el-dialog |
| | | title="预览" |
| | | append-to-body |
| | | :visible.sync="imgSee" |
| | | class="see-img-box"> |
| | | |
| | | <div class="img" |
| | | :style="{background: imgUrl}"> |
| | | |
| | | </div> |
| | | |
| | | class="see-img-box" |
| | | > |
| | | <div class="img" :style="{ background: imgUrl }"></div> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </template> |
| | |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: false, |
| | | border: true, //liu |
| | | index: true, |
| | | // align: center, |
| | | stripe: true, |
| | |
| | | "&deptid=" + |
| | | deptid + |
| | | "¬iceId=" + |
| | | noticeId |
| | | |
| | | noticeId, |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | imgSee: false, |
| | | imgUrl: "" |
| | | imgUrl: "", |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | var index = row.link.lastIndexOf("."); |
| | | var ext = row.link.substr(index + 1); |
| | | |
| | | return [ |
| | | 'png', 'jpg', 'jpeg', 'bmp', 'gif', 'webp', 'psd', 'svg', 'tiff']. |
| | | indexOf(ext.toLowerCase()) == -1; |
| | | } |
| | | return ( |
| | | [ |
| | | "png", |
| | | "jpg", |
| | | "jpeg", |
| | | "bmp", |
| | | "gif", |
| | | "webp", |
| | | "psd", |
| | | "svg", |
| | | "tiff", |
| | | ].indexOf(ext.toLowerCase()) == -1 |
| | | ); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | import website from "@/config/website"; |
| | | import { getToken } from "@/util/auth"; |
| | | import { securityFormPageColumn } from "./data"; |
| | | import { mapState } from 'vuex'; |
| | | import { mapState } from "vuex"; |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: false, |
| | | border: true, //liu |
| | | stripe: true, |
| | | align: "center", |
| | | index: true, |
| | |
| | | { |
| | | prop: "UserPractitionersInfo", |
| | | type: "dynamic", |
| | | border: false, |
| | | border: true, //liu |
| | | span: 24, |
| | | children: { |
| | | align: "left", |
| | |
| | | return ids.join(","); |
| | | }, |
| | | ...mapState({ |
| | | userInfo: state => state.user.userInfo |
| | | }) |
| | | userInfo: (state) => state.user.userInfo, |
| | | }), |
| | | }, |
| | | mounted() { |
| | | // this.option.column[0].hide = true |
| | |
| | | |
| | | //获取当前登录人员的角色信息 |
| | | var roleIds = this.userInfo.role_id.split(","); |
| | | roleIds.forEach(roleId =>{ |
| | | roleIds.forEach((roleId) => { |
| | | getRoleDetail(roleId).then((res) => { |
| | | var roleAlias = res.data.data.roleAlias; |
| | | if(roleAlias=="保安公司管理员" || roleAlias=="保安" || roleAlias=="未持证保安"){ |
| | | if ( |
| | | roleAlias == "保安公司管理员" || |
| | | roleAlias == "保安" || |
| | | roleAlias == "未持证保安" |
| | | ) { |
| | | const column = this.findObject(this.option.column, "deptId"); |
| | | column.search = false; |
| | | |
| | | } |
| | | }) |
| | | }) |
| | | }); |
| | | }); |
| | | }, |
| | | methods: { |
| | | handleImport1() { |
| | |
| | | registered:row.registered, |
| | | rtime: row.rtime, |
| | | securitynumber:row.securitynumber, |
| | | sex: row.sex |
| | | } |
| | | sex: row.sex, |
| | | }; |
| | | const userMap = { |
| | | user: user, |
| | | userPractitionersInfo: userPractitionersList, |
| | |
| | | |
| | | //获取当前登录人员的角色信息 |
| | | var roleIds = this.userInfo.role_id.split(","); |
| | | roleIds.forEach(roleId =>{ |
| | | roleIds.forEach((roleId) => { |
| | | getRoleDetail(roleId).then((res) => { |
| | | var roleAlias = res.data.data.roleAlias; |
| | | if(roleAlias=="保安公司管理员"){ |
| | | values["deptId"] = this.userInfo.dept_id; |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | }); |
| | | }); |
| | | |
| | | if (this.userInfo.role_id == "1414840172333842433") { |
| | | console.log("是公安add jurisdiction"); |
| | |
| | | height: "auto", |
| | | widtd: "auto", |
| | | calcHeight: 54, |
| | | border: false, |
| | | border: true, //liu |
| | | stripe: true, |
| | | tip: false, |
| | | index: true, |
| | |
| | | height: "auto", |
| | | widtd: "auto", |
| | | calcHeight: 54, |
| | | border: false, |
| | | border: true, //liu |
| | | stripe: true, |
| | | tip: false, |
| | | index: true, |
| | |
| | | <el-dialog |
| | | :title="!form1.id?'新增':'修改'" |
| | | width="60%" |
| | | modal-append-to-body='false' |
| | | append-to-body='true' |
| | | modal-append-to-body="false" |
| | | append-to-body="true" |
| | | :close-on-click-model="true" |
| | | :visible.sync="visible" |
| | | > |
| | |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: false, |
| | | border: true, //liu |
| | | stripe: true, |
| | | index: true, |
| | | selection: true, |
| | |
| | | label: "所属组织机构", |
| | | prop: "deptId", |
| | | type: "tree", |
| | | dicUrl: "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697", |
| | | dicUrl: |
| | | "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697", |
| | | props: { |
| | | label: "title", |
| | | value: "id", |
| | |
| | | required: true, |
| | | message: "请选择组织机构", |
| | | trigger: "blur", |
| | | } |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | |
| | | required: true, |
| | | message: "请输入登录账号", |
| | | trigger: "blur", |
| | | } |
| | | }, |
| | | ], |
| | | // disabled: true, |
| | | }, |
| | |
| | | { |
| | | label: "用户昵称", |
| | | prop: "name", |
| | | }, { |
| | | }, |
| | | { |
| | | label: "所属行政区", |
| | | prop: "jurisdiction", |
| | | // multiple: true, |
| | |
| | | trigger: "click", |
| | | }, |
| | | ], |
| | | },{ |
| | | }, |
| | | { |
| | | label: "所属角色", |
| | | prop: "roleId", |
| | | multiple: true, |
| | |
| | | trigger: "click", |
| | | }, |
| | | ], |
| | | },{ |
| | | }, |
| | | { |
| | | label: "所属岗位", |
| | | prop: "postId", |
| | | type: "tree", |
| | |
| | | value: "dictKey", |
| | | }, |
| | | dataType: "number", |
| | | slot: true |
| | | slot: true, |
| | | }, |
| | | { |
| | | label: "政治面貌", |
| | |
| | | { |
| | | prop: "UserPractitionersInfo", |
| | | type: "dynamic", |
| | | border: false, |
| | | border: true, //liu |
| | | span: 24, |
| | | children: { |
| | | align: "left", |
| | |
| | | }, |
| | | datachild: [], |
| | | }; |
| | | |
| | | }, |
| | | watch: { |
| | | "form.tenantId"() { |
| | |
| | | margin-left: 0px !important; |
| | | } */ |
| | | |
| | | |
| | | .addorupdatetitle{ |
| | | position: absolute; |
| | | left: 10px; |
| | |
| | | height: 10px; |
| | | font-size: 10px; |
| | | cursor: pointer; |
| | | |
| | | } |
| | | .xx { |
| | | position: absolute; |
| | |
| | | label: "企业名称", |
| | | prop: "enterprisename", |
| | | search: true, |
| | | width: 260, |
| | | searchSpan: 4, |
| | | labelWidth: 160, |
| | | // width: 130, |
| | |
| | | label: "企业类型", |
| | | prop: "stats", |
| | | type: "tree", |
| | | hide: true, |
| | | labelWidth: 160, |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=stats", |
| | | props: { |
| | |
| | | searchLabelWidth: 100 |
| | | }, |
| | | { |
| | | label: "代表人电话", |
| | | label: "法人电话", |
| | | labelWidth: 160, |
| | | prop: "representativecell", |
| | | width: 98, |
| | |
| | | { |
| | | label: "注册资本", |
| | | prop: "registeredcapital", |
| | | hide: true, |
| | | labelWidth: 160, |
| | | // search: true, |
| | | width: 80, |
| | |
| | | overHidden: true |
| | | }, |
| | | { |
| | | label: "所属地区", |
| | | label: "所属辖区", |
| | | prop: "region", |
| | | labelWidth: 160, |
| | | // width: 110, |
| New file |
| | |
| | | <template> |
| | | <basic-container> |
| | | <div class="securityUnit"> |
| | | <avue-crud |
| | | :option="option" |
| | | :data="data" |
| | | :page.sync="page" |
| | | ref="crudrec" |
| | | @on-load="onLoad" |
| | | :table-loading="loading" |
| | | @row-save="rowSave" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @row-update="rowUpdate" |
| | | @row-del="rowDel" |
| | | @selection-change="selectionChange" |
| | | @refresh-change="refreshChange" |
| | | @row-click="rowClick" |
| | | > |
| | | <template slot-scope="{ type, size, row }" slot="menu"> |
| | | <el-button |
| | | :size="size" |
| | | :type="type" |
| | | @click="handleUploadPage(row)" |
| | | icon="el-icon-circle-check" |
| | | >附件上传 |
| | | </el-button> |
| | | </template> |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-plus" |
| | | size="small" |
| | | plain |
| | | @click.stop="rowSave" |
| | | >新增</el-button |
| | | > |
| | | <el-button |
| | | type="danger" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-delete" |
| | | @click="handleDelete" |
| | | >删 除 |
| | | </el-button> |
| | | <el-button |
| | | type="success" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-upload2" |
| | | @click="handleImport1" |
| | | >批量导入 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <div class="lod" v-show="forms != -1"> |
| | | <div class="lod-in"> |
| | | <!-- <el-col class="trees" v-if="forms == 0"> |
| | | <div class="box"> |
| | | <el-scrollbar> |
| | | <basic-container> |
| | | <avue-tree |
| | | :option="treeOption" |
| | | :data="treeData" |
| | | @node-click="nodeClick" |
| | | /> |
| | | </basic-container> |
| | | </el-scrollbar> |
| | | </div> |
| | | </el-col> --> |
| | | <avue-form |
| | | ref="form" |
| | | v-model="obj0" |
| | | :option="option0" |
| | | v-if="forms == 0" |
| | | > |
| | | <template slot="menuForm"> |
| | | <el-button type="primary" @click="tip0">下一页</el-button> |
| | | <el-button type="info" @click="tipover">取消</el-button> |
| | | </template> |
| | | </avue-form> |
| | | <avue-form |
| | | ref="form1" |
| | | v-model="obj1" |
| | | :option="option1" |
| | | v-else-if="forms == 1" |
| | | > |
| | | <template slot="menuForm"> |
| | | <el-button type="primary" @click="tip1up1">上一页</el-button> |
| | | <el-button type="primary" @click="tip1">下一页</el-button> |
| | | <el-button type="info" @click="tipover">取消</el-button> |
| | | </template> |
| | | </avue-form> |
| | | <avue-form |
| | | ref="form2" |
| | | v-model="obj2" |
| | | :option="option2" |
| | | v-else-if="forms == 2" |
| | | > |
| | | <template slot="menuForm"> |
| | | <el-button type="primary" @click="tip2up2">上一页</el-button> |
| | | <el-button type="primary" @click="tip2">提交</el-button> |
| | | <el-button type="info" @click="tipover">取消</el-button> |
| | | </template> |
| | | </avue-form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-dialog |
| | | title="保安单位导入" |
| | | append-to-body |
| | | :visible.sync="excelBox1" |
| | | width="555px" |
| | | > |
| | | <avue-form |
| | | :option="excelOption1" |
| | | v-model="excelForm1" |
| | | :upload-after="uploadAfter1" |
| | | > |
| | | <template slot="excelTemplate"> |
| | | <el-button type="primary" @click="handleTemplate1"> |
| | | 点击下载<i class="el-icon-download el-icon--right"></i> |
| | | </el-button> |
| | | </template> |
| | | </avue-form> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { column, column0, column1, column2 } from "./data"; |
| | | import { |
| | | getdata, |
| | | adddata, |
| | | update, |
| | | remove, |
| | | adddata1, |
| | | adddata2, |
| | | getDeptLazyTree, |
| | | } from "@/api/securityUnit/securityUnit"; |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | data() { |
| | | var w = 160, |
| | | s = 12; |
| | | return { |
| | | excelBox1: false, |
| | | excelForm1: {}, |
| | | excelOption1: { |
| | | submitBtn: false, |
| | | emptyBtn: false, |
| | | column: [ |
| | | { |
| | | label: "文件上传", |
| | | prop: "excelFile", |
| | | type: "upload", |
| | | drag: true, |
| | | loadText: "文件上传中,请稍等", |
| | | span: 24, |
| | | propsHttp: { |
| | | res: "data", |
| | | }, |
| | | tip: "请上传 .xls,.xlsx 标准格式文件", |
| | | action: "/api/information/import-informaton", |
| | | }, |
| | | { |
| | | label: "模板下载", |
| | | prop: "excelTemplate", |
| | | formslot: true, |
| | | span: 24, |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | loading: true, //保安单位基本信息 |
| | | selectionList: [], |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | }, |
| | | |
| | | treeData: [], |
| | | treeOption: { |
| | | title: "我是标题", |
| | | filterText: "搜索关键字自定义", |
| | | defaultExpandAll: true, |
| | | addBtn: false, |
| | | menu: false, |
| | | size: "small", |
| | | formOption: { |
| | | labelWidth: 100, |
| | | column: [ |
| | | { |
| | | label: "自定义项", |
| | | prop: "label", |
| | | }, |
| | | ], |
| | | }, |
| | | props: { |
| | | labelText: "标题", |
| | | label: "title", |
| | | value: "id", |
| | | children: "children", |
| | | }, |
| | | }, |
| | | // treeOption: { |
| | | // nodeKey: "id", |
| | | // // lazy: true, |
| | | // // treeLoad: function (node, resolve) { |
| | | // // // const parentId = node.level === 0 ? 0 : node.data.id; |
| | | // // getDeptLazyTree().then((res) => { |
| | | // // resolve( |
| | | // // res.data.data.map((item) => { |
| | | // // console.log({ |
| | | // // ...item, |
| | | // // leaf: !item.hasChildren, |
| | | // // }); |
| | | // // return { |
| | | // // ...item, |
| | | // // leaf: !item.hasChildren, |
| | | // // }; |
| | | // // }) |
| | | // // ); |
| | | // // }); |
| | | // // }, |
| | | // addBtn: false, |
| | | // menu: false, |
| | | // size: "small", |
| | | // props: { |
| | | // labelText: "标题", |
| | | // label: "title", |
| | | // value: "value", |
| | | // children: "children", |
| | | // }, |
| | | // }, |
| | | |
| | | obj0: { |
| | | title0: "保安单位基本信息", |
| | | }, |
| | | option0: { |
| | | emptyBtn: false, |
| | | submitBtn: false, |
| | | gutter: 30, |
| | | column: column0, |
| | | }, |
| | | obj1: { |
| | | title1: "保安单位出资人员", |
| | | }, |
| | | option1: { |
| | | emptyBtn: false, |
| | | submitBtn: false, |
| | | gutter: 30, |
| | | column: column1, |
| | | }, |
| | | obj2: { |
| | | title2: "主要管理人员信息", |
| | | }, |
| | | option2: { |
| | | emptyBtn: false, |
| | | submitBtn: false, |
| | | gutter: 30, |
| | | column: column2, |
| | | }, |
| | | |
| | | forms: -1, |
| | | data0: {}, |
| | | data1: {}, |
| | | data2: {}, |
| | | b0: {}, |
| | | b1: {}, |
| | | b2: {}, |
| | | noshehuibianma: 0, |
| | | nobumen: 0, |
| | | |
| | | query: {}, |
| | | data: [], |
| | | option: { |
| | | index: true, |
| | | addBtn: false, |
| | | // card: true, |
| | | tip: false, |
| | | searchSize: "mini", |
| | | searchMenuSpan: 6, |
| | | height: 583, |
| | | menuWidth: 220, |
| | | align: "center", |
| | | selection: true, |
| | | column: column, |
| | | }, |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userInfo"]), |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.creditcode); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | ids1() { |
| | | let ids1 = []; |
| | | this.selectionList1.forEach((ele) => { |
| | | ids1.push(ele.id); |
| | | }); |
| | | return ids1.join(","); |
| | | }, |
| | | ids2() { |
| | | let ids2 = []; |
| | | this.selectionList2.forEach((ele) => { |
| | | ids2.push(ele.id); |
| | | }); |
| | | return ids2.join(","); |
| | | }, |
| | | haveID() { |
| | | return this.obj0.creditcode; |
| | | }, |
| | | }, |
| | | methods: { |
| | | handleImport1() { |
| | | this.excelBox1 = true; |
| | | }, |
| | | uploadAfter1(res, done, loading, column) { |
| | | window.console.log(column); |
| | | this.excelBox1 = false; |
| | | // this.refreshChange(); |
| | | done(); |
| | | }, |
| | | handleTemplate1() { |
| | | window.open(`/api/examSubjectChoices/export-template`); |
| | | }, |
| | | |
| | | // handleChangeTABS(column) { |
| | | // this.typeTABS = column; |
| | | // // this.$message.success(JSON.stringify(column)); |
| | | // if (column.prop == "tab1") { |
| | | // this.loading1 = false; |
| | | // this.loading2 = false; |
| | | // this.onLoad(this.page); |
| | | // } else if (column.prop == "tab2") { |
| | | // this.loading = false; |
| | | // this.loading2 = false; |
| | | // this.onLoad1(this.page1); //第二个表格不会自动执行 |
| | | // } else if (column.prop == "tab3") { |
| | | // this.loading1 = false; |
| | | // this.loading = false; |
| | | // this.onLoad2(this.page2); //第二个表格不会自动执行 |
| | | // } |
| | | // }, |
| | | //保安单位基本信息 |
| | | sizeChange(val) { |
| | | this.page1.currentPage = 1; |
| | | this.page1.pageSize = val; |
| | | // this.getData(); |
| | | this.onLoad(this.page, this.query); |
| | | // this.$message.success("行数" + val); |
| | | }, |
| | | currentChange(val) { |
| | | this.page1.currentPage = val; |
| | | // this.getData(); |
| | | this.onLoad(this.page, this.query); |
| | | // this.$message.success("页码" + val); |
| | | }, |
| | | rowSave(form, done, loading) { |
| | | // console.log("save1"); |
| | | this.forms = 0; |
| | | var that = this; |
| | | //先获取部门接口 |
| | | getDeptLazyTree().then((res) => { |
| | | var d = res.data.data; |
| | | that.treeData = d; |
| | | // console.log(d); |
| | | }); |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | delete row.tenantid; |
| | | delete row.regstsat; |
| | | console.log(row, 0); |
| | | 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(() => { |
| | | console.log(row); |
| | | return remove(row.creditcode, row.departmentid); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | }); |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据"); |
| | | return; |
| | | } |
| | | this.$confirm("确定批量将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | console.log(this.ids); |
| | | // return remove(this.ids); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | this.$refs.crudrec.toggleSelection(); |
| | | }); |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | rowClick(row) { |
| | | // console.log(row); |
| | | // row.identificationnumber; //统一社会信用代 码 |
| | | window.localStorage.setItem("danweidata", JSON.stringify(row)); |
| | | this.$router.push({ |
| | | path: "/securityUnitChild", |
| | | // redirect: { name: "foo" }, |
| | | query: { rowsecurity: "fromSecurity" }, |
| | | // params: { row: row.identificationnumber }, |
| | | }); |
| | | }, |
| | | //跳转到附近列表页面 |
| | | handleUploadPage(row) { |
| | | this.$router.push({ |
| | | path: `/resource/attachCopy`, |
| | | query: { |
| | | deptId: row.departmentid, |
| | | enterprisename: row.enterprisename, |
| | | }, |
| | | }); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | if (this.userInfo.role_id == "1414840172333842433") { |
| | | console.log("是公安add jurisdiction"); |
| | | params["jurisdiction"] = this.userInfo.jurisdiction; |
| | | } |
| | | params["stats"] = "2"; |
| | | this.loading = true; |
| | | getdata( |
| | | 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; |
| | | window.localStorage.setItem("danweidataS", JSON.stringify(this.data)); |
| | | console.log(this.data); |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // nodeClick(data) {//分局 不在这添加 |
| | | // // this.treeDeptId = data.id; |
| | | // // this.page.currentPage = 1; |
| | | // // this.onLoad(this.page); |
| | | // // this.$message.success(JSON.stringify(data)); |
| | | // this.obj0["departmentid"] = data.title; |
| | | // this.obj1["departmentid"] = data.title; |
| | | // this.obj2["departmentid"] = data.title; |
| | | // this.obj0["useid"] = data.id; |
| | | // this.obj1["useid"] = data.id; |
| | | // this.obj2["useid"] = data.id; |
| | | // this.nobumen = 1; |
| | | // }, |
| | | tip0() { |
| | | if (this.panduanmeiyouziduan()) { |
| | | return; |
| | | } |
| | | var d = {}; |
| | | for (var k in this.obj0) { |
| | | for (var i in column0) { |
| | | if (k == column0[i].prop && k != "title0") { |
| | | d[k] = this.obj0[k]; |
| | | } |
| | | } |
| | | } |
| | | console.log(d); |
| | | for (var k in d) { |
| | | if (d[k] == "" || d[k] == undefined) { |
| | | console.log(k); |
| | | this.$message.warning("请检查表单是否填写完整!"); |
| | | return; |
| | | } |
| | | } |
| | | console.log(d, 0); |
| | | this.data0 = d; |
| | | this.forms = 1; |
| | | }, |
| | | tip1() { |
| | | if (this.panduanmeiyouziduan()) { |
| | | return; |
| | | } |
| | | var d = {}; |
| | | for (var k in this.obj1) { |
| | | for (var i in column1) { |
| | | if (k == column1[i].prop && k != "title1") { |
| | | d[k] = this.obj1[k]; |
| | | } |
| | | } |
| | | } |
| | | d["capital"] = d["capital2"]; |
| | | delete d["capital2"]; |
| | | // console.log(d); |
| | | for (var k in d) { |
| | | if (d[k] == "" || d[k] == undefined) { |
| | | console.log(k); |
| | | this.$message.warning("请检查表单是否填写完整!"); |
| | | return; |
| | | } |
| | | } |
| | | console.log(d, 1); |
| | | this.data1 = d; |
| | | this.forms = 2; |
| | | }, |
| | | tip2() { |
| | | if (this.panduanmeiyouziduan()) { |
| | | return; |
| | | } |
| | | var d = {}; |
| | | for (var k in this.obj2) { |
| | | for (var i in column2) { |
| | | if (k == column2[i].prop && k != "title2") { |
| | | d[k] = this.obj2[k]; |
| | | } |
| | | } |
| | | } |
| | | console.log(d); |
| | | d["cardid"] = d["cardid2"]; |
| | | delete d["cardid2"]; |
| | | d["cell"] = d["cell2"]; |
| | | delete d["cell2"]; |
| | | // d["shareholdingratio"] = d["shareholdingratio2"]; |
| | | // delete d["shareholdingratio2"]; |
| | | for (var k in d) { |
| | | if (d[k] == "" || d[k] == undefined) { |
| | | console.log(k); |
| | | this.$message.warning("请检查表单是否填写完整!"); |
| | | return; |
| | | } |
| | | } |
| | | console.log(d, 2); |
| | | this.data2 = d; |
| | | |
| | | // this.data0.departmentid = this.data0.useid; |
| | | // this.data1.departmentid = this.data1.useid; |
| | | // this.data2.departmentid = this.data2.useid; |
| | | // delete this.data0.useid; |
| | | // delete this.data1.useid; |
| | | // delete this.data2.useid; |
| | | |
| | | adddata(this.data0).then((res) => { |
| | | console.log(res, 0); |
| | | }); |
| | | adddata1(this.data1).then((res) => { |
| | | console.log(res, 1); |
| | | }); |
| | | adddata2(this.data2).then((res) => { |
| | | console.log(res, 2); |
| | | }); |
| | | var time = setTimeout(() => { |
| | | this.onLoad(this.page, this.query); |
| | | console.log(this.data0, this.data1, this.data2, "已刷新"); |
| | | }, 500); |
| | | this.tipover(); |
| | | }, |
| | | tip1up1() { |
| | | this.forms = 0; |
| | | }, |
| | | tip2up2() { |
| | | this.forms = 1; |
| | | }, |
| | | tipover() { |
| | | this.forms = -1; |
| | | this.obj0 = { |
| | | title0: "保安单位基本信息", |
| | | }; |
| | | this.obj1 = { |
| | | title1: "保安单位出资人员", |
| | | }; |
| | | this.obj2 = { |
| | | title2: "主要管理人员信息", |
| | | }; |
| | | this.data0 = {}; |
| | | this.data1 = {}; |
| | | this.data2 = {}; |
| | | this.noshehuibianma = 0; |
| | | this.nobumen = 0; |
| | | }, |
| | | panduanmeiyouziduan() { |
| | | if (this.noshehuibianma == 0) { |
| | | this.$message.warning("请输入统一社会信用代码"); |
| | | return true; |
| | | } |
| | | if (this.nobumen == 0) { |
| | | return false; |
| | | this.$message.warning("请选则部门"); |
| | | } |
| | | return false; |
| | | }, |
| | | }, |
| | | watch: { |
| | | haveID() { |
| | | // console.log(this.haveID); |
| | | if (this.haveID != undefined) { |
| | | if (this.haveID.length > 5) { |
| | | //统一社会信用代码判断 |
| | | this.noshehuibianma = 1; |
| | | } else { |
| | | this.noshehuibianma = 0; |
| | | } |
| | | } |
| | | }, |
| | | havedata() { |
| | | console.log(this.havedata, "qqqqq"); |
| | | }, |
| | | }, |
| | | mounted() {}, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .securityUnit { |
| | | width: 100%; |
| | | height: 100%; |
| | | // border: 1px solid #000; |
| | | box-sizing: border-box; |
| | | } |
| | | // .el-card__body { |
| | | // padding-bottom: 5px !important; |
| | | // } |
| | | // .avue-crud__tip, |
| | | // .el-tag, |
| | | // .el-tag--light { |
| | | // padding: 0 !important; |
| | | // } |
| | | |
| | | .lod { |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | width: 100%; |
| | | height: 100%; |
| | | background-color: rgba($color: #000000, $alpha: 0.5); |
| | | padding: 100px 0 0 0; |
| | | z-index: 500 !important; |
| | | display: flex; |
| | | // align-items: center; |
| | | justify-content: center; |
| | | .trees { |
| | | z-index: 501 !important; |
| | | position: absolute; |
| | | width: 15%; |
| | | top: 100px; |
| | | left: 0; |
| | | // display: none; |
| | | } |
| | | .lod-in { |
| | | width: 70%; |
| | | height: auto; |
| | | background-color: transparent; |
| | | |
| | | // padding: 10px 0 0 0; |
| | | } |
| | | |
| | | .el-collapse-item { |
| | | padding-top: 15px !important; |
| | | } |
| | | } |
| | | .el-collapse { |
| | | border-top: 1px solid transparent !important; |
| | | } |
| | | </style> |
| New file |
| | |
| | | <template> |
| | | <basic-container> |
| | | <div class="securityUnit"> |
| | | <avue-crud |
| | | :option="option" |
| | | :data="data" |
| | | :page.sync="page" |
| | | ref="crudrec" |
| | | @on-load="onLoad" |
| | | :table-loading="loading" |
| | | @row-save="rowSave" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @row-update="rowUpdate" |
| | | @row-del="rowDel" |
| | | @selection-change="selectionChange" |
| | | @refresh-change="refreshChange" |
| | | @row-click="rowClick" |
| | | > |
| | | <template slot-scope="{ type, size, row }" slot="menu"> |
| | | <el-button |
| | | :size="size" |
| | | :type="type" |
| | | @click="handleUploadPage(row)" |
| | | icon="el-icon-circle-check" |
| | | >附件上传 |
| | | </el-button> |
| | | </template> |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-plus" |
| | | size="small" |
| | | plain |
| | | @click.stop="rowSave" |
| | | >新增</el-button |
| | | > |
| | | <el-button |
| | | type="danger" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-delete" |
| | | @click="handleDelete" |
| | | >删 除 |
| | | </el-button> |
| | | <el-button |
| | | type="success" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-upload2" |
| | | @click="handleImport1" |
| | | >批量导入 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <div class="lod" v-show="forms != -1"> |
| | | <div class="lod-in"> |
| | | <!-- <el-col class="trees" v-if="forms == 0"> |
| | | <div class="box"> |
| | | <el-scrollbar> |
| | | <basic-container> |
| | | <avue-tree |
| | | :option="treeOption" |
| | | :data="treeData" |
| | | @node-click="nodeClick" |
| | | /> |
| | | </basic-container> |
| | | </el-scrollbar> |
| | | </div> |
| | | </el-col> --> |
| | | <avue-form |
| | | ref="form" |
| | | v-model="obj0" |
| | | :option="option0" |
| | | v-if="forms == 0" |
| | | > |
| | | <template slot="menuForm"> |
| | | <el-button type="primary" @click="tip0">下一页</el-button> |
| | | <el-button type="info" @click="tipover">取消</el-button> |
| | | </template> |
| | | </avue-form> |
| | | <avue-form |
| | | ref="form1" |
| | | v-model="obj1" |
| | | :option="option1" |
| | | v-else-if="forms == 1" |
| | | > |
| | | <template slot="menuForm"> |
| | | <el-button type="primary" @click="tip1up1">上一页</el-button> |
| | | <el-button type="primary" @click="tip1">下一页</el-button> |
| | | <el-button type="info" @click="tipover">取消</el-button> |
| | | </template> |
| | | </avue-form> |
| | | <avue-form |
| | | ref="form2" |
| | | v-model="obj2" |
| | | :option="option2" |
| | | v-else-if="forms == 2" |
| | | > |
| | | <template slot="menuForm"> |
| | | <el-button type="primary" @click="tip2up2">上一页</el-button> |
| | | <el-button type="primary" @click="tip2">提交</el-button> |
| | | <el-button type="info" @click="tipover">取消</el-button> |
| | | </template> |
| | | </avue-form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-dialog |
| | | title="保安单位导入" |
| | | append-to-body |
| | | :visible.sync="excelBox1" |
| | | width="555px" |
| | | > |
| | | <avue-form |
| | | :option="excelOption1" |
| | | v-model="excelForm1" |
| | | :upload-after="uploadAfter1" |
| | | > |
| | | <template slot="excelTemplate"> |
| | | <el-button type="primary" @click="handleTemplate1"> |
| | | 点击下载<i class="el-icon-download el-icon--right"></i> |
| | | </el-button> |
| | | </template> |
| | | </avue-form> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { column, column0, column1, column2 } from "./data"; |
| | | import { |
| | | getdata, |
| | | adddata, |
| | | update, |
| | | remove, |
| | | adddata1, |
| | | adddata2, |
| | | getDeptLazyTree, |
| | | } from "@/api/securityUnit/securityUnit"; |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | data() { |
| | | var w = 160, |
| | | s = 12; |
| | | return { |
| | | excelBox1: false, |
| | | excelForm1: {}, |
| | | excelOption1: { |
| | | submitBtn: false, |
| | | emptyBtn: false, |
| | | column: [ |
| | | { |
| | | label: "文件上传", |
| | | prop: "excelFile", |
| | | type: "upload", |
| | | drag: true, |
| | | loadText: "文件上传中,请稍等", |
| | | span: 24, |
| | | propsHttp: { |
| | | res: "data", |
| | | }, |
| | | tip: "请上传 .xls,.xlsx 标准格式文件", |
| | | action: "/api/information/import-informaton", |
| | | }, |
| | | { |
| | | label: "模板下载", |
| | | prop: "excelTemplate", |
| | | formslot: true, |
| | | span: 24, |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | loading: true, //保安单位基本信息 |
| | | selectionList: [], |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | }, |
| | | |
| | | treeData: [], |
| | | treeOption: { |
| | | title: "我是标题", |
| | | filterText: "搜索关键字自定义", |
| | | defaultExpandAll: true, |
| | | addBtn: false, |
| | | menu: false, |
| | | size: "small", |
| | | formOption: { |
| | | labelWidth: 100, |
| | | column: [ |
| | | { |
| | | label: "自定义项", |
| | | prop: "label", |
| | | }, |
| | | ], |
| | | }, |
| | | props: { |
| | | labelText: "标题", |
| | | label: "title", |
| | | value: "id", |
| | | children: "children", |
| | | }, |
| | | }, |
| | | // treeOption: { |
| | | // nodeKey: "id", |
| | | // // lazy: true, |
| | | // // treeLoad: function (node, resolve) { |
| | | // // // const parentId = node.level === 0 ? 0 : node.data.id; |
| | | // // getDeptLazyTree().then((res) => { |
| | | // // resolve( |
| | | // // res.data.data.map((item) => { |
| | | // // console.log({ |
| | | // // ...item, |
| | | // // leaf: !item.hasChildren, |
| | | // // }); |
| | | // // return { |
| | | // // ...item, |
| | | // // leaf: !item.hasChildren, |
| | | // // }; |
| | | // // }) |
| | | // // ); |
| | | // // }); |
| | | // // }, |
| | | // addBtn: false, |
| | | // menu: false, |
| | | // size: "small", |
| | | // props: { |
| | | // labelText: "标题", |
| | | // label: "title", |
| | | // value: "value", |
| | | // children: "children", |
| | | // }, |
| | | // }, |
| | | |
| | | obj0: { |
| | | title0: "保安单位基本信息", |
| | | }, |
| | | option0: { |
| | | emptyBtn: false, |
| | | submitBtn: false, |
| | | gutter: 30, |
| | | column: column0, |
| | | }, |
| | | obj1: { |
| | | title1: "保安单位出资人员", |
| | | }, |
| | | option1: { |
| | | emptyBtn: false, |
| | | submitBtn: false, |
| | | gutter: 30, |
| | | column: column1, |
| | | }, |
| | | obj2: { |
| | | title2: "主要管理人员信息", |
| | | }, |
| | | option2: { |
| | | emptyBtn: false, |
| | | submitBtn: false, |
| | | gutter: 30, |
| | | column: column2, |
| | | }, |
| | | |
| | | forms: -1, |
| | | data0: {}, |
| | | data1: {}, |
| | | data2: {}, |
| | | b0: {}, |
| | | b1: {}, |
| | | b2: {}, |
| | | noshehuibianma: 0, |
| | | nobumen: 0, |
| | | |
| | | query: {}, |
| | | data: [], |
| | | option: { |
| | | index: true, |
| | | addBtn: false, |
| | | // card: true, |
| | | tip: false, |
| | | searchSize: "mini", |
| | | searchMenuSpan: 6, |
| | | height: 583, |
| | | menuWidth: 220, |
| | | align: "center", |
| | | selection: true, |
| | | column: column, |
| | | }, |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userInfo"]), |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.creditcode); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | ids1() { |
| | | let ids1 = []; |
| | | this.selectionList1.forEach((ele) => { |
| | | ids1.push(ele.id); |
| | | }); |
| | | return ids1.join(","); |
| | | }, |
| | | ids2() { |
| | | let ids2 = []; |
| | | this.selectionList2.forEach((ele) => { |
| | | ids2.push(ele.id); |
| | | }); |
| | | return ids2.join(","); |
| | | }, |
| | | haveID() { |
| | | return this.obj0.creditcode; |
| | | }, |
| | | }, |
| | | methods: { |
| | | handleImport1() { |
| | | this.excelBox1 = true; |
| | | }, |
| | | uploadAfter1(res, done, loading, column) { |
| | | window.console.log(column); |
| | | this.excelBox1 = false; |
| | | // this.refreshChange(); |
| | | done(); |
| | | }, |
| | | handleTemplate1() { |
| | | window.open(`/api/examSubjectChoices/export-template`); |
| | | }, |
| | | |
| | | // handleChangeTABS(column) { |
| | | // this.typeTABS = column; |
| | | // // this.$message.success(JSON.stringify(column)); |
| | | // if (column.prop == "tab1") { |
| | | // this.loading1 = false; |
| | | // this.loading2 = false; |
| | | // this.onLoad(this.page); |
| | | // } else if (column.prop == "tab2") { |
| | | // this.loading = false; |
| | | // this.loading2 = false; |
| | | // this.onLoad1(this.page1); //第二个表格不会自动执行 |
| | | // } else if (column.prop == "tab3") { |
| | | // this.loading1 = false; |
| | | // this.loading = false; |
| | | // this.onLoad2(this.page2); //第二个表格不会自动执行 |
| | | // } |
| | | // }, |
| | | //保安单位基本信息 |
| | | sizeChange(val) { |
| | | this.page1.currentPage = 1; |
| | | this.page1.pageSize = val; |
| | | // this.getData(); |
| | | this.onLoad(this.page, this.query); |
| | | // this.$message.success("行数" + val); |
| | | }, |
| | | currentChange(val) { |
| | | this.page1.currentPage = val; |
| | | // this.getData(); |
| | | this.onLoad(this.page, this.query); |
| | | // this.$message.success("页码" + val); |
| | | }, |
| | | rowSave(form, done, loading) { |
| | | // console.log("save1"); |
| | | this.forms = 0; |
| | | var that = this; |
| | | //先获取部门接口 |
| | | getDeptLazyTree().then((res) => { |
| | | var d = res.data.data; |
| | | that.treeData = d; |
| | | // console.log(d); |
| | | }); |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | delete row.tenantid; |
| | | delete row.regstsat; |
| | | console.log(row, 0); |
| | | 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(() => { |
| | | console.log(row); |
| | | return remove(row.creditcode, row.departmentid); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | }); |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据"); |
| | | return; |
| | | } |
| | | this.$confirm("确定批量将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | console.log(this.ids); |
| | | // return remove(this.ids); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | this.$refs.crudrec.toggleSelection(); |
| | | }); |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | rowClick(row) { |
| | | // console.log(row); |
| | | // row.identificationnumber; //统一社会信用代 码 |
| | | window.localStorage.setItem("danweidata", JSON.stringify(row)); |
| | | this.$router.push({ |
| | | path: "/securityUnitChild", |
| | | // redirect: { name: "foo" }, |
| | | query: { rowsecurity: "fromSecurity" }, |
| | | // params: { row: row.identificationnumber }, |
| | | }); |
| | | }, |
| | | //跳转到附近列表页面 |
| | | handleUploadPage(row) { |
| | | this.$router.push({ |
| | | path: `/resource/attachCopy`, |
| | | query: { |
| | | deptId: row.departmentid, |
| | | enterprisename: row.enterprisename, |
| | | }, |
| | | }); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | if (this.userInfo.role_id == "1414840172333842433") { |
| | | console.log("是公安add jurisdiction"); |
| | | params["jurisdiction"] = this.userInfo.jurisdiction; |
| | | } |
| | | params["stats"] = 1; |
| | | this.loading = true; |
| | | getdata( |
| | | 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; |
| | | window.localStorage.setItem("danweidataS", JSON.stringify(this.data)); |
| | | console.log(this.data); |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // nodeClick(data) {//分局 不在这添加 |
| | | // // this.treeDeptId = data.id; |
| | | // // this.page.currentPage = 1; |
| | | // // this.onLoad(this.page); |
| | | // // this.$message.success(JSON.stringify(data)); |
| | | // this.obj0["departmentid"] = data.title; |
| | | // this.obj1["departmentid"] = data.title; |
| | | // this.obj2["departmentid"] = data.title; |
| | | // this.obj0["useid"] = data.id; |
| | | // this.obj1["useid"] = data.id; |
| | | // this.obj2["useid"] = data.id; |
| | | // this.nobumen = 1; |
| | | // }, |
| | | tip0() { |
| | | if (this.panduanmeiyouziduan()) { |
| | | return; |
| | | } |
| | | var d = {}; |
| | | for (var k in this.obj0) { |
| | | for (var i in column0) { |
| | | if (k == column0[i].prop && k != "title0") { |
| | | d[k] = this.obj0[k]; |
| | | } |
| | | } |
| | | } |
| | | console.log(d); |
| | | for (var k in d) { |
| | | if (d[k] == "" || d[k] == undefined) { |
| | | console.log(k); |
| | | this.$message.warning("请检查表单是否填写完整!"); |
| | | return; |
| | | } |
| | | } |
| | | console.log(d, 0); |
| | | this.data0 = d; |
| | | this.forms = 1; |
| | | }, |
| | | tip1() { |
| | | if (this.panduanmeiyouziduan()) { |
| | | return; |
| | | } |
| | | var d = {}; |
| | | for (var k in this.obj1) { |
| | | for (var i in column1) { |
| | | if (k == column1[i].prop && k != "title1") { |
| | | d[k] = this.obj1[k]; |
| | | } |
| | | } |
| | | } |
| | | d["capital"] = d["capital2"]; |
| | | delete d["capital2"]; |
| | | // console.log(d); |
| | | for (var k in d) { |
| | | if (d[k] == "" || d[k] == undefined) { |
| | | console.log(k); |
| | | this.$message.warning("请检查表单是否填写完整!"); |
| | | return; |
| | | } |
| | | } |
| | | console.log(d, 1); |
| | | this.data1 = d; |
| | | this.forms = 2; |
| | | }, |
| | | tip2() { |
| | | if (this.panduanmeiyouziduan()) { |
| | | return; |
| | | } |
| | | var d = {}; |
| | | for (var k in this.obj2) { |
| | | for (var i in column2) { |
| | | if (k == column2[i].prop && k != "title2") { |
| | | d[k] = this.obj2[k]; |
| | | } |
| | | } |
| | | } |
| | | console.log(d); |
| | | d["cardid"] = d["cardid2"]; |
| | | delete d["cardid2"]; |
| | | d["cell"] = d["cell2"]; |
| | | delete d["cell2"]; |
| | | // d["shareholdingratio"] = d["shareholdingratio2"]; |
| | | // delete d["shareholdingratio2"]; |
| | | for (var k in d) { |
| | | if (d[k] == "" || d[k] == undefined) { |
| | | console.log(k); |
| | | this.$message.warning("请检查表单是否填写完整!"); |
| | | return; |
| | | } |
| | | } |
| | | console.log(d, 2); |
| | | this.data2 = d; |
| | | |
| | | // this.data0.departmentid = this.data0.useid; |
| | | // this.data1.departmentid = this.data1.useid; |
| | | // this.data2.departmentid = this.data2.useid; |
| | | // delete this.data0.useid; |
| | | // delete this.data1.useid; |
| | | // delete this.data2.useid; |
| | | |
| | | adddata(this.data0).then((res) => { |
| | | console.log(res, 0); |
| | | }); |
| | | adddata1(this.data1).then((res) => { |
| | | console.log(res, 1); |
| | | }); |
| | | adddata2(this.data2).then((res) => { |
| | | console.log(res, 2); |
| | | }); |
| | | var time = setTimeout(() => { |
| | | this.onLoad(this.page, this.query); |
| | | console.log(this.data0, this.data1, this.data2, "已刷新"); |
| | | }, 500); |
| | | this.tipover(); |
| | | }, |
| | | tip1up1() { |
| | | this.forms = 0; |
| | | }, |
| | | tip2up2() { |
| | | this.forms = 1; |
| | | }, |
| | | tipover() { |
| | | this.forms = -1; |
| | | this.obj0 = { |
| | | title0: "保安单位基本信息", |
| | | }; |
| | | this.obj1 = { |
| | | title1: "保安单位出资人员", |
| | | }; |
| | | this.obj2 = { |
| | | title2: "主要管理人员信息", |
| | | }; |
| | | this.data0 = {}; |
| | | this.data1 = {}; |
| | | this.data2 = {}; |
| | | this.noshehuibianma = 0; |
| | | this.nobumen = 0; |
| | | }, |
| | | panduanmeiyouziduan() { |
| | | if (this.noshehuibianma == 0) { |
| | | this.$message.warning("请输入统一社会信用代码"); |
| | | return true; |
| | | } |
| | | if (this.nobumen == 0) { |
| | | return false; |
| | | this.$message.warning("请选则部门"); |
| | | } |
| | | return false; |
| | | }, |
| | | }, |
| | | watch: { |
| | | haveID() { |
| | | // console.log(this.haveID); |
| | | if (this.haveID != undefined) { |
| | | if (this.haveID.length > 5) { |
| | | //统一社会信用代码判断 |
| | | this.noshehuibianma = 1; |
| | | } else { |
| | | this.noshehuibianma = 0; |
| | | } |
| | | } |
| | | }, |
| | | havedata() { |
| | | console.log(this.havedata, "qqqqq"); |
| | | }, |
| | | }, |
| | | mounted() {}, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .securityUnit { |
| | | width: 100%; |
| | | height: 100%; |
| | | // border: 1px solid #000; |
| | | box-sizing: border-box; |
| | | } |
| | | // .el-card__body { |
| | | // padding-bottom: 5px !important; |
| | | // } |
| | | // .avue-crud__tip, |
| | | // .el-tag, |
| | | // .el-tag--light { |
| | | // padding: 0 !important; |
| | | // } |
| | | |
| | | .lod { |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | width: 100%; |
| | | height: 100%; |
| | | background-color: rgba($color: #000000, $alpha: 0.5); |
| | | padding: 100px 0 0 0; |
| | | z-index: 500 !important; |
| | | display: flex; |
| | | // align-items: center; |
| | | justify-content: center; |
| | | .trees { |
| | | z-index: 501 !important; |
| | | position: absolute; |
| | | width: 15%; |
| | | top: 100px; |
| | | left: 0; |
| | | // display: none; |
| | | } |
| | | .lod-in { |
| | | width: 70%; |
| | | height: auto; |
| | | background-color: transparent; |
| | | |
| | | // padding: 10px 0 0 0; |
| | | } |
| | | |
| | | .el-collapse-item { |
| | | padding-top: 15px !important; |
| | | } |
| | | } |
| | | .el-collapse { |
| | | border-top: 1px solid transparent !important; |
| | | } |
| | | </style> |
| New file |
| | |
| | | <template> |
| | | <basic-container> |
| | | <div class="securityUnit"> |
| | | <avue-crud |
| | | :option="option" |
| | | :data="data" |
| | | :page.sync="page" |
| | | ref="crudrec" |
| | | @on-load="onLoad" |
| | | :table-loading="loading" |
| | | @row-save="rowSave" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @row-update="rowUpdate" |
| | | @row-del="rowDel" |
| | | @selection-change="selectionChange" |
| | | @refresh-change="refreshChange" |
| | | @row-click="rowClick" |
| | | > |
| | | <template slot-scope="{ type, size, row }" slot="menu"> |
| | | <el-button |
| | | :size="size" |
| | | :type="type" |
| | | @click="handleUploadPage(row)" |
| | | icon="el-icon-circle-check" |
| | | >附件上传 |
| | | </el-button> |
| | | </template> |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-plus" |
| | | size="small" |
| | | plain |
| | | @click.stop="rowSave" |
| | | >新增</el-button |
| | | > |
| | | <el-button |
| | | type="danger" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-delete" |
| | | @click="handleDelete" |
| | | >删 除 |
| | | </el-button> |
| | | <el-button |
| | | type="success" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-upload2" |
| | | @click="handleImport1" |
| | | >批量导入 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <div class="lod" v-show="forms != -1"> |
| | | <div class="lod-in"> |
| | | <!-- <el-col class="trees" v-if="forms == 0"> |
| | | <div class="box"> |
| | | <el-scrollbar> |
| | | <basic-container> |
| | | <avue-tree |
| | | :option="treeOption" |
| | | :data="treeData" |
| | | @node-click="nodeClick" |
| | | /> |
| | | </basic-container> |
| | | </el-scrollbar> |
| | | </div> |
| | | </el-col> --> |
| | | <avue-form |
| | | ref="form" |
| | | v-model="obj0" |
| | | :option="option0" |
| | | v-if="forms == 0" |
| | | > |
| | | <template slot="menuForm"> |
| | | <el-button type="primary" @click="tip0">下一页</el-button> |
| | | <el-button type="info" @click="tipover">取消</el-button> |
| | | </template> |
| | | </avue-form> |
| | | <avue-form |
| | | ref="form1" |
| | | v-model="obj1" |
| | | :option="option1" |
| | | v-else-if="forms == 1" |
| | | > |
| | | <template slot="menuForm"> |
| | | <el-button type="primary" @click="tip1up1">上一页</el-button> |
| | | <el-button type="primary" @click="tip1">下一页</el-button> |
| | | <el-button type="info" @click="tipover">取消</el-button> |
| | | </template> |
| | | </avue-form> |
| | | <avue-form |
| | | ref="form2" |
| | | v-model="obj2" |
| | | :option="option2" |
| | | v-else-if="forms == 2" |
| | | > |
| | | <template slot="menuForm"> |
| | | <el-button type="primary" @click="tip2up2">上一页</el-button> |
| | | <el-button type="primary" @click="tip2">提交</el-button> |
| | | <el-button type="info" @click="tipover">取消</el-button> |
| | | </template> |
| | | </avue-form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-dialog |
| | | title="保安单位导入" |
| | | append-to-body |
| | | :visible.sync="excelBox1" |
| | | width="555px" |
| | | > |
| | | <avue-form |
| | | :option="excelOption1" |
| | | v-model="excelForm1" |
| | | :upload-after="uploadAfter1" |
| | | > |
| | | <template slot="excelTemplate"> |
| | | <el-button type="primary" @click="handleTemplate1"> |
| | | 点击下载<i class="el-icon-download el-icon--right"></i> |
| | | </el-button> |
| | | </template> |
| | | </avue-form> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { column, column0, column1, column2 } from "./data"; |
| | | import { |
| | | getdata, |
| | | adddata, |
| | | update, |
| | | remove, |
| | | adddata1, |
| | | adddata2, |
| | | getDeptLazyTree, |
| | | } from "@/api/securityUnit/securityUnit"; |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | data() { |
| | | var w = 160, |
| | | s = 12; |
| | | return { |
| | | excelBox1: false, |
| | | excelForm1: {}, |
| | | excelOption1: { |
| | | submitBtn: false, |
| | | emptyBtn: false, |
| | | column: [ |
| | | { |
| | | label: "文件上传", |
| | | prop: "excelFile", |
| | | type: "upload", |
| | | drag: true, |
| | | loadText: "文件上传中,请稍等", |
| | | span: 24, |
| | | propsHttp: { |
| | | res: "data", |
| | | }, |
| | | tip: "请上传 .xls,.xlsx 标准格式文件", |
| | | action: "/api/information/import-informaton", |
| | | }, |
| | | { |
| | | label: "模板下载", |
| | | prop: "excelTemplate", |
| | | formslot: true, |
| | | span: 24, |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | loading: true, //保安单位基本信息 |
| | | selectionList: [], |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | }, |
| | | |
| | | treeData: [], |
| | | treeOption: { |
| | | title: "我是标题", |
| | | filterText: "搜索关键字自定义", |
| | | defaultExpandAll: true, |
| | | addBtn: false, |
| | | menu: false, |
| | | size: "small", |
| | | formOption: { |
| | | labelWidth: 100, |
| | | column: [ |
| | | { |
| | | label: "自定义项", |
| | | prop: "label", |
| | | }, |
| | | ], |
| | | }, |
| | | props: { |
| | | labelText: "标题", |
| | | label: "title", |
| | | value: "id", |
| | | children: "children", |
| | | }, |
| | | }, |
| | | // treeOption: { |
| | | // nodeKey: "id", |
| | | // // lazy: true, |
| | | // // treeLoad: function (node, resolve) { |
| | | // // // const parentId = node.level === 0 ? 0 : node.data.id; |
| | | // // getDeptLazyTree().then((res) => { |
| | | // // resolve( |
| | | // // res.data.data.map((item) => { |
| | | // // console.log({ |
| | | // // ...item, |
| | | // // leaf: !item.hasChildren, |
| | | // // }); |
| | | // // return { |
| | | // // ...item, |
| | | // // leaf: !item.hasChildren, |
| | | // // }; |
| | | // // }) |
| | | // // ); |
| | | // // }); |
| | | // // }, |
| | | // addBtn: false, |
| | | // menu: false, |
| | | // size: "small", |
| | | // props: { |
| | | // labelText: "标题", |
| | | // label: "title", |
| | | // value: "value", |
| | | // children: "children", |
| | | // }, |
| | | // }, |
| | | |
| | | obj0: { |
| | | title0: "保安单位基本信息", |
| | | }, |
| | | option0: { |
| | | emptyBtn: false, |
| | | submitBtn: false, |
| | | gutter: 30, |
| | | column: column0, |
| | | }, |
| | | obj1: { |
| | | title1: "保安单位出资人员", |
| | | }, |
| | | option1: { |
| | | emptyBtn: false, |
| | | submitBtn: false, |
| | | gutter: 30, |
| | | column: column1, |
| | | }, |
| | | obj2: { |
| | | title2: "主要管理人员信息", |
| | | }, |
| | | option2: { |
| | | emptyBtn: false, |
| | | submitBtn: false, |
| | | gutter: 30, |
| | | column: column2, |
| | | }, |
| | | |
| | | forms: -1, |
| | | data0: {}, |
| | | data1: {}, |
| | | data2: {}, |
| | | b0: {}, |
| | | b1: {}, |
| | | b2: {}, |
| | | noshehuibianma: 0, |
| | | nobumen: 0, |
| | | |
| | | query: {}, |
| | | data: [], |
| | | option: { |
| | | index: true, |
| | | addBtn: false, |
| | | // card: true, |
| | | tip: false, |
| | | searchSize: "mini", |
| | | searchMenuSpan: 6, |
| | | height: 583, |
| | | menuWidth: 220, |
| | | align: "center", |
| | | selection: true, |
| | | column: column, |
| | | }, |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userInfo"]), |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.creditcode); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | ids1() { |
| | | let ids1 = []; |
| | | this.selectionList1.forEach((ele) => { |
| | | ids1.push(ele.id); |
| | | }); |
| | | return ids1.join(","); |
| | | }, |
| | | ids2() { |
| | | let ids2 = []; |
| | | this.selectionList2.forEach((ele) => { |
| | | ids2.push(ele.id); |
| | | }); |
| | | return ids2.join(","); |
| | | }, |
| | | haveID() { |
| | | return this.obj0.creditcode; |
| | | }, |
| | | }, |
| | | methods: { |
| | | handleImport1() { |
| | | this.excelBox1 = true; |
| | | }, |
| | | uploadAfter1(res, done, loading, column) { |
| | | window.console.log(column); |
| | | this.excelBox1 = false; |
| | | // this.refreshChange(); |
| | | done(); |
| | | }, |
| | | handleTemplate1() { |
| | | window.open(`/api/examSubjectChoices/export-template`); |
| | | }, |
| | | |
| | | // handleChangeTABS(column) { |
| | | // this.typeTABS = column; |
| | | // // this.$message.success(JSON.stringify(column)); |
| | | // if (column.prop == "tab1") { |
| | | // this.loading1 = false; |
| | | // this.loading2 = false; |
| | | // this.onLoad(this.page); |
| | | // } else if (column.prop == "tab2") { |
| | | // this.loading = false; |
| | | // this.loading2 = false; |
| | | // this.onLoad1(this.page1); //第二个表格不会自动执行 |
| | | // } else if (column.prop == "tab3") { |
| | | // this.loading1 = false; |
| | | // this.loading = false; |
| | | // this.onLoad2(this.page2); //第二个表格不会自动执行 |
| | | // } |
| | | // }, |
| | | //保安单位基本信息 |
| | | sizeChange(val) { |
| | | this.page1.currentPage = 1; |
| | | this.page1.pageSize = val; |
| | | // this.getData(); |
| | | this.onLoad(this.page, this.query); |
| | | // this.$message.success("行数" + val); |
| | | }, |
| | | currentChange(val) { |
| | | this.page1.currentPage = val; |
| | | // this.getData(); |
| | | this.onLoad(this.page, this.query); |
| | | // this.$message.success("页码" + val); |
| | | }, |
| | | rowSave(form, done, loading) { |
| | | // console.log("save1"); |
| | | this.forms = 0; |
| | | var that = this; |
| | | //先获取部门接口 |
| | | getDeptLazyTree().then((res) => { |
| | | var d = res.data.data; |
| | | that.treeData = d; |
| | | // console.log(d); |
| | | }); |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | delete row.tenantid; |
| | | delete row.regstsat; |
| | | console.log(row, 0); |
| | | 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(() => { |
| | | console.log(row); |
| | | return remove(row.creditcode, row.departmentid); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | }); |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据"); |
| | | return; |
| | | } |
| | | this.$confirm("确定批量将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | console.log(this.ids); |
| | | // return remove(this.ids); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | this.$refs.crudrec.toggleSelection(); |
| | | }); |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | rowClick(row) { |
| | | // console.log(row); |
| | | // row.identificationnumber; //统一社会信用代 码 |
| | | window.localStorage.setItem("danweidata", JSON.stringify(row)); |
| | | this.$router.push({ |
| | | path: "/securityUnitChild", |
| | | // redirect: { name: "foo" }, |
| | | query: { rowsecurity: "fromSecurity" }, |
| | | // params: { row: row.identificationnumber }, |
| | | }); |
| | | }, |
| | | //跳转到附近列表页面 |
| | | handleUploadPage(row) { |
| | | this.$router.push({ |
| | | path: `/resource/attachCopy`, |
| | | query: { |
| | | deptId: row.departmentid, |
| | | enterprisename: row.enterprisename, |
| | | }, |
| | | }); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | if (this.userInfo.role_id == "1414840172333842433") { |
| | | console.log("是公安add jurisdiction"); |
| | | params["jurisdiction"] = this.userInfo.jurisdiction; |
| | | } |
| | | params["stats"] = 0; |
| | | this.loading = true; |
| | | getdata( |
| | | 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; |
| | | window.localStorage.setItem("danweidataS", JSON.stringify(this.data)); |
| | | console.log(this.data); |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // nodeClick(data) {//分局 不在这添加 |
| | | // // this.treeDeptId = data.id; |
| | | // // this.page.currentPage = 1; |
| | | // // this.onLoad(this.page); |
| | | // // this.$message.success(JSON.stringify(data)); |
| | | // this.obj0["departmentid"] = data.title; |
| | | // this.obj1["departmentid"] = data.title; |
| | | // this.obj2["departmentid"] = data.title; |
| | | // this.obj0["useid"] = data.id; |
| | | // this.obj1["useid"] = data.id; |
| | | // this.obj2["useid"] = data.id; |
| | | // this.nobumen = 1; |
| | | // }, |
| | | tip0() { |
| | | if (this.panduanmeiyouziduan()) { |
| | | return; |
| | | } |
| | | var d = {}; |
| | | for (var k in this.obj0) { |
| | | for (var i in column0) { |
| | | if (k == column0[i].prop && k != "title0") { |
| | | d[k] = this.obj0[k]; |
| | | } |
| | | } |
| | | } |
| | | console.log(d); |
| | | for (var k in d) { |
| | | if (d[k] == "" || d[k] == undefined) { |
| | | console.log(k); |
| | | this.$message.warning("请检查表单是否填写完整!"); |
| | | return; |
| | | } |
| | | } |
| | | console.log(d, 0); |
| | | this.data0 = d; |
| | | this.forms = 1; |
| | | }, |
| | | tip1() { |
| | | if (this.panduanmeiyouziduan()) { |
| | | return; |
| | | } |
| | | var d = {}; |
| | | for (var k in this.obj1) { |
| | | for (var i in column1) { |
| | | if (k == column1[i].prop && k != "title1") { |
| | | d[k] = this.obj1[k]; |
| | | } |
| | | } |
| | | } |
| | | d["capital"] = d["capital2"]; |
| | | delete d["capital2"]; |
| | | // console.log(d); |
| | | for (var k in d) { |
| | | if (d[k] == "" || d[k] == undefined) { |
| | | console.log(k); |
| | | this.$message.warning("请检查表单是否填写完整!"); |
| | | return; |
| | | } |
| | | } |
| | | console.log(d, 1); |
| | | this.data1 = d; |
| | | this.forms = 2; |
| | | }, |
| | | tip2() { |
| | | if (this.panduanmeiyouziduan()) { |
| | | return; |
| | | } |
| | | var d = {}; |
| | | for (var k in this.obj2) { |
| | | for (var i in column2) { |
| | | if (k == column2[i].prop && k != "title2") { |
| | | d[k] = this.obj2[k]; |
| | | } |
| | | } |
| | | } |
| | | console.log(d); |
| | | d["cardid"] = d["cardid2"]; |
| | | delete d["cardid2"]; |
| | | d["cell"] = d["cell2"]; |
| | | delete d["cell2"]; |
| | | // d["shareholdingratio"] = d["shareholdingratio2"]; |
| | | // delete d["shareholdingratio2"]; |
| | | for (var k in d) { |
| | | if (d[k] == "" || d[k] == undefined) { |
| | | console.log(k); |
| | | this.$message.warning("请检查表单是否填写完整!"); |
| | | return; |
| | | } |
| | | } |
| | | console.log(d, 2); |
| | | this.data2 = d; |
| | | |
| | | // this.data0.departmentid = this.data0.useid; |
| | | // this.data1.departmentid = this.data1.useid; |
| | | // this.data2.departmentid = this.data2.useid; |
| | | // delete this.data0.useid; |
| | | // delete this.data1.useid; |
| | | // delete this.data2.useid; |
| | | |
| | | adddata(this.data0).then((res) => { |
| | | console.log(res, 0); |
| | | }); |
| | | adddata1(this.data1).then((res) => { |
| | | console.log(res, 1); |
| | | }); |
| | | adddata2(this.data2).then((res) => { |
| | | console.log(res, 2); |
| | | }); |
| | | var time = setTimeout(() => { |
| | | this.onLoad(this.page, this.query); |
| | | console.log(this.data0, this.data1, this.data2, "已刷新"); |
| | | }, 500); |
| | | this.tipover(); |
| | | }, |
| | | tip1up1() { |
| | | this.forms = 0; |
| | | }, |
| | | tip2up2() { |
| | | this.forms = 1; |
| | | }, |
| | | tipover() { |
| | | this.forms = -1; |
| | | this.obj0 = { |
| | | title0: "保安单位基本信息", |
| | | }; |
| | | this.obj1 = { |
| | | title1: "保安单位出资人员", |
| | | }; |
| | | this.obj2 = { |
| | | title2: "主要管理人员信息", |
| | | }; |
| | | this.data0 = {}; |
| | | this.data1 = {}; |
| | | this.data2 = {}; |
| | | this.noshehuibianma = 0; |
| | | this.nobumen = 0; |
| | | }, |
| | | panduanmeiyouziduan() { |
| | | if (this.noshehuibianma == 0) { |
| | | this.$message.warning("请输入统一社会信用代码"); |
| | | return true; |
| | | } |
| | | if (this.nobumen == 0) { |
| | | return false; |
| | | this.$message.warning("请选则部门"); |
| | | } |
| | | return false; |
| | | }, |
| | | }, |
| | | watch: { |
| | | haveID() { |
| | | // console.log(this.haveID); |
| | | if (this.haveID != undefined) { |
| | | if (this.haveID.length > 5) { |
| | | //统一社会信用代码判断 |
| | | this.noshehuibianma = 1; |
| | | } else { |
| | | this.noshehuibianma = 0; |
| | | } |
| | | } |
| | | }, |
| | | havedata() { |
| | | console.log(this.havedata, "qqqqq"); |
| | | }, |
| | | }, |
| | | mounted() {}, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .securityUnit { |
| | | width: 100%; |
| | | height: 100%; |
| | | // border: 1px solid #000; |
| | | box-sizing: border-box; |
| | | } |
| | | // .el-card__body { |
| | | // padding-bottom: 5px !important; |
| | | // } |
| | | // .avue-crud__tip, |
| | | // .el-tag, |
| | | // .el-tag--light { |
| | | // padding: 0 !important; |
| | | // } |
| | | |
| | | .lod { |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | width: 100%; |
| | | height: 100%; |
| | | background-color: rgba($color: #000000, $alpha: 0.5); |
| | | padding: 100px 0 0 0; |
| | | z-index: 500 !important; |
| | | display: flex; |
| | | // align-items: center; |
| | | justify-content: center; |
| | | .trees { |
| | | z-index: 501 !important; |
| | | position: absolute; |
| | | width: 15%; |
| | | top: 100px; |
| | | left: 0; |
| | | // display: none; |
| | | } |
| | | .lod-in { |
| | | width: 70%; |
| | | height: auto; |
| | | background-color: transparent; |
| | | |
| | | // padding: 10px 0 0 0; |
| | | } |
| | | |
| | | .el-collapse-item { |
| | | padding-top: 15px !important; |
| | | } |
| | | } |
| | | .el-collapse { |
| | | border-top: 1px solid transparent !important; |
| | | } |
| | | </style> |
| New file |
| | |
| | | <template> |
| | | <basic-container> |
| | | <div class="securityUnit"> |
| | | <avue-crud |
| | | :option="option" |
| | | :data="data" |
| | | :page.sync="page" |
| | | ref="crudrec" |
| | | @on-load="onLoad" |
| | | :table-loading="loading" |
| | | @row-save="rowSave" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @row-update="rowUpdate" |
| | | @row-del="rowDel" |
| | | @selection-change="selectionChange" |
| | | @refresh-change="refreshChange" |
| | | @row-click="rowClick" |
| | | > |
| | | <template slot-scope="{ type, size, row }" slot="menu"> |
| | | <el-button |
| | | :size="size" |
| | | :type="type" |
| | | @click="handleUploadPage(row)" |
| | | icon="el-icon-circle-check" |
| | | >附件上传 |
| | | </el-button> |
| | | </template> |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-plus" |
| | | size="small" |
| | | plain |
| | | @click.stop="rowSave" |
| | | >新增</el-button |
| | | > |
| | | |
| | | <el-button |
| | | type="danger" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-delete" |
| | | @click="handleDelete" |
| | | >删 除 |
| | | </el-button> |
| | | <el-button |
| | | type="success" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-upload2" |
| | | @click="handleImport1" |
| | | >批量导入 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <div class="lod" v-show="forms != -1"> |
| | | <div class="lod-in"> |
| | | <!-- <el-col class="trees" v-if="forms == 0"> |
| | | <div class="box"> |
| | | <el-scrollbar> |
| | | <basic-container> |
| | | <avue-tree |
| | | :option="treeOption" |
| | | :data="treeData" |
| | | @node-click="nodeClick" |
| | | /> |
| | | </basic-container> |
| | | </el-scrollbar> |
| | | </div> |
| | | </el-col> --> |
| | | <avue-form |
| | | ref="form" |
| | | v-model="obj0" |
| | | :option="option0" |
| | | v-if="forms == 0" |
| | | > |
| | | <template slot="menuForm"> |
| | | <el-button type="primary" @click="tip0">下一页</el-button> |
| | | <el-button type="info" @click="tipover">取消</el-button> |
| | | </template> |
| | | </avue-form> |
| | | <avue-form |
| | | ref="form1" |
| | | v-model="obj1" |
| | | :option="option1" |
| | | v-else-if="forms == 1" |
| | | > |
| | | <template slot="menuForm"> |
| | | <el-button type="primary" @click="tip1up1">上一页</el-button> |
| | | <el-button type="primary" @click="tip1">下一页</el-button> |
| | | <el-button type="info" @click="tipover">取消</el-button> |
| | | </template> |
| | | </avue-form> |
| | | <avue-form |
| | | ref="form2" |
| | | v-model="obj2" |
| | | :option="option2" |
| | | v-else-if="forms == 2" |
| | | > |
| | | <template slot="menuForm"> |
| | | <el-button type="primary" @click="tip2up2">上一页</el-button> |
| | | <el-button type="primary" @click="tip2">提交</el-button> |
| | | <el-button type="info" @click="tipover">取消</el-button> |
| | | </template> |
| | | </avue-form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-dialog |
| | | title="保安单位导入" |
| | | append-to-body |
| | | :visible.sync="excelBox1" |
| | | width="555px" |
| | | > |
| | | <avue-form |
| | | :option="excelOption1" |
| | | v-model="excelForm1" |
| | | :upload-after="uploadAfter1" |
| | | > |
| | | <template slot="excelTemplate"> |
| | | <el-button type="primary" @click="handleTemplate1"> |
| | | 点击下载<i class="el-icon-download el-icon--right"></i> |
| | | </el-button> |
| | | </template> |
| | | </avue-form> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { column, column0, column1, column2 } from "./data"; |
| | | import { |
| | | getdata, |
| | | adddata, |
| | | update, |
| | | remove, |
| | | adddata1, |
| | | adddata2, |
| | | getDeptLazyTree, |
| | | } from "@/api/securityUnit/securityUnit"; |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | data() { |
| | | var w = 160, |
| | | s = 12; |
| | | return { |
| | | excelBox1: false, |
| | | excelForm1: {}, |
| | | excelOption1: { |
| | | submitBtn: false, |
| | | emptyBtn: false, |
| | | column: [ |
| | | { |
| | | label: "文件上传", |
| | | prop: "excelFile", |
| | | type: "upload", |
| | | drag: true, |
| | | loadText: "文件上传中,请稍等", |
| | | span: 24, |
| | | propsHttp: { |
| | | res: "data", |
| | | }, |
| | | tip: "请上传 .xls,.xlsx 标准格式文件", |
| | | action: "/api/information/import-informaton", |
| | | }, |
| | | { |
| | | label: "模板下载", |
| | | prop: "excelTemplate", |
| | | formslot: true, |
| | | span: 24, |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | loading: true, //保安单位基本信息 |
| | | selectionList: [], |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | }, |
| | | |
| | | treeData: [], |
| | | treeOption: { |
| | | title: "我是标题", |
| | | filterText: "搜索关键字自定义", |
| | | defaultExpandAll: true, |
| | | addBtn: false, |
| | | menu: false, |
| | | size: "small", |
| | | formOption: { |
| | | labelWidth: 100, |
| | | column: [ |
| | | { |
| | | label: "自定义项", |
| | | prop: "label", |
| | | }, |
| | | ], |
| | | }, |
| | | props: { |
| | | labelText: "标题", |
| | | label: "title", |
| | | value: "id", |
| | | children: "children", |
| | | }, |
| | | }, |
| | | // treeOption: { |
| | | // nodeKey: "id", |
| | | // // lazy: true, |
| | | // // treeLoad: function (node, resolve) { |
| | | // // // const parentId = node.level === 0 ? 0 : node.data.id; |
| | | // // getDeptLazyTree().then((res) => { |
| | | // // resolve( |
| | | // // res.data.data.map((item) => { |
| | | // // console.log({ |
| | | // // ...item, |
| | | // // leaf: !item.hasChildren, |
| | | // // }); |
| | | // // return { |
| | | // // ...item, |
| | | // // leaf: !item.hasChildren, |
| | | // // }; |
| | | // // }) |
| | | // // ); |
| | | // // }); |
| | | // // }, |
| | | // addBtn: false, |
| | | // menu: false, |
| | | // size: "small", |
| | | // props: { |
| | | // labelText: "标题", |
| | | // label: "title", |
| | | // value: "value", |
| | | // children: "children", |
| | | // }, |
| | | // }, |
| | | |
| | | obj0: { |
| | | title0: "保安单位基本信息", |
| | | }, |
| | | option0: { |
| | | emptyBtn: false, |
| | | submitBtn: false, |
| | | gutter: 30, |
| | | column: column0, |
| | | }, |
| | | obj1: { |
| | | title1: "保安单位出资人员", |
| | | }, |
| | | option1: { |
| | | emptyBtn: false, |
| | | submitBtn: false, |
| | | gutter: 30, |
| | | column: column1, |
| | | }, |
| | | obj2: { |
| | | title2: "主要管理人员信息", |
| | | }, |
| | | option2: { |
| | | emptyBtn: false, |
| | | submitBtn: false, |
| | | gutter: 30, |
| | | column: column2, |
| | | }, |
| | | |
| | | forms: -1, |
| | | data0: {}, |
| | | data1: {}, |
| | | data2: {}, |
| | | b0: {}, |
| | | b1: {}, |
| | | b2: {}, |
| | | noshehuibianma: 0, |
| | | nobumen: 0, |
| | | |
| | | query: {}, |
| | | data: [], |
| | | option: { |
| | | index: true, |
| | | addBtn: false, |
| | | // card: true, |
| | | tip: false, |
| | | searchSize: "mini", |
| | | searchMenuSpan: 6, |
| | | height: 583, |
| | | menuWidth: 220, |
| | | align: "center", |
| | | selection: true, |
| | | column: column, |
| | | }, |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userInfo"]), |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.creditcode); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | ids1() { |
| | | let ids1 = []; |
| | | this.selectionList1.forEach((ele) => { |
| | | ids1.push(ele.id); |
| | | }); |
| | | return ids1.join(","); |
| | | }, |
| | | ids2() { |
| | | let ids2 = []; |
| | | this.selectionList2.forEach((ele) => { |
| | | ids2.push(ele.id); |
| | | }); |
| | | return ids2.join(","); |
| | | }, |
| | | haveID() { |
| | | return this.obj0.creditcode; |
| | | }, |
| | | }, |
| | | methods: { |
| | | handleImport1() { |
| | | this.excelBox1 = true; |
| | | }, |
| | | uploadAfter1(res, done, loading, column) { |
| | | window.console.log(column); |
| | | this.excelBox1 = false; |
| | | // this.refreshChange(); |
| | | done(); |
| | | }, |
| | | handleTemplate1() { |
| | | window.open(`/api/examSubjectChoices/export-template`); |
| | | }, |
| | | |
| | | // handleChangeTABS(column) { |
| | | // this.typeTABS = column; |
| | | // // this.$message.success(JSON.stringify(column)); |
| | | // if (column.prop == "tab1") { |
| | | // this.loading1 = false; |
| | | // this.loading2 = false; |
| | | // this.onLoad(this.page); |
| | | // } else if (column.prop == "tab2") { |
| | | // this.loading = false; |
| | | // this.loading2 = false; |
| | | // this.onLoad1(this.page1); //第二个表格不会自动执行 |
| | | // } else if (column.prop == "tab3") { |
| | | // this.loading1 = false; |
| | | // this.loading = false; |
| | | // this.onLoad2(this.page2); //第二个表格不会自动执行 |
| | | // } |
| | | // }, |
| | | //保安单位基本信息 |
| | | sizeChange(val) { |
| | | this.page1.currentPage = 1; |
| | | this.page1.pageSize = val; |
| | | // this.getData(); |
| | | this.onLoad(this.page, this.query); |
| | | // this.$message.success("行数" + val); |
| | | }, |
| | | currentChange(val) { |
| | | this.page1.currentPage = val; |
| | | // this.getData(); |
| | | this.onLoad(this.page, this.query); |
| | | // this.$message.success("页码" + val); |
| | | }, |
| | | rowSave(form, done, loading) { |
| | | // console.log("save1"); |
| | | this.forms = 0; |
| | | var that = this; |
| | | //先获取部门接口 |
| | | getDeptLazyTree().then((res) => { |
| | | var d = res.data.data; |
| | | that.treeData = d; |
| | | // console.log(d); |
| | | }); |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | delete row.tenantid; |
| | | delete row.regstsat; |
| | | console.log(row, 0); |
| | | 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(() => { |
| | | console.log(row); |
| | | return remove(row.creditcode, row.departmentid); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | }); |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据"); |
| | | return; |
| | | } |
| | | this.$confirm("确定批量将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | console.log(this.ids); |
| | | // return remove(this.ids); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | this.$refs.crudrec.toggleSelection(); |
| | | }); |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | rowClick(row) { |
| | | // console.log(row); |
| | | // row.identificationnumber; //统一社会信用代 码 |
| | | window.localStorage.setItem("danweidata", JSON.stringify(row)); |
| | | this.$router.push({ |
| | | path: "/securityUnitChild", |
| | | // redirect: { name: "foo" }, |
| | | query: { rowsecurity: "fromSecurity" }, |
| | | // params: { row: row.identificationnumber }, |
| | | }); |
| | | }, |
| | | //跳转到附近列表页面 |
| | | handleUploadPage(row) { |
| | | this.$router.push({ |
| | | path: `/resource/attachCopy`, |
| | | query: { |
| | | deptId: row.departmentid, |
| | | enterprisename: row.enterprisename, |
| | | }, |
| | | }); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | if (this.userInfo.role_id == "1414840172333842433") { |
| | | console.log("是公安add jurisdiction"); |
| | | params["jurisdiction"] = this.userInfo.jurisdiction; |
| | | } |
| | | params["stats"] = 4; |
| | | this.loading = true; |
| | | getdata( |
| | | 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; |
| | | window.localStorage.setItem("danweidataS", JSON.stringify(this.data)); |
| | | console.log(this.data); |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // nodeClick(data) {//分局 不在这添加 |
| | | // // this.treeDeptId = data.id; |
| | | // // this.page.currentPage = 1; |
| | | // // this.onLoad(this.page); |
| | | // // this.$message.success(JSON.stringify(data)); |
| | | // this.obj0["departmentid"] = data.title; |
| | | // this.obj1["departmentid"] = data.title; |
| | | // this.obj2["departmentid"] = data.title; |
| | | // this.obj0["useid"] = data.id; |
| | | // this.obj1["useid"] = data.id; |
| | | // this.obj2["useid"] = data.id; |
| | | // this.nobumen = 1; |
| | | // }, |
| | | tip0() { |
| | | if (this.panduanmeiyouziduan()) { |
| | | return; |
| | | } |
| | | var d = {}; |
| | | for (var k in this.obj0) { |
| | | for (var i in column0) { |
| | | if (k == column0[i].prop && k != "title0") { |
| | | d[k] = this.obj0[k]; |
| | | } |
| | | } |
| | | } |
| | | console.log(d); |
| | | for (var k in d) { |
| | | if (d[k] == "" || d[k] == undefined) { |
| | | console.log(k); |
| | | this.$message.warning("请检查表单是否填写完整!"); |
| | | return; |
| | | } |
| | | } |
| | | console.log(d, 0); |
| | | this.data0 = d; |
| | | this.forms = 1; |
| | | }, |
| | | tip1() { |
| | | if (this.panduanmeiyouziduan()) { |
| | | return; |
| | | } |
| | | var d = {}; |
| | | for (var k in this.obj1) { |
| | | for (var i in column1) { |
| | | if (k == column1[i].prop && k != "title1") { |
| | | d[k] = this.obj1[k]; |
| | | } |
| | | } |
| | | } |
| | | d["capital"] = d["capital2"]; |
| | | delete d["capital2"]; |
| | | // console.log(d); |
| | | for (var k in d) { |
| | | if (d[k] == "" || d[k] == undefined) { |
| | | console.log(k); |
| | | this.$message.warning("请检查表单是否填写完整!"); |
| | | return; |
| | | } |
| | | } |
| | | console.log(d, 1); |
| | | this.data1 = d; |
| | | this.forms = 2; |
| | | }, |
| | | tip2() { |
| | | if (this.panduanmeiyouziduan()) { |
| | | return; |
| | | } |
| | | var d = {}; |
| | | for (var k in this.obj2) { |
| | | for (var i in column2) { |
| | | if (k == column2[i].prop && k != "title2") { |
| | | d[k] = this.obj2[k]; |
| | | } |
| | | } |
| | | } |
| | | console.log(d); |
| | | d["cardid"] = d["cardid2"]; |
| | | delete d["cardid2"]; |
| | | d["cell"] = d["cell2"]; |
| | | delete d["cell2"]; |
| | | // d["shareholdingratio"] = d["shareholdingratio2"]; |
| | | // delete d["shareholdingratio2"]; |
| | | for (var k in d) { |
| | | if (d[k] == "" || d[k] == undefined) { |
| | | console.log(k); |
| | | this.$message.warning("请检查表单是否填写完整!"); |
| | | return; |
| | | } |
| | | } |
| | | console.log(d, 2); |
| | | this.data2 = d; |
| | | |
| | | // this.data0.departmentid = this.data0.useid; |
| | | // this.data1.departmentid = this.data1.useid; |
| | | // this.data2.departmentid = this.data2.useid; |
| | | // delete this.data0.useid; |
| | | // delete this.data1.useid; |
| | | // delete this.data2.useid; |
| | | |
| | | adddata(this.data0).then((res) => { |
| | | console.log(res, 0); |
| | | }); |
| | | adddata1(this.data1).then((res) => { |
| | | console.log(res, 1); |
| | | }); |
| | | adddata2(this.data2).then((res) => { |
| | | console.log(res, 2); |
| | | }); |
| | | var time = setTimeout(() => { |
| | | this.onLoad(this.page, this.query); |
| | | console.log(this.data0, this.data1, this.data2, "已刷新"); |
| | | }, 500); |
| | | this.tipover(); |
| | | }, |
| | | tip1up1() { |
| | | this.forms = 0; |
| | | }, |
| | | tip2up2() { |
| | | this.forms = 1; |
| | | }, |
| | | tipover() { |
| | | this.forms = -1; |
| | | this.obj0 = { |
| | | title0: "保安单位基本信息", |
| | | }; |
| | | this.obj1 = { |
| | | title1: "保安单位出资人员", |
| | | }; |
| | | this.obj2 = { |
| | | title2: "主要管理人员信息", |
| | | }; |
| | | this.data0 = {}; |
| | | this.data1 = {}; |
| | | this.data2 = {}; |
| | | this.noshehuibianma = 0; |
| | | this.nobumen = 0; |
| | | }, |
| | | panduanmeiyouziduan() { |
| | | if (this.noshehuibianma == 0) { |
| | | this.$message.warning("请输入统一社会信用代码"); |
| | | return true; |
| | | } |
| | | if (this.nobumen == 0) { |
| | | return false; |
| | | this.$message.warning("请选则部门"); |
| | | } |
| | | return false; |
| | | }, |
| | | }, |
| | | watch: { |
| | | haveID() { |
| | | // console.log(this.haveID); |
| | | if (this.haveID != undefined) { |
| | | if (this.haveID.length > 5) { |
| | | //统一社会信用代码判断 |
| | | this.noshehuibianma = 1; |
| | | } else { |
| | | this.noshehuibianma = 0; |
| | | } |
| | | } |
| | | }, |
| | | havedata() { |
| | | console.log(this.havedata, "qqqqq"); |
| | | }, |
| | | }, |
| | | mounted() {}, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .securityUnit { |
| | | width: 100%; |
| | | height: 100%; |
| | | // border: 1px solid #000; |
| | | box-sizing: border-box; |
| | | } |
| | | // .el-card__body { |
| | | // padding-bottom: 5px !important; |
| | | // } |
| | | // .avue-crud__tip, |
| | | // .el-tag, |
| | | // .el-tag--light { |
| | | // padding: 0 !important; |
| | | // } |
| | | |
| | | .lod { |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | width: 100%; |
| | | height: 100%; |
| | | background-color: rgba($color: #000000, $alpha: 0.5); |
| | | padding: 100px 0 0 0; |
| | | z-index: 500 !important; |
| | | display: flex; |
| | | // align-items: center; |
| | | justify-content: center; |
| | | .trees { |
| | | z-index: 501 !important; |
| | | position: absolute; |
| | | width: 15%; |
| | | top: 100px; |
| | | left: 0; |
| | | // display: none; |
| | | } |
| | | .lod-in { |
| | | width: 70%; |
| | | height: auto; |
| | | background-color: transparent; |
| | | |
| | | // padding: 10px 0 0 0; |
| | | } |
| | | |
| | | .el-collapse-item { |
| | | padding-top: 15px !important; |
| | | } |
| | | } |
| | | .el-collapse { |
| | | border-top: 1px solid transparent !important; |
| | | } |
| | | </style> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getList, add, remove, update,updateAudit } from "@/api/examapi/examination"; |
| | | import { |
| | | getList, |
| | | add, |
| | | remove, |
| | | update, |
| | | updateAudit, |
| | | } from "@/api/examapi/examination"; |
| | | import { auditColumn } from "./data"; |
| | | export default { |
| | | data() { |
| | |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: false, |
| | | border: true, //liu |
| | | index: true, |
| | | stripe: true, |
| | | viewBtn: true, |
| | |
| | | plain |
| | | icon="el-icon-folder-checked" |
| | | @click="handleBatchExam" |
| | | |
| | | >考试申请 |
| | | </el-button> |
| | | <el-button |
| | |
| | | </avue-form> |
| | | </el-dialog> |
| | | |
| | | |
| | | <el-dialog |
| | | title="考试申请" |
| | | append-to-body |
| | | :visible.sync="dialogExamFormVisible" |
| | | width="1000px" |
| | | @close='closeDialog' |
| | | @close="closeDialog" |
| | | > |
| | | <avue-form |
| | | ref="formExamApply" |
| | |
| | | update, |
| | | remove, |
| | | cancelTrain, |
| | | addExam |
| | | addExam, |
| | | } from "@/api/trainingRegistration/trainingRegistration"; |
| | | |
| | | export default { |
| | |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: false, |
| | | border: true, //liu |
| | | index: true, |
| | | stripe: true, |
| | | viewBtn: true, |
| | |
| | | }, |
| | | |
| | | handleTemplate() { |
| | | window.open( |
| | | `/api/trainingRegistration/export-template` |
| | | ); |
| | | window.open(`/api/trainingRegistration/export-template`); |
| | | }, |
| | | uploadAfter(res, done, loading, column) { |
| | | window.console.log(column); |
| | |
| | | editBtnText: "回复", |
| | | updateBtnText: "提交", |
| | | editTitle: "回复", |
| | | border: false, |
| | | border: true, //liu |
| | | index: true, |
| | | stripe: true, |
| | | viewBtn: true, |
| | |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: false, |
| | | border: true, //liu |
| | | addBtnText: "发起", |
| | | index: true, |
| | | stripe: true, |