123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 |
- <template>
- <div>
- <BaseDialog
- width="990px"
- :isShow.sync="isDialog"
- title="题库记录"
- :isShowFooter="false"
- @close="close"
- >
- <div style="max-height: 600px; overflow-y: auto;padding: 3px;">
- <table-list
- rowKey="id"
- ref="tableList"
- :tableSets="tableSet"
- :tableData="tableData"
- :navText="navText"
- :loading="loading"
- >
- <template slot="customize">
- <el-button type="warning" @click="openAddDialog"> 新增 </el-button>
- </template>
- <template slot="btn" slot-scope="props">
- <el-button type="text" @click="del(props.scope.row)"
- >删除</el-button
- >
- </template>
- </table-list>
- </div>
- <!-- 新增弹窗 -->
- <addQuestionBankDialog ref="addQuestionBankDialog" @refresh="refresh()" />
- </BaseDialog>
- </div>
- </template>
-
- <script>
- import tableList from "@/components/tableList";
- import addQuestionBankDialog from "./addQuestionBankDialog.vue";
- export default {
- components: { tableList, addQuestionBankDialog },
- data() {
- return {
- isDialog: false,
- loading: false,
- navText: {
- title: "开通记录",
- index: 0,
- ch: "条",
- addHide: true,
- custom: false,
- },
- tableSet: [
- {
- label: "",
- prop: "sign",
- hidden: true,
- },
- {
- label: "姓名",
- prop: "userName",
- hidden: true,
- },
- {
- label: "身份证号",
- prop: "userCard",
- hidden: true,
- width: "180"
- },
- {
- label: "教育类型",
- prop: "eduName",
- hidden: true,
- },
- {
- label: "业务层次",
- prop: "businessName",
- hidden: true,
- width: "300"
- },
- {
- label: "专业",
- prop: "majorName",
- hidden: true,
- },
- {
- label: "开通日期",
- prop: "openDate",
- scope: "aTimeList",
- hidden: true,
- isDiszing: true,
- width: "180"
- },
- ],
- tableData: [],
- total: 0,
- };
- },
- mounted() {},
- methods: {
- openBoxs(row, type) {
- this.isDialog = true;
- this.ruleForm = {
- orderGoodsId: row.orderGoodsId,
- orderSn: row.orderSn,
- userCard: row.userCard,
- userName: row.userName,
- }
- this.search()
- },
- close() {
- this.ruleForm = {};
- },
- openAddDialog() {
- this.$refs.addQuestionBankDialog.openBoxs(this.ruleForm)
- },
- search(v) {
- this.loading = true;
- this.$api
- .orderQuestionBankList(this.ruleForm)
- .then((res) => {
- this.tableData = res.data;
- this.navText.index = res.data?.length;
- })
- .finally(() => {
- this.loading = false;
- });
- },
- refresh() {
- this.$emit("refresh");
- this.search();
- },
- del(v) {
- this.$confirm("确定删除此内容?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- this.$api
- .delOrderQuestionBank(v.id)
- .then((res) => {
- this.$message.success("删除成功");
- this.search();
- });
- })
- .catch(() => {});
- },
- },
- };
- </script>
-
- <style lang="scss" scoped>
- .text {
- white-space: pre-wrap;
- overflow-wrap: break-word;
- }
- </style>
-
|