| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud |
| | | :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page.sync="page" |
| | | :permission="permissionList" |
| | | :before-open="beforeOpen" |
| | | v-model="form" |
| | | ref="crud" |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | | @row-del="rowDel" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="permission.record_delete" |
| | | @click="handleDelete" |
| | | >删 除 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{ type, size, row }" slot="menu"> |
| | | <el-button |
| | | icon="icon-zhengjian" |
| | | :size="size" |
| | | :type="type" |
| | | class="zhengJian-icon" |
| | | @click.stop="handleCredentialsr(row)" |
| | | >附件查阅</el-button |
| | | > |
| | | <el-button |
| | | icon="el-icon-edit" |
| | | :size="size" |
| | | :type="type" |
| | | @click.stop="rowDel(row)" |
| | | >备案审批 |
| | | </el-button> |
| | | </template> |
| | | <template class="tdtype" slot-scope="{ row }" slot="type"> |
| | | <el-tag class="dtype"> |
| | | {{ row.type == "0" ? "通过" : row.type == "1" ? "不通过" : "待审核" }} |
| | | <i class="gz" v-if="row.type == '0'"></i> |
| | | <i class="yj" v-if="row.type == '1'"></i> |
| | | <i class="zc" v-if="row.type == '2'"></i> |
| | | </el-tag> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page.sync="page" |
| | | :permission="permissionList" |
| | | :before-open="beforeOpen" |
| | | v-model="form" |
| | | ref="crud" |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | | @row-del="rowDel" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | <template slot="menuLeft"> |
| | | <el-button type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="permission.record_delete" |
| | | @click="handleDelete">删 除 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{ type, size, row }" |
| | | slot="menu"> |
| | | <el-button icon="icon-zhengjian" |
| | | :size="size" |
| | | :type="type" |
| | | class="zhengJian-icon" |
| | | @click.stop="handleCredentialsr(row)">附件查阅</el-button> |
| | | <el-button icon="el-icon-edit" |
| | | :size="size" |
| | | :type="type" |
| | | v-show="row.type != 0 && row.type != 1" |
| | | @click.stop="rowDel(row)">备案审批 |
| | | </el-button> |
| | | <el-button icon="el-icon-edit" |
| | | :size="size" |
| | | :type="type" |
| | | v-show="row.type == 0" |
| | | @click.stop="rowPrint(row)">回执打印 |
| | | </el-button> |
| | | </template> |
| | | <template class="tdtype" |
| | | slot-scope="{ row }" |
| | | slot="type"> |
| | | <el-tag class="dtype"> |
| | | {{ row.type == "0" ? "通过" : row.type == "1" ? "不通过" : "待审核" }} |
| | | <i class="gz" |
| | | v-if="row.type == '0'"></i> |
| | | <i class="yj" |
| | | v-if="row.type == '1'"></i> |
| | | <i class="zc" |
| | | v-if="row.type == '2'"></i> |
| | | </el-tag> |
| | | </template> |
| | | </avue-crud> |
| | | |
| | | <el-dialog :visible.sync="dialogVisible" |
| | | :modal-append-to-body="false" |
| | | width="920px" |
| | | top="15vh"> |
| | | <div id="examine_box" |
| | | v-if="dialogVisible"> |
| | | <div class="exam-box"> |
| | | <h3>回执单</h3> |
| | | <p> |
| | | 南昌市公安局已收到 <span>{{ rowData == null ? '' : rowData.enterprisename }}</span> 的相关备案申请! |
| | | </p> |
| | | |
| | | <div class="examine-bottom"> |
| | | <ul> |
| | | <li> 审批单位:<span>南昌市公安局</span> </li> |
| | | <li> 日期:<span>{{ rowData == null ? '' : rowData.examinetime }}</span> </li> |
| | | </ul> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <span slot="footer" |
| | | class="dialog-footer"> |
| | | <el-button type="primary" |
| | | @click="Print">打 印</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | import { mapGetters } from "vuex"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | }, |
| | | selectionList: [], |
| | | option: { |
| | | height: "auto", |
| | | calcHeight: 30, |
| | | align: "center", |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | labelWidth: 130, |
| | | menuWidth: 280, |
| | | // border: true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: "社会信用代码", |
| | | prop: "creditcode", |
| | | hide: true, |
| | | minWidth: 110, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入统一社会信用代码", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "企业名称", |
| | | prop: "enterprisename", |
| | | overHidden: true, |
| | | width: 180, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入企业名称", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "法定代表人", |
| | | prop: "representative", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入法定代表人", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "成立日期", |
| | | prop: "establishtime", |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入成立日期", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "注册资本", |
| | | prop: "registeredcapital", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入注册资本", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "组织机构代码", |
| | | prop: "organizationcode", |
| | | hide: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入组织机构代码", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "工商注册号", |
| | | prop: "registrationnumber", |
| | | overHidden: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入工商注册号", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "纳税人识别号", |
| | | hide: true, |
| | | prop: "identificationnumber", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入纳税人识别号", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "企业类型", |
| | | prop: "enterprises", |
| | | overHidden: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入企业类型", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "注册地址", |
| | | prop: "address", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入注册地址", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "所属地区", |
| | | prop: "region", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入所属地区", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "登记机关", |
| | | prop: "registration", |
| | | overHidden: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入登记机关", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "所属行业", |
| | | prop: "industry", |
| | | overHidden: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入所属行业", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "所属机构", |
| | | prop: "deptid", |
| | | type: "select", |
| | | hide: true, |
| | | dicUrl: "/api/blade-system/dept/selectIn", |
| | | props: { |
| | | label: "deptname", |
| | | value: "deptid", |
| | | data () { |
| | | return { |
| | | dialogVisible: false, // 备案审批打印的 |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | }, |
| | | }, |
| | | selectionList: [], |
| | | option: { |
| | | height: "auto", |
| | | calcHeight: 30, |
| | | align: "center", |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | labelWidth: 130, |
| | | menuWidth: 280, |
| | | // border: true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: "社会信用代码", |
| | | prop: "creditcode", |
| | | hide: true, |
| | | minWidth: 110, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入统一社会信用代码", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "企业名称", |
| | | prop: "enterprisename", |
| | | overHidden: true, |
| | | width: 180, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入企业名称", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "法定代表人", |
| | | prop: "representative", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入法定代表人", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "成立日期", |
| | | prop: "establishtime", |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入成立日期", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "注册资本", |
| | | prop: "registeredcapital", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入注册资本", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "组织机构代码", |
| | | prop: "organizationcode", |
| | | hide: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入组织机构代码", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "工商注册号", |
| | | prop: "registrationnumber", |
| | | overHidden: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入工商注册号", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "纳税人识别号", |
| | | hide: true, |
| | | prop: "identificationnumber", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入纳税人识别号", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "企业类型", |
| | | prop: "enterprises", |
| | | overHidden: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入企业类型", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "注册地址", |
| | | prop: "address", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入注册地址", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "所属地区", |
| | | prop: "region", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入所属地区", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "登记机关", |
| | | prop: "registration", |
| | | overHidden: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入登记机关", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "所属行业", |
| | | prop: "industry", |
| | | overHidden: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入所属行业", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "所属机构", |
| | | prop: "deptid", |
| | | type: "select", |
| | | hide: true, |
| | | dicUrl: "/api/blade-system/dept/selectIn", |
| | | props: { |
| | | label: "deptname", |
| | | value: "deptid", |
| | | }, |
| | | }, |
| | | |
| | | { |
| | | label: "单位许可编号", |
| | | hide: true, |
| | | prop: "perid", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入服务单位许可编号", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "许可发证机关", |
| | | prop: "offices", |
| | | hide: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入许可发证机关", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "发证时间", |
| | | hide: true, |
| | | prop: "officetime", |
| | | type: "date", |
| | | format: "yyyy-MM-dd HH:mm:ss", |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入发证时间", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "单位许可编号", |
| | | hide: true, |
| | | prop: "perid", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入服务单位许可编号", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "许可发证机关", |
| | | prop: "offices", |
| | | hide: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入许可发证机关", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "发证时间", |
| | | hide: true, |
| | | prop: "officetime", |
| | | type: "date", |
| | | format: "yyyy-MM-dd HH:mm:ss", |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入发证时间", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | { |
| | | label: "审核状态", |
| | | prop: "type", |
| | | addDisplay: false, |
| | | type: "select", |
| | | dicData: [ |
| | | { |
| | | label: "通过", |
| | | value: "0", |
| | | }, |
| | | { |
| | | label: "不通过", |
| | | value: "1", |
| | | }, |
| | | { |
| | | label: "待审核", |
| | | value: "2", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "经营范围", |
| | | prop: "business", |
| | | component: "AvueUeditor", |
| | | hide: true, |
| | | minRows: 6, |
| | | span: 24, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入经营范围", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | }, |
| | | data: [], |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.record_add, false), |
| | | viewBtn: this.vaildData(this.permission.record_view, false), |
| | | delBtn: this.vaildData(this.permission.record_delete, false), |
| | | editBtn: this.vaildData(this.permission.record_edit, false), |
| | | }; |
| | | { |
| | | label: "审核状态", |
| | | prop: "type", |
| | | addDisplay: false, |
| | | type: "select", |
| | | dicData: [ |
| | | { |
| | | label: "通过", |
| | | value: "0", |
| | | }, |
| | | { |
| | | label: "不通过", |
| | | value: "1", |
| | | }, |
| | | { |
| | | label: "待审核", |
| | | value: "2", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "经营范围", |
| | | prop: "business", |
| | | component: "AvueUeditor", |
| | | hide: true, |
| | | minRows: 6, |
| | | span: 24, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入经营范围", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | }, |
| | | data: [], |
| | | rowData: null, |
| | | }; |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | }, |
| | | methods: { |
| | | handleCredentialsr(row) { |
| | | this.$router.push({ |
| | | path: "/attach/index", |
| | | // redirect: { name: "foo" }, |
| | | // query: { row: row }, |
| | | query: { deptid: row.deptid, type: "1" }, |
| | | // params: { row: row.identificationnumber }, |
| | | }); |
| | | }, |
| | | rowSave(row, done, loading) { |
| | | row.deptid = this.userInfo.dept_id; |
| | | add(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | computed: { |
| | | ...mapGetters(["permission"]), |
| | | permissionList () { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.record_add, false), |
| | | viewBtn: this.vaildData(this.permission.record_view, false), |
| | | delBtn: this.vaildData(this.permission.record_delete, false), |
| | | editBtn: this.vaildData(this.permission.record_edit, false), |
| | | }; |
| | | }, |
| | | (error) => { |
| | | loading(); |
| | | window.console.log(error); |
| | | } |
| | | ); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | ids () { |
| | | let ids = []; |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | (error) => { |
| | | loading(); |
| | | console.log(error); |
| | | } |
| | | ); |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定对选择的备案进行审批?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | row.type = "0"; |
| | | return update(row); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | }); |
| | | methods: { |
| | | Print () { |
| | | //打印 |
| | | let subOutputRankPrint = document.getElementById("examine_box"); |
| | | let newContent = subOutputRankPrint.innerHTML; |
| | | let oldContent = document.body.innerHTML; |
| | | document.body.innerHTML = newContent; |
| | | window.print(); |
| | | window.location.reload(); |
| | | document.body.innerHTML = oldContent; |
| | | }, |
| | | handleCredentialsr (row) { |
| | | this.$router.push({ |
| | | path: "/attach/index", |
| | | // redirect: { name: "foo" }, |
| | | // query: { row: row }, |
| | | query: { deptid: row.deptid, type: "1" }, |
| | | // params: { row: row.identificationnumber }, |
| | | }); |
| | | }, |
| | | rowSave (row, done, loading) { |
| | | row.deptid = this.userInfo.dept_id; |
| | | add(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | loading(); |
| | | window.console.log(error); |
| | | } |
| | | ); |
| | | }, |
| | | rowUpdate (row, index, done, loading) { |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | loading(); |
| | | console.log(error); |
| | | } |
| | | ); |
| | | }, |
| | | rowDel (row) { |
| | | this.$confirm("确定对选择的备案进行审批?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | row.type = "0"; |
| | | row.examinetime = this.getCurrentTime(); |
| | | return update(row); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | }); |
| | | }, |
| | | // 审批打印 |
| | | rowPrint (row) { |
| | | this.rowData = null; |
| | | this.rowData = row; |
| | | this.dialogVisible = true; |
| | | }, |
| | | getCurrentTime () { |
| | | let date = new Date(); |
| | | let dateYear = date.getFullYear(); //获取年 |
| | | let dateMonth = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : (date.getMonth() + 1); //获取月 |
| | | let dateDate = date.getDate() < 10 ? '0' + date.getDate() : date.getDate(); //获取当日 |
| | | |
| | | let dateHours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours(); //获取小时 |
| | | let dateMinutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes(); //获取分钟 |
| | | let dateSeconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds(); //获取秒 |
| | | |
| | | return dateYear + '-' + dateMonth + '-' + dateDate + ' ' + dateHours + ':' + dateMinutes + ':' + |
| | | dateSeconds |
| | | }, |
| | | handleDelete () { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据"); |
| | | return; |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }, |
| | | beforeOpen (done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetail(this.form.id).then((res) => { |
| | | this.form = res.data.data; |
| | | }); |
| | | } |
| | | done(); |
| | | }, |
| | | searchReset () { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | }, |
| | | searchChange (params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | selectionChange (list) { |
| | | this.selectionList = list; |
| | | }, |
| | | selectionClear () { |
| | | this.selectionList = []; |
| | | this.$refs.crud.toggleSelection(); |
| | | }, |
| | | currentChange (currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | }, |
| | | sizeChange (pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | }, |
| | | refreshChange () { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad (page, params = {}) { |
| | | this.loading = true; |
| | | getList( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.query) |
| | | ).then((res) => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | }, |
| | | rowStyle ({ row, column, rowIndex }) { |
| | | if (row.dtype != null && row.dtype != "") { |
| | | if (row.dtype == "2") { |
| | | return { |
| | | color: "#F34A4A", |
| | | }; |
| | | } |
| | | if (row.dtype == "1") { |
| | | return { |
| | | color: "#F48F57", |
| | | }; |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据"); |
| | | return; |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetail(this.form.id).then((res) => { |
| | | this.form = res.data.data; |
| | | }); |
| | | } |
| | | done(); |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | | this.$refs.crud.toggleSelection(); |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | getList( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.query) |
| | | ).then((res) => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | }, |
| | | rowStyle({ row, column, rowIndex }) { |
| | | if (row.dtype != null && row.dtype != "") { |
| | | if (row.dtype == "2") { |
| | | return { |
| | | color: "#F34A4A", |
| | | }; |
| | | } |
| | | if (row.dtype == "1") { |
| | | return { |
| | | color: "#F48F57", |
| | | }; |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .dtype { |
| | | width: 80px; |
| | | width: 80px; |
| | | } |
| | | |
| | | .dx { |
| | | position: absolute; |
| | | top: 50%; |
| | | margin-top: -5px; |
| | | margin-left: 6px; |
| | | width: 10px; |
| | | height: 10px; |
| | | border-radius: 30%; |
| | | background: #dfdfdf; |
| | | position: absolute; |
| | | top: 50%; |
| | | margin-top: -5px; |
| | | margin-left: 6px; |
| | | width: 10px; |
| | | height: 10px; |
| | | border-radius: 30%; |
| | | background: #dfdfdf; |
| | | } |
| | | .zc { |
| | | position: absolute; |
| | | top: 50%; |
| | | margin-top: -5px; |
| | | margin-left: 6px; |
| | | width: 10px; |
| | | height: 10px; |
| | | border-radius: 30%; |
| | | background: #29c093; |
| | | position: absolute; |
| | | top: 50%; |
| | | margin-top: -5px; |
| | | margin-left: 6px; |
| | | width: 10px; |
| | | height: 10px; |
| | | border-radius: 30%; |
| | | background: #29c093; |
| | | } |
| | | .yj { |
| | | position: absolute; |
| | | top: 50%; |
| | | margin-top: -5px; |
| | | margin-left: 6px; |
| | | width: 10px; |
| | | height: 10px; |
| | | border-radius: 30%; |
| | | background: #f34a4a; |
| | | position: absolute; |
| | | top: 50%; |
| | | margin-top: -5px; |
| | | margin-left: 6px; |
| | | width: 10px; |
| | | height: 10px; |
| | | border-radius: 30%; |
| | | background: #f34a4a; |
| | | } |
| | | .gz { |
| | | position: absolute; |
| | | top: 50%; |
| | | margin-top: -5px; |
| | | margin-left: 6px; |
| | | width: 10px; |
| | | height: 10px; |
| | | border-radius: 30%; |
| | | background: #f48f57; |
| | | position: absolute; |
| | | top: 50%; |
| | | margin-top: -5px; |
| | | margin-left: 6px; |
| | | width: 10px; |
| | | height: 10px; |
| | | border-radius: 30%; |
| | | background: #f48f57; |
| | | } |
| | | |
| | | .el-tag { |
| | | display: inline-block; |
| | | width: 80px; |
| | | /*padding-right: 40px !important;*/ |
| | | display: inline-block; |
| | | width: 80px; |
| | | /*padding-right: 40px !important;*/ |
| | | } |
| | | |
| | | .exam-box { |
| | | width: 100%; |
| | | height: 360px; |
| | | |
| | | position: relative; |
| | | padding: 10px; |
| | | background: #fff !important; |
| | | color: #000; |
| | | |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .exam-box h3 { |
| | | margin: 0; |
| | | text-align: center; |
| | | font-size: 28px; |
| | | letter-spacing: 10px; |
| | | line-height: 46px; |
| | | } |
| | | |
| | | .exam-box p { |
| | | text-indent: 2em; |
| | | font-size: 18px; |
| | | } |
| | | |
| | | .exam-box .examine-bottom { |
| | | position: absolute; |
| | | bottom: 10px; |
| | | right: 10px; |
| | | } |
| | | |
| | | .exam-box li { |
| | | list-style: none; |
| | | font-size: 18px; |
| | | line-height: 32px; |
| | | } |
| | | |
| | | .exam-box span { |
| | | text-decoration: underline; |
| | | } |
| | | </style> |