Browse Source

Merge branch 'master' into liua

* master:
  批阅进度详情
  ~
  ~
  提交
  ~
  科目批阅进度
  分值规则设置
la 1 year ago
parent
commit
28d6d584ff

+ 0 - 4
auto-imports.d.ts

@@ -12,8 +12,6 @@ declare global {
   const $shallowRef: typeof import('vue/macros')['$shallowRef']
   const $toRef: typeof import('vue/macros')['$toRef']
   const EffectScope: typeof import('vue')['EffectScope']
-  const ElMessage: typeof import('element-plus/es')['ElMessage']
-  const ElMessageBox: typeof import('element-plus/es')['ElMessageBox']
   const asyncComputed: typeof import('@vueuse/core')['asyncComputed']
   const autoResetRef: typeof import('@vueuse/core')['autoResetRef']
   const computed: typeof import('vue')['computed']
@@ -300,8 +298,6 @@ declare module 'vue' {
     readonly $shallowRef: UnwrapRef<typeof import('vue/macros')['$shallowRef']>
     readonly $toRef: UnwrapRef<typeof import('vue/macros')['$toRef']>
     readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
-    readonly ElMessage: UnwrapRef<typeof import('element-plus/es')['ElMessage']>
-    readonly ElMessageBox: UnwrapRef<typeof import('element-plus/es')['ElMessageBox']>
     readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']>
     readonly autoResetRef: UnwrapRef<typeof import('@vueuse/core')['autoResetRef']>
     readonly computed: UnwrapRef<typeof import('vue')['computed']>

+ 93 - 0
plugins/vite-plugin-conditional-compile.ts

@@ -0,0 +1,93 @@
+import type { FilterPattern, Plugin, ResolvedConfig } from 'vite'
+
+import MagicString from 'magic-string'
+import { createFilter } from 'vite'
+
+interface Options {
+  /**
+   * @default ["**\/*"]
+   */
+  include: FilterPattern
+  /**
+   * @default []
+   */
+  exclude: FilterPattern
+}
+
+type UserOptions = Partial<Options>
+
+type ResolvedOptions = Options
+let config: ResolvedConfig = undefined!
+
+const replaceMatched = (code: string, id: string) => {
+  const env = config.env
+  const source = new MagicString(code, {
+    filename: id,
+  })
+
+  source.replace(
+    /^.*?#if(n?)def\s*(\S+).*[\r\n]{1,2}([\s\S]+?)\s*.*?#endif.*?$/gm,
+    /**
+     * 条件替换
+     * @param _ 匹配的字符串
+     * @param $1 是否为 not 模式
+     * @param $2 条件
+     * @param $3 code
+     */
+    (_, $1, $2, $3) => {
+      const isNot = !!$1
+      const isKeep = $2.split('||').some((v: string) => {
+        let flag = false
+        const [key, value] = v.split('=')
+        if (value === undefined)
+          flag = !!env[key]
+
+        else
+          flag = String(env[key]) === value
+
+        flag = isNot ? !flag : flag
+        return flag
+      })
+      return isKeep ? $3 : ''
+    },
+  )
+
+  if (source.hasChanged()) {
+    return {
+      code: source.toString(),
+      map: source.generateMap({
+        source: id,
+        file: `${id}.map`,
+        includeContent: true,
+      }),
+    }
+  }
+}
+
+const resolveOptions = (userOptions: UserOptions): ResolvedOptions => {
+  return {
+    include: ['**/*'],
+    exclude: [],
+    ...userOptions,
+  }
+}
+
+const VitePluginConditionalCompile = (
+  userOptions: UserOptions = {},
+): Plugin => {
+  const options = resolveOptions(userOptions)
+  return {
+    name: 'vite-plugin-conditional-compile',
+    enforce: 'pre',
+    configResolved(_config) {
+      config = _config
+    },
+    transform(code, id) {
+      const filter = createFilter(options.include, options.exclude)
+      if (filter(id))
+        return replaceMatched(code, id)
+    },
+  }
+}
+
+export default VitePluginConditionalCompile

+ 35 - 6
src/pages/process/fjct/[ze_id]/[zs_id].vue

@@ -18,12 +18,18 @@
           <el-form-item label="答题卡别名" style="width: 620px">
             <el-input v-model="createForm.dtkbm" placeholder="请输入答题卡别名"/>
           </el-form-item>
-          <el-form-item label="及格分数" prop="jgfs" style="width: 620px">
-            <el-input v-model="createForm.jgfs" placeholder="请输入及格分数"/>
+          <el-form-item label="总分数" prop="zf" style="width: 620px">
+            <el-input v-model="createForm.zf" placeholder="请输入总分" @input="autoScore"/>
           </el-form-item>
-          <el-form-item label="优秀分数" prop="yxfs" style="width: 620px">
+          <el-form-item label="优秀分数" style="width: 620px">
             <el-input v-model="createForm.yxfs" placeholder="请输入优秀分数"/>
           </el-form-item>
+          <el-form-item label="及格分数" style="width: 620px">
+            <el-input v-model="createForm.jgfs" placeholder="请输入及格分数"/>
+          </el-form-item>
+          <el-form-item label="低分分数" style="width: 620px">
+            <el-input v-model="createForm.jgfs" placeholder="请输入及格分数"/>
+          </el-form-item>
           <el-form-item label="流程类型" prop="lclx" style="width: 620px">
             <el-radio-group v-model="createForm.lclx">
               <el-radio v-for="item in lc_type_list" :label="item.value">{{ item.label }}</el-radio>
@@ -221,8 +227,7 @@ const linkTo = (name) => {
 };
 const rules = $ref({
   dtkmc: [{required: true, message: '请输入答题卡名称', trigger: 'blur'}],
-  jgfs: [{required: true, message: '请输入及格分数', trigger: 'blur'}],
-  yxfs: [{required: true, message: '请输入优秀分数', trigger: 'blur'}],
+  zf: [{required: true, message: '请输入总分', trigger: 'blur'}],
   lclx: [{required: true, message: '请选择流程类型', trigger: 'change'}],
   fj_choose: [{required: true, message: '请选择阅卷流程', trigger: 'change'}],
 })
@@ -231,8 +236,10 @@ let createForm = $ref({
   xkmc: '',
   dtkmc: '',
   dtkbm: '',
+  zf:'',
   jgfs: '',
   yxfs: '',
+  dffs:'',
   lclx: '',
   fj_choose: '1'
 })
@@ -317,7 +324,9 @@ const handleSubmit = async (formEl) => {
             fj_choose: createForm.fj_choose,
             fj_content: fileList,
             ze_pass_score: createForm.jgfs,
-            ze_max_score: createForm.yxfs
+            ze_max_score: createForm.yxfs,
+            shijuan_score:createForm.zf,
+            ze_min_score: createForm.dffs
           }
         }).then(res => {
           if (res.code === '1') {
@@ -359,8 +368,10 @@ function getDetail() {
       createForm.xkmc = res.data.one_info.ze_xueke_name;
       createForm.dtkmc = res.data.one_info.zs_name;
       createForm.dtkbm = res.data.one_info.zs_alias;
+      createForm.zf = res.data.one_info.shijuan_score;
       createForm.jgfs = res.data.one_info.ze_pass_score;
       createForm.yxfs = res.data.one_info.ze_max_score;
+      createForm.dffs = res.data.one_info.ze_min_score;
       createForm.lclx = res.data.one_info.zs_lctype;
       if (res.data.one_info.fj_choose === '0') {
         createForm.fj_choose = '1';
@@ -574,6 +585,24 @@ function imgShow(item) {
   imgPreview = item.fj_content;
   showPreview = true;
 }
+function autoScore() {
+  if(createForm.zf !== '' && !isNaN(parseFloat(createForm.zf)) && isFinite(createForm.zf)) {
+    request({
+      url: "/yzy/ksjh/fjct_auto_calc",
+      data: {
+        ze_id: ze_id,
+        score: createForm.zf
+      },
+    }).then((res) => {
+      if (res.code === "1") {
+        createForm.yxfs = res.data.ze_max_score;
+        createForm.jgfs = res.data.ze_pass_score;
+        createForm.dffs = res.data.ze_min_score;
+      }
+    })
+  }
+
+}
 </script>
 
 <style lang="scss">

+ 90 - 10
src/pages/process/index.vue

@@ -86,7 +86,7 @@
                   <div class="more-list">
                     <ul>
                       <li :class="item.btn_check.btn_jyysz != '1'?'disabled':''">教研员设置</li>
-                      <li :class="item.btn_check.btn_jsgzsz != '1'?'disabled':''">分数计算规则设置</li>
+                      <li :class="item.btn_check.btn_jsgzsz != '1'?'disabled':''" @click="editJfgz(item)">分数计算规则设置</li>
                       <li :class="item.btn_check.btn_smpyjd != '1'?'disabled':''" @click="linkTo({name:'process-smpyjd-ykj_id',params:{ykj_id:item.ykj_id}})">扫描批阅进度</li>
                       <li :class="item.btn_check.btn_ksfx != '1'?'disabled':''" @click="linkTo({name:'ksfx-cjfx_cjd-ykj_id',params:{ykj_id:item.ykj_id}})">考试分析</li>
                       <li :class="item.btn_check.btn_sc != '1'?'disabled':''" @click="delProject(item)">删除</li>
@@ -116,7 +116,7 @@
                     </div>
                   </div>
                 </li>
-                <li class="cursor-pointer" @click="addSubject(item,index)">
+                <li class="cursor-pointer" @click="addSubject(item,index)" v-if="item.btn_check.btn_edit == '1'">
                   <div class="subject-add-btn"></div>
                 </li>
               </ul>
@@ -169,29 +169,52 @@
       <div class="flex pl-80px mt-10px items-center">
         <h4 class="text-14px leading-40px">优秀分数:</h4>
         <h4 class="ml-10px text-14px leading-40px">总分的</h4>
-        <input type="text" class="ml-10px mr-5px set-in w-50px">
+        <input type="text" class="ml-10px mr-5px set-in w-50px" v-model="jfgz.yxfs.start">
         <h4 class="text-14px leading-40px">% {{'<='}}  学生分数 {{'<='}} 总分的</h4>
-        <input type="text" class="ml-10px mr-5px set-in w-50px">
+        <input type="text" class="ml-10px mr-5px set-in w-50px" v-model="jfgz.yxfs.end">
         %
       </div>
       <div class="mt-10px flex pl-80px mt-10px items-center">
         <h4 class="text-14px leading-40px">及格分数:</h4>
         <h4 class="ml-10px text-14px leading-40px">总分的</h4>
-        <input type="text" class="ml-10px mr-5px set-in w-50px">
+        <input type="text" class="ml-10px mr-5px set-in w-50px" v-model="jfgz.jgfs.start">
         <h4 class="text-14px leading-40px">% {{'<='}}  学生分数 {{'<='}} 总分的</h4>
-        <input type="text" class="ml-10px mr-5px set-in w-50px">
+        <input type="text" class="ml-10px mr-5px set-in w-50px" v-model="jfgz.jgfs.end">
         %
       </div>
       <div class="mt-10px flex pl-80px mt-10px items-center">
         <h4 class="text-14px leading-40px">低分分数:</h4>
         <h4 class="ml-10px text-14px leading-40px">总分的</h4>
-        <input type="text" class="ml-10px mr-5px set-in w-50px">
+        <input type="text" class="ml-10px mr-5px set-in w-50px" v-model="jfgz.dffs.start">
         <h4 class="text-14px leading-40px">% {{'<='}}  学生分数 {{'<='}} 总分的</h4>
-        <input type="text" class="ml-10px mr-5px set-in w-50px">
+        <input type="text" class="ml-10px mr-5px set-in w-50px" v-model="jfgz.dffs.end">
         %
       </div>
       <h4 class="pl-70px mt-40px text-14px font-bold">实考成绩分析规则设置</h4>
-
+      <div class="flex mt-15px pl-30px">
+        <h4 class="w-120px text-14px leading-40px text-right">总得分分值</h4>
+        <input type="text" class="ml-10px set-in w-225px" v-model="jfgz.zdffz">
+      </div>
+      <div class="flex mt-15px pl-30px">
+        <h4 class="w-120px text-14px leading-40px text-right">平均分得分占比</h4>
+        <input type="text" class="ml-10px set-in w-225px" v-model="jfgz.pjfdfzb">
+        <h4 class="ml-10px text-14px leading-40px">%</h4>
+      </div>
+      <div class="flex mt-15px pl-30px">
+        <h4 class="w-120px text-14px leading-40px text-right">优秀率得分占比</h4>
+        <input type="text" class="ml-10px set-in w-225px" v-model="jfgz.yxldfzb">
+        <h4 class="ml-10px text-14px leading-40px">%</h4>
+      </div>
+      <div class="flex mt-15px pl-30px">
+        <h4 class="w-120px text-14px leading-40px text-right">及格率得分占比</h4>
+        <input type="text" class="ml-10px set-in w-225px" v-model="jfgz.jgldfzb">
+        <h4 class="ml-10px text-14px leading-40px">%</h4>
+      </div>
+      <h4 class="pl-160px mt-10px text-12px text-hex-FF0000" v-if="Number(jfgz.pjfdfzb)+ Number(jfgz.yxldfzb) + Number(jfgz.jgldfzb) !== 100">三个得分占比和需为100!</h4>
+      <div class="mt-80px flex justify-center">
+        <button type="button" class="set-btn cancel" @click="set_pop = false">取消</button>
+        <button type="button" class="ml-45px set-btn sub" @click="jfgzSub">确定</button>
+      </div>
     </div>
   </div>
   <commonFooter/>
@@ -252,6 +275,8 @@ let add_sub = $ref({
   value:'',
   label:''
 })
+let jfgz = $ref({});
+let ykj_id = $ref('');
 let isSubmit = $ref(false)
 let add_ykj_id = $ref('')
 function getSubject() {
@@ -412,7 +437,46 @@ function delProject(item) {
 function toReview(item) {
   window.location.href = window.GLOBAL_CONFIG.yzy+'webapps/page/single-review-liankao.html?ze_id='+item.ze_id;
 }
-let set_pop = $ref(false)
+let set_pop = $ref(false);
+function editJfgz(item) {
+  jfgz = JSON.parse(item.ykj_jfgz);
+  ykj_id = item.ykj_id;
+  set_pop = true;
+}
+function jfgzSub() {
+  if(jfgz.yxfs.start === ''|| jfgz.yxfs.end === '' || jfgz.jgfs.start === '' || jfgz.jgfs.end === '' || jfgz.dffs.start === '' || jfgz.dffs.end === '' || jfgz.zdffz === '' || jfgz.pjfdfzb === '' || jfgz.yxldfzb === '' || jfgz.jgldfzb === '') {
+    ElMessage({
+      type: "warning",
+      message: "值不能为空!",
+    });
+  } else if(Number(jfgz.pjfdfzb)+ Number(jfgz.yxldfzb) + Number(jfgz.jgldfzb) !== 100) {
+    ElMessage({
+      type: "warning",
+      message: "三个得分占比和需为100!",
+    });
+  } else {
+    let params = {
+      issubmit:'1',
+      ykj_id:ykj_id,
+      yzy_ksjh:{
+        ykj_jfgz:JSON.stringify(jfgz)
+      }
+    }
+    request({
+      url: "/yzy/ksjh/edit",
+      data: params,
+    }).then((res) => {
+      if (res.code === '1') {
+        ElMessage({
+          type: "success",
+          message: "分数计算规则修改成功!",
+        });
+        set_pop = false;
+        getListData();
+      }
+    })
+  }
+}
 </script>
 <style lang="scss" scoped>
 $color: #0048e5;
@@ -752,5 +816,21 @@ $color: #0048e5;
     font-size: 14px;
     text-align: center;
   }
+  .set-btn{
+    width: 100px;
+    height: 40px;
+    font-size: 14px;
+    border-radius: 2px;
+    background: #fff;
+    &.cancel{
+      border: 1px solid #bfbfbf;
+      color: #1C1C1C;
+    }
+    &.sub{
+      background: #0148E5;
+      color: #fff;
+    }
+  }
 }
+
 </style>

+ 176 - 0
src/pages/process/kmpyjdxq/[ykj_id]/[subject_id].vue

@@ -0,0 +1,176 @@
+<script setup>
+import request from "~/utils/request";
+import {REQUEST} from "~/utils/request";
+import {user} from "~/store";
+import {useRouter} from "vue-router";
+const router = useRouter();
+const route = useRoute();
+const linkTo = (obj) => {
+  router.push(obj);
+};
+let ykj_id = $ref('');
+let subject_id = $ref('');
+let detail = $ref({});
+let sm_id = $ref('');
+let school_list = $ref([])
+let subject_list = $ref([])
+function getFilterData() {
+  let data = {
+    ykj_id: ykj_id
+  };
+  request({
+    url: "/yzy/ksjh/detail",
+    data: data,
+  }).then((res) => {
+    if (res.code === '1') {
+      subject_list = res.data.one_info.ykj_kskm_ex;
+      school_list = res.data.one_info.ykj_lkxx_ex;
+    }
+  })
+}
+function getData() {
+  let data = {
+    ykj_id: ykj_id,
+    ysdt_subjectid:subject_id,
+    sm_id:sm_id
+  };
+  request({
+    url: "/yzy/jspyjd/kmpy_detail",
+    data: data,
+  }).then((res) => {
+    if (res.code === '1') {
+      detail = res.data;
+
+    }
+
+  })
+}
+if (route.params.ykj_id) {
+  ykj_id = route.params.ykj_id;
+  subject_id = route.params.subject_id;
+  getData();
+  getFilterData();
+}
+</script>
+<route lang="json">
+{
+"meta":{
+"title":"科目批阅进度详情",
+"breadcrumb":true
+}
+}
+</route>
+<template>
+  <NavHeader/>
+  <bread-crumb/>
+  <div class="w-1200px m-auto">
+    <div class="relative -mt-40px flex justify-end">
+      <button type="button" class="back-btn" @click="linkTo({name:'process-pyjd-ykj_id',params:{ykj_id:ykj_id}})">返回</button>
+    </div>
+    <div class="mt-10px w-full bg-hex-fff py-20px min-h-700px px-15px">
+      <h3 class="mb-20px text-18px text-center">{{detail.jh_name}}</h3>
+      <div class="mt-20px flex items-center justify-between">
+        <div>
+          <el-select v-model="sm_id" placeholder="全部学校" size="large" @change="getData">
+            <el-option label="全部" value=""
+            />
+            <el-option
+              v-for="item in school_list"
+              :key="item.sm_id"
+              :label="item.sm_name"
+              :value="item.sm_id"
+            />
+          </el-select>
+        </div>
+        <ul class="sub-nav">
+          <li v-for="item in sub_nav" :class="item.id === cur_sub.id?'selected':''" @click="switchSub(item)">{{item.name}}</li>
+        </ul>
+      </div>
+      <h4 class="mt-30px text-16px text-hex-0148E5">{{detail.xueke_name}}—详情</h4>
+      <div class="mt-25px" v-if="detail.list && detail.list.length > 0">
+        <table class="data-table" cellpadding="0" cellspacing="0">
+          <tr>
+            <th>题目</th>
+            <th>批阅进度</th>
+            <th>总份数</th>
+            <th>完成量</th>
+            <th>异常数</th>
+            <th>平均分</th>
+            <th>满分</th>
+            <th>在线人数</th>
+          </tr>
+          <tr v-for="item in detail.list">
+            <td>{{item.hq_id}}</td>
+            <td>{{item.jd}}</td>
+            <td>{{item.zfs}}</td>
+            <td>{{item.wcl}}</td>
+            <td>{{item.ycs}}</td>
+            <td>{{item.pjf}}</td>
+            <td>{{item.mf}}</td>
+            <td>{{item.zxrs}}</td>
+          </tr>
+        </table>
+      </div>
+      <div class="mt-25px no-data" v-else>
+        <div>
+          <h3 class="no-data-img"></h3>
+          <h4 class="mt-25px text-18px text-hex-0048e5 text-center">暂无数据</h4>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<style scoped lang="scss">
+$color: #0048e5;
+.data-table {
+  width: 100%;
+  table-layout: fixed;
+
+  tr:nth-child(even) {
+    background: #F1F7FF;
+  }
+
+  th {
+    padding: 15px 0;
+    background: $color;
+    font-weight: normal;
+    text-align: center;
+    font-size: 16px;
+    color: #fff;
+    &:first-child{
+      border-radius: 6px 0 0 0;
+      text-align: left;
+      padding-left: 30px;
+    }
+    &:last-child{
+      border-radius: 0 6px 0 0;
+    }
+  }
+
+  td {
+    padding: 15px 0;
+    font-size: 16px;
+    color: #474747;
+    text-align: center;
+    &:first-child{
+      text-align: left;
+      padding-left: 30px;
+    }
+  }
+}
+
+.no-data {
+  width: 100%;
+  height: 450px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+
+  .no-data-img {
+    width: 233px;
+    height: 199px;
+    background: url("/images/no-data.png") center no-repeat;
+  }
+}
+</style>

+ 120 - 1
src/pages/process/pyjd/[id]/[bh].vue

@@ -9,6 +9,36 @@ const linkTo = (obj) => {
   router.push(obj);
 };
 let ykj_id = $ref('');
+let bh = $ref('');
+let detail = $ref({});
+let total_list = $ref([]);
+function getData() {
+  let data = {
+    ykj_id: ykj_id,
+    ysdt_pyyhbh:bh
+  };
+  request({
+    url: "/yzy/jspyjd/py_detail",
+    data: data,
+  }).then((res) => {
+    if (res.code === '1') {
+      detail = res.data;
+      total_list = res.data.list.reduce((prev, cur) => {
+          const ysdt_pydf = cur.ysdt_pydf;
+          ysdt_pydf.forEach((item, index) => {
+            prev[index] = (prev[index] || 0) + Number(item);
+          });
+          return prev;
+        }, []);
+    }
+
+  })
+}
+if (route.params.id) {
+  ykj_id = route.params.id;
+  bh = route.params.bh;
+  getData();
+}
 </script>
 <route lang="json">
 {
@@ -23,11 +53,100 @@ let ykj_id = $ref('');
   <bread-crumb/>
   <div class="w-1200px m-auto">
     <div class="relative -mt-40px flex justify-end">
-      <button type="button" class="back-btn" @click="linkTo({name:'process'})">返回</button>
+      <button type="button" class="back-btn" @click="linkTo({name:'process-pyjd-ykj_id',params:{ykj_id:ykj_id}})">返回</button>
+    </div>
+    <div class="mt-10px w-full bg-hex-fff py-20px min-h-700px px-15px">
+      <h3 class="mb-20px text-18px text-center">{{detail.jh_name}}</h3>
+      <h4 class="text-16px text-hex-0148E5">{{detail.tacher_name}}老师—批阅详情</h4>
+      <div class="mt-25px" v-if="detail.list && detail.list.length > 0">
+        <table class="data-table" cellpadding="0" cellspacing="0">
+          <tr>
+            <th v-for="(item,index) in detail.titles">
+              <div v-if="index === 0">
+                <h3 class="text-16px text-hex-ffffff">{{item.th}}/</h3>
+                <h3 class="mt-8px text-16px text-hex-ffffff">{{item.mf}}</h3>
+              </div>
+              <div v-else>
+                <h3 class="text-16px text-hex-ffffff">{{item.th}}</h3>
+                <h3 class="mt-8px text-16px text-hex-ffffff">【满分{{item.mf}}】</h3>
+              </div>
+            </th>
+          </tr>
+          <tr v-for="item in detail.list">
+            <td>{{item.username}}</td>
+            <td v-for="items in item.ysdt_pydf">{{items}}</td>
+          </tr>
+          <tr>
+            <td>
+              <h3 class="text-16px text-hex-ff0000">合计平均分</h3>
+
+            </td>
+            <td v-for="item in total_list">
+              <h3 class="text-16px text-hex-ff0000">{{(item/detail.list.length).toFixed(1)}}</h3>
+            </td>
+          </tr>
+        </table>
+      </div>
+      <div class="mt-25px no-data" v-else>
+        <div>
+          <h3 class="no-data-img"></h3>
+          <h4 class="mt-25px text-18px text-hex-0048e5 text-center">暂无数据</h4>
+        </div>
+      </div>
     </div>
   </div>
 </template>
 
 <style scoped lang="scss">
+$color: #0048e5;
+.data-table {
+  width: 100%;
+  table-layout: fixed;
+
+  tr:nth-child(even) {
+    background: #F1F7FF;
+  }
 
+  th {
+    padding: 15px 0;
+    background: $color;
+    font-weight: normal;
+    text-align: center;
+    font-size: 16px;
+    color: #fff;
+    &:first-child{
+      border-radius: 6px 0 0 0;
+      text-align: left;
+      padding-left: 30px;
+    }
+    &:last-child{
+      border-radius: 0 6px 0 0;
+    }
+  }
+
+  td {
+    padding: 15px 0;
+    font-size: 16px;
+    color: #474747;
+    text-align: center;
+    &:first-child{
+      text-align: left;
+      padding-left: 30px;
+    }
+  }
+}
+
+.no-data {
+  width: 100%;
+  height: 450px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+
+  .no-data-img {
+    width: 233px;
+    height: 199px;
+    background: url("/images/no-data.png") center no-repeat;
+  }
+}
 </style>

+ 16 - 13
src/pages/process/pyjd/[ykj_id].vue

@@ -6,6 +6,7 @@ import {user} from "~/store";
 import {useRouter} from "vue-router";
 const router = useRouter();
 const route = useRoute();
+console.log(router,8)
 const linkTo = (obj) => {
   router.push(obj);
 };
@@ -19,8 +20,8 @@ let teacherData = $ref([])
 let subjectData = $ref([]);
 let barTeacher = $ref([]);
 let barPercent = $ref([]);
-let barUnusual = $ref(['缺考','学号异常','页码异常','缺考异常','客观题异常','选择题异常','判断题异常','填空题异常']);
-let barUnData = $ref([40,70,100,70,70,70,80,90])
+let barSubject = $ref([]);
+let barSubjectData = $ref([]);
 let sub_nav = [{
   id:'1',
   name:'教师批阅情况'
@@ -61,6 +62,9 @@ function getData() {
       teacherData = res.data.data1.list;
       barTeacher = res.data.data1.users;
       barPercent = res.data.data1.values;
+      barSubject = res.data.data2.users;
+      barSubjectData = res.data.data2.values;
+      subjectData = res.data.data2.list;
       if (cur_sub.id === '1') {
         nextTick(() => {
           initChart();
@@ -72,7 +76,6 @@ function getData() {
         })
 
       }
-
     }
   })
 }
@@ -179,7 +182,7 @@ function initUnChart() {
           color:'#6897FF',
           borderRadius: [16, 16, 0, 0]
         },
-        data: barUnData
+        data: barSubjectData
       }
     ]
   });
@@ -295,16 +298,16 @@ onMounted(() => {
             <th>操作</th>
           </tr>
           <tr v-for="item in subjectData">
-            <td>{{item.ze_xueke_name}}</td>
-            <td>{{item.scan_percent}}</td>
-            <td>{{item.student_num}}</td>
-            <td>{{item.scan_num}}</td>
-            <td>{{item.qks}}</td>
-            <td>{{item.xhycs}}</td>
-            <td>{{item.ymycs}}</td>
-            <td>{{item.qkycs}}</td>
+            <td>{{item.xueke}}</td>
+            <td>{{item.jd}}</td>
+            <td>{{item.zfs}}</td>
+            <td>{{item.wcl}}</td>
+            <td>{{item.ycs}}</td>
+            <td>{{item.pjf}}</td>
+            <td>{{item.mf}}</td>
+            <td>{{item.zxrs}}</td>
             <td>
-              <button type="button" class="op-btn">查看详情</button>
+              <button type="button" class="op-btn" @click="linkTo({name:'process-kmpyjdxq-ykj_id-subject_id',params:{ykj_id:ykj_id,subject_id:item.subject_id}})">查看详情</button>
             </td>
           </tr>
         </table>

+ 169 - 0
src/pages/process/ysb/[ykl_id]/[ze_id].vue

@@ -0,0 +1,169 @@
+<script setup>
+import {useRouter} from "vue-router";
+import request from "~/utils/request";
+import {REQUEST} from "~/utils/request";
+import {user} from "~/store";
+
+const router = useRouter();
+const route = useRoute();
+const linkTo = (obj) => {
+  router.push(obj);
+};
+let ykl_id = $ref('')
+let ze_id = $ref('')
+let detail = $ref({})
+let dialogVisible = $ref(false)
+let detailData = $ref([])
+function getDetail() {
+  request({
+    url: "/yzy/scan/alyz",
+    data: {
+      ze_id: ze_id
+    },
+  }).then((res) => {
+    if (res.code === '1') {
+      detail = res.data;
+    }
+  })
+}
+function showDetail(item) {
+   dialogVisible = true;
+   detailData = item.detail;
+}
+if (route.params.ze_id) {
+  ze_id = route.params.ze_id;
+  ykl_id = route.params.ykl_id;
+  getDetail();
+}
+</script>
+
+<template>
+  <NavHeader/>
+  <bread-crumb/>
+  <div class="w-1200px m-auto">
+    <div class="relative -mt-40px flex justify-end">
+      <button type="button" class="back-btn" @click="linkTo({name:'step-id',params:{id:ykl_id}})">返回</button>
+    </div>
+    <div class="mt-10px w-full bg-hex-fff min-h-700px py-20px px-15px">
+      <h3 class="text-18px">试卷名称:{{ detail.ze_name }}</h3>
+      <h4 class="mt-25px text-18px text-hex-0148E5">扫描上传压缩包情况:{{detail.zip_num}} / {{detail.total}}</h4>
+      <div class="mt-25px" v-if="detail.list.length > 0">
+        <table class="data-table" cellpadding="0" cellspacing="0">
+          <tr>
+            <th>上传考点名称</th>
+            <th>最近更新时间</th>
+            <th>上传压缩包数量</th>
+            <th>上传详情</th>
+          </tr>
+          <tr v-for="item in detail.list">
+            <td>{{item.sm_name}}</td>
+            <td>{{item.last_time}}</td>
+            <td>{{item.zip_num}}</td>
+            <td>
+              <button type="button" class="op-btn" @click="showDetail(item)">查看</button>
+            </td>
+          </tr>
+        </table>
+      </div>
+      <div class="mt-25px no-data" v-else>
+        <div>
+          <h3 class="no-data-img"></h3>
+          <h4 class="mt-25px text-18px text-hex-0048e5 text-center">暂无数据</h4>
+        </div>
+      </div>
+    </div>
+
+  </div>
+  <commonFooter/>
+  <el-dialog v-model="dialogVisible" title="上传详情"
+             width="650px"
+             custom-class="dialogTrick"
+             append-to-body>
+    <div class="w-full max-h-600px overflow-auto">
+      <table class="data-table" cellpadding="0" cellspacing="0">
+        <tr>
+          <th>姓名</th>
+          <th>账号</th>
+          <th>上传份数</th>
+        </tr>
+        <tr v-for="item in detailData">
+          <td>{{item.realname}}</td>
+          <td>{{item.username}}</td>
+          <td>{{item.zip_num}}</td>
+        </tr>
+      </table>
+    </div>
+
+  </el-dialog>
+</template>
+<route lang="json">
+{
+"meta":{
+"title":"压缩包上传情况",
+"breadcrumb":true
+}
+}
+</route>
+<style scoped lang="scss">
+$color: #0048e5;
+.data-table {
+  width: 100%;
+  table-layout: fixed;
+
+  tr:nth-child(even) {
+    background: #F1F7FF;
+  }
+
+  th {
+    height: 74px;
+    background: $color;
+    font-weight: normal;
+    text-align: center;
+    font-size: 16px;
+    color: #fff;
+    &:first-child{
+      border-radius: 6px 0 0 0;
+    }
+    &:last-child{
+      border-radius: 0 6px 0 0;
+    }
+  }
+
+  td {
+    padding: 15px 0;
+    font-size: 16px;
+    color: #474747;
+    text-align: center;
+  }
+}
+
+.no-data {
+  width: 100%;
+  height: 450px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+
+  .no-data-img {
+    width: 233px;
+    height: 199px;
+    background: url("/images/no-data.png") center no-repeat;
+  }
+}
+.op-btn {
+  width: 50px;
+  height: 30px;
+  background: #fff;
+  border: 1px solid #003eee;
+  border-radius: 2px;
+  font-size: 14px;
+  color: #003eee;
+  text-align: center;
+  &:disabled{
+    background: #ccc;
+    border-color: #ccc;
+    color: #fff;
+    pointer-events: none;
+  }
+}
+</style>

+ 37 - 28
src/pages/step/[id].vue

@@ -17,6 +17,8 @@ const server = (await request({
   },
 })).data.one_info
 
+const isCreateUser = server.create_user_id === user.value.user_id
+
 const ykl_lc = Object.assign(JSON.parse(Object.assign(server.ykl_lc)), { ykl_id })
 console.log('ykl_lc : ', ykl_lc)
 sessionStorage.setItem('ykl_lc', JSON.stringify(ykl_lc))
@@ -32,22 +34,22 @@ const steps = reactive(
             {
               title: '出题组卷',
               children: [
-                { title: '章节知识点出题', optional: true, disabled: true, description: '选择相应的章节知识点从题库中选取题目组成试卷' },
-                { title: '智能出题', optional: true, disabled: true, description: '填写题型数量难易度等信息系统自动生成试卷' },
-                { title: '附件出题', optional: true, description: '根据上传附件试卷进行考试' },
+                { title: '章节知识点出题', optional: true, disabled: true, description: '选择相应的章节知识点从题库中选取题目组成试卷', ifCreateUser: true },
+                { title: '智能出题', optional: true, disabled: true, description: '填写题型数量难易度等信息系统自动生成试卷', ifCreateUser: true },
+                { title: '附件出题', optional: true, description: '根据上传附件试卷进行考试', ifCreateUser: true },
               ],
             },
             {
               title: '预划考号区域',
               children: [
-                { title: '预划考号区域', optional: false, description: '根据试题内容格式制作相应的答题卡样式' },
+                { title: '预划考号区域', optional: false, description: '根据试题内容格式制作相应的答题卡样式', ifCreateUser: true },
                 { title: '考场设置(可选)', optional: true, description: '根据学生考场分配情况上传' },
               ],
             },
             {
               title: '预划流程完成',
               children: [
-                { title: '预划流程完成', optional: false, description: '试卷内容和答题卡已确认,可进行下一步' },
+                { title: '预划流程完成', optional: false, description: '试卷内容和答题卡已确认,可进行下一步', ifCreateUser: true },
               ],
             },
           ],
@@ -70,7 +72,7 @@ const steps = reactive(
             {
               title: '制作答题卡',
               children: [
-                { title: '制作答题卡', optional: false, description: '根据试题内容格式制作相应的答题卡样式' },
+                { title: '制作答题卡', optional: false, description: '根据试题内容格式制作相应的答题卡样式', ifCreateUser: true },
               ],
             },
           ],
@@ -98,7 +100,7 @@ const steps = reactive(
             {
               title: '批阅任务分配',
               children: [
-                { title: '批阅任务分配', optional: false, description: '对阅卷老师分配批阅任务' },
+                { title: '批阅任务分配', optional: false, description: '对阅卷老师分配批阅任务', ifCreateUser: true },
               ],
             },
             {
@@ -115,19 +117,19 @@ const steps = reactive(
             {
               title: '成绩发布',
               children: [
-                { title: '成绩发布', optional: false, description: '成绩汇总发布到分析平台' },
+                { title: '成绩发布', optional: false, description: '成绩汇总发布到分析平台', ifCreateUser: true },
               ],
             },
             {
               title: '修改成绩',
               children: [
-                { title: '修改成绩', optional: false, description: '考试成绩发布后三天内可修改' },
+                { title: '修改成绩', optional: false, description: '考试成绩发布后三天内可修改', ifCreateUser: true },
               ],
             },
             {
               title: '考试关闭',
               children: [
-                { title: '考试关闭', optional: false, description: '最后考试结束关闭考试' },
+                { title: '考试关闭', optional: false, description: '最后考试结束关闭考试', ifCreateUser: true },
               ],
             },
           ],
@@ -140,22 +142,22 @@ const steps = reactive(
             {
               title: '出题组卷',
               children: [
-                { title: '章节知识点出题', optional: true, disabled: true, description: '选择相应的章节知识点从题库中选取题目组成试卷' },
-                { title: '智能出题', optional: true, disabled: true, description: '填写题型数量难易度等信息系统自动生成试卷' },
-                { title: '附件出题', optional: true, description: '根据上传附件试卷进行考试' },
+                { title: '章节知识点出题', optional: true, disabled: true, description: '选择相应的章节知识点从题库中选取题目组成试卷', ifCreateUser: true },
+                { title: '智能出题', optional: true, disabled: true, description: '填写题型数量难易度等信息系统自动生成试卷', ifCreateUser: true },
+                { title: '附件出题', optional: true, description: '根据上传附件试卷进行考试', ifCreateUser: true },
               ],
             },
             {
               title: '制作答题卡',
               children: [
-                { title: '制作答题卡', optional: false, description: '根据试题内容格式制作相应的答题卡样式' },
+                { title: '制作答题卡', optional: false, description: '根据试题内容格式制作相应的答题卡样式', ifCreateUser: true },
                 { title: '考场设置(可选)', optional: true, description: '根据学生考场分配情况上传' },
               ],
             },
             {
               title: '组卷流程完成',
               children: [
-                { title: '组卷流程完成', optional: false, description: '试卷内容和答题卡已确认,可进行下一步' },
+                { title: '组卷流程完成', optional: false, description: '试卷内容和答题卡已确认,可进行下一步', ifCreateUser: true },
               ],
             },
           ],
@@ -184,7 +186,7 @@ const steps = reactive(
             {
               title: '批阅任务分配',
               children: [
-                { title: '批阅任务分配', optional: false, description: '对阅卷老师分配批阅任务' },
+                { title: '批阅任务分配', optional: false, description: '对阅卷老师分配批阅任务', ifCreateUser: true },
               ],
             },
             {
@@ -201,19 +203,19 @@ const steps = reactive(
             {
               title: '成绩发布',
               children: [
-                { title: '成绩发布', optional: false, description: '成绩汇总发布到分析平台' },
+                { title: '成绩发布', optional: false, description: '成绩汇总发布到分析平台', ifCreateUser: true },
               ],
             },
             {
               title: '修改成绩',
               children: [
-                { title: '修改成绩', optional: false, description: '考试成绩发布后三天内可修改' },
+                { title: '修改成绩', optional: false, description: '考试成绩发布后三天内可修改', ifCreateUser: true },
               ],
             },
             {
               title: '考试关闭',
               children: [
-                { title: '考试关闭', optional: false, description: '最后考试结束关闭考试' },
+                { title: '考试关闭', optional: false, description: '最后考试结束关闭考试', ifCreateUser: true },
               ],
             },
           ],
@@ -356,23 +358,29 @@ function handleValidTask(currentStep: number, idx: number, idy: number) {
   }
 }
 
-function beforeClickTask(gid: number, pid: number, idy: number) {
-  const continueDoTask = true
+function judgeIfContinueDoTask(gid: number, pid: number, idy: number) {
+  const currentTask = steps[gid].children[pid].children[idy]
+  const continueDoTask = !currentTask.ifCreateUser || isCreateUser
   if (!continueDoTask) {
     ElMessage({
-      message: '无权操作',
+      message: '只有考试创建人才能操作',
       type: 'warning',
       grouping: true,
     })
   }
-  else {
-    return handleValidTask(gid, pid, idy)
-  }
   return continueDoTask
 }
 
+function beforeClickTask(gid: number, pid: number, idy: number) {
+  const continueDoTask = judgeIfContinueDoTask(gid, pid, idy)
+  if (!continueDoTask)
+    return false
+  else
+    return handleValidTask(gid, pid, idy)
+}
+
 function judgeTaskCanClick(gid: number, pid: number, idy: number) {
-  const continueDoTask = true
+  const continueDoTask = judgeIfContinueDoTask(gid, pid, idy)
   if (!continueDoTask) {
     return false
   }
@@ -500,7 +508,7 @@ const TaskEventMap: { [key: string]: () => void } = {
     handleCompleteTaskAuto()
   },
   // 先划块后上传 老流程
-  '启动客户端': () => {
+  '连接扫描仪': () => {
     window.open(`BozeduYuejuan://${user.value.token},${ykl_lc.ze_id},${window.GLOBAL_CONFIG.yzy}`, '_blank')
     handleCompleteTaskAuto()
   },
@@ -674,7 +682,8 @@ const TaskEventMap: { [key: string]: () => void } = {
                       :class="task.disabled ? 'cursor-not-allowed' : 'cursor-pointer'"
                       @click="beforeClickTask(currentStep, idx, idy) && (TaskEventMap[task.title] ? TaskEventMap[task.title]() : handleCompleteTaskAuto())"
                     >
-                      {{ judgeStepCompleted(stepsReactiveMap[currentStep][idx][idy]) ? '已经完成' : task.disabled ? '暂未开放' : '立即开始'
+                      {{ judgeStepCompleted(stepsReactiveMap[currentStep][idx][idy]) ? '已经完成' : task.disabled ? '暂未开放'
+                        : '立即开始'
                       }}
                     </div>
                   </template>

+ 120 - 120
src/store/index.ts

@@ -1,136 +1,136 @@
-import type {IUser} from './user'
+import type { IUser } from './user'
 
 // 以下代码在build时自动移除,无需手动注释
 // #ifdef DEV
 localStorage.setItem('userInfo', JSON.stringify({
-  "user_id": "213558",
-  "user_name": "bozuser69",
-  "email": "无",
-  "lastlogintime": "2023-05-10 13:35:31",
-  "regdate": "2020-04-14 14:01:11",
-  "status": "0",
-  "user_role_id": "69",
-  "user_role_name": "区县管理员",
-  "user_avatar": {
-    "big": "https://openapi.dev.bozedu.net/template/default/static/img/avatar_teacher_big.png",
-    "middle": "https://openapi.dev.bozedu.net/template/default/static/img/avatar_teacher_middle.png",
-    "small": "https://openapi.dev.bozedu.net/template/default/static/img/avatar_teacher_small.png"
+  user_id: '213558',
+  user_name: 'bozuser69',
+  email: '无',
+  lastlogintime: '2023-05-10 13:35:31',
+  regdate: '2020-04-14 14:01:11',
+  status: '0',
+  user_role_id: '69',
+  user_role_name: '区县管理员',
+  user_avatar: {
+    big: 'https://openapi.dev.bozedu.net/template/default/static/img/avatar_teacher_big.png',
+    middle: 'https://openapi.dev.bozedu.net/template/default/static/img/avatar_teacher_middle.png',
+    small: 'https://openapi.dev.bozedu.net/template/default/static/img/avatar_teacher_small.png',
   },
-  "user_no": {"no_title": "学号", "no": ""},
-  "token": "f842MX83zJZkuqk8Q_blBD9kmZDaNkpzn70vbQkWvsWiqN9F63l4EXuwvfs_bjql3aSG9jkkBF08YOxGjL1cvM_a7_bk8gs",
-  "user_realname": "博智测试区县",
-  "user_phone": "",
-  "idcard": "",
-  "gender": "1",
-  "gender_char": "男",
-  "qq": "无",
-  "nationality": "",
-  "intro": "",
-  "address": "",
-  "education": "",
-  "area_info": {
-    "area_id1": "10",
-    "area_id2": "166",
-    "area_id3": "2074",
-    "area_id4": "0",
-    "area_id1_char": "江苏省",
-    "area_id2_char": "苏州市",
-    "area_id3_char": "相城区",
-    "area_id4_char": "",
-    "area_code1": "320000000000",
-    "area_code2": "320500000000",
-    "area_code3": "320507000000",
-    "area_code4": "",
-    "area_code_dist": "320507000000"
+  user_no: { no_title: '学号', no: '' },
+  token: 'f842MX83zJZkuqk8Q_blBD9kmZDaNkpzn70vbQkWvsWiqN9F63l4EXuwvfs_bjql3aSG9jkkBF08YOxGjL1cvM_a7_bk8gs',
+  user_realname: '博智测试区县',
+  user_phone: '',
+  idcard: '',
+  gender: '1',
+  gender_char: '男',
+  qq: '无',
+  nationality: '',
+  intro: '',
+  address: '',
+  education: '',
+  area_info: {
+    area_id1: '10',
+    area_id2: '166',
+    area_id3: '2074',
+    area_id4: '0',
+    area_id1_char: '江苏省',
+    area_id2_char: '苏州市',
+    area_id3_char: '相城区',
+    area_id4_char: '',
+    area_code1: '320000000000',
+    area_code2: '320500000000',
+    area_code3: '320507000000',
+    area_code4: '',
+    area_code_dist: '320507000000',
   },
-  "sm_info": {
-    "sm_id": "0",
-    "sm_name": "",
-    "adminid": "0",
-    "is_org": "0",
-    "up_org": "0",
-    "area_id1": "0",
-    "area_id2": "0",
-    "area_id3": "0",
-    "area_id4": "0",
-    "major_mode": "0",
-    "powers": {"vip_shiti": "1", "vip_sucai": "1", "vip_aicheck": "1"}
+  sm_info: {
+    sm_id: '0',
+    sm_name: '',
+    adminid: '0',
+    is_org: '0',
+    up_org: '0',
+    area_id1: '0',
+    area_id2: '0',
+    area_id3: '0',
+    area_id4: '0',
+    major_mode: '0',
+    powers: { vip_shiti: '1', vip_sucai: '1', vip_aicheck: '1' },
   },
-  "cm_info": [],
-  "first_cm_id": "",
-  "first_cm_name": "",
-  "related_desc": "全部",
-  "bind3rd": {"wechat": "0"},
-  "my_org": [],
-  "org_info": {
-    "org": null,
-    "org_id": null,
-    "telephone": "",
-    "telephone_short": "",
-    "is_org": "1",
-    "up_org": null,
-    "up_org_name": null,
-    "up_org_info": {"sm_id": "", "sm_name": ""}
+  cm_info: [],
+  first_cm_id: '',
+  first_cm_name: '',
+  related_desc: '全部',
+  bind3rd: { wechat: '0' },
+  my_org: [],
+  org_info: {
+    org: null,
+    org_id: null,
+    telephone: '',
+    telephone_short: '',
+    is_org: '1',
+    up_org: null,
+    up_org_name: null,
+    up_org_info: { sm_id: '', sm_name: '' },
   },
-  "pan": {"unit": "G", "size": "0", "used": "0.00", "desc": "无限制"},
-  "safe_tips": ["您的密码安全程度较低,请立即修改", "必须包含数字、字母大小写或者特殊字符,长度8位及以上"],
-  "update_center": "https://openapi.dev.bozedu.net",
-  "base_url": {
-    "aboutus": "https://openapi.dev.bozedu.net/aboutus",
-    "file": "https://openapi.dev.bozedu.net",
-    "vpn": "http://vpn.dev.bozedu.net",
-    "uc": "https://uc.dev.bozedu.net",
-    "yzy": "https://yzy.dev.bozedu.net",
-    "kzkt": "https://openapi.dev.bozedu.net",
-    "openapi": "https://openapi.dev.bozedu.net",
-    "site_zhkt_api": "http://120.26.51.195:8008",
-    "yxxt": "https://yxxt.dev.bozedu.net"
+  pan: { unit: 'G', size: '0', used: '0.00', desc: '无限制' },
+  safe_tips: ['您的密码安全程度较低,请立即修改', '必须包含数字、字母大小写或者特殊字符,长度8位及以上'],
+  update_center: 'https://openapi.dev.bozedu.net',
+  base_url: {
+    aboutus: 'https://openapi.dev.bozedu.net/aboutus',
+    file: 'https://openapi.dev.bozedu.net',
+    vpn: 'http://vpn.dev.bozedu.net',
+    uc: 'https://uc.dev.bozedu.net',
+    yzy: 'https://yzy.dev.bozedu.net',
+    kzkt: 'https://openapi.dev.bozedu.net',
+    openapi: 'https://openapi.dev.bozedu.net',
+    site_zhkt_api: 'http://120.26.51.195:8008',
+    yxxt: 'https://yxxt.dev.bozedu.net',
   },
-  "role_system": {
-    "kzkt": {
-      "code": "kzkt",
-      "name": "空中课堂",
-      "icon": "",
-      "cate": "1",
-      "type": "1",
-      "url": "https://openapi.dev.bozedu.net"
+  role_system: {
+    kzkt: {
+      code: 'kzkt',
+      name: '空中课堂',
+      icon: '',
+      cate: '1',
+      type: '1',
+      url: 'https://openapi.dev.bozedu.net',
     },
-    "yzy": {
-      "code": "yzy",
-      "name": "作业系统",
-      "icon": "",
-      "cate": "1",
-      "type": "1",
-      "url": "https://yzy.dev.bozedu.net"
+    yzy: {
+      code: 'yzy',
+      name: '作业系统',
+      icon: '',
+      cate: '1',
+      type: '1',
+      url: 'https://yzy.dev.bozedu.net',
+    },
+    zhkt: {
+      code: 'zhkt',
+      name: '智慧课堂',
+      icon: '',
+      cate: '1',
+      type: '2',
+      url: 'http://120.26.51.195:8008/desadmin.php',
     },
-    "zhkt": {
-      "code": "zhkt",
-      "name": "智慧课堂",
-      "icon": "",
-      "cate": "1",
-      "type": "2",
-      "url": "http://120.26.51.195:8008/desadmin.php"
-    }
   },
-  "user_score": "70",
-  "product": ["课堂", "直播", "作业"],
-  "app_url": {
-    "A119": "https://qqyxt.m.dev.bozedu.net/page/course/tskc_more.html",
-    "A120": "https://qqyxt.m.dev.bozedu.net/page/my/msg_hybrid.html?id=31",
-    "A121": "https://qqyxt.m.dev.bozedu.net/page/parent/msg.html",
-    "A122": "https://qqyxt.m.dev.bozedu.net/page/my/integral_hybrid.html",
-    "A123": "https://qqyxt.m.dev.bozedu.net/ktfx/xqbg.html",
-    "A124": "https://qqyxt.m.dev.bozedu.net/page/my/footPrint.html",
-    "A125": "https://qqyxt.m.dev.bozedu.net/page/my/intergralMall.html",
-    "A126": "https://openapi.dev.bozedu.net/component/ebook_main/public",
-    "A127": "https://qqyxt.m.dev.bozedu.net/Course_registration/transfer.html?v=1",
-    "A128": "https://qqyxt.m.dev.bozedu.net/Course_registration/transfer.html?type=course_after_service",
-    "A129": "https://qqyxt.m.dev.bozedu.net/ktfx/xqbg.html?tab=1",
-    "A130": "https://qqyxt.m.dev.bozedu.net/ktfx/xqbg.html?tab=2",
-    "A131": "https://qqyxt.m.dev.bozedu.net/ktfx/xqbg.html?tab=3",
-    "A132": "https://qqyxt.m.dev.bozedu.net/ktfx/xqbg.html?tab=4"
+  user_score: '70',
+  product: ['课堂', '直播', '作业'],
+  app_url: {
+    A119: 'https://qqyxt.m.dev.bozedu.net/page/course/tskc_more.html',
+    A120: 'https://qqyxt.m.dev.bozedu.net/page/my/msg_hybrid.html?id=31',
+    A121: 'https://qqyxt.m.dev.bozedu.net/page/parent/msg.html',
+    A122: 'https://qqyxt.m.dev.bozedu.net/page/my/integral_hybrid.html',
+    A123: 'https://qqyxt.m.dev.bozedu.net/ktfx/xqbg.html',
+    A124: 'https://qqyxt.m.dev.bozedu.net/page/my/footPrint.html',
+    A125: 'https://qqyxt.m.dev.bozedu.net/page/my/intergralMall.html',
+    A126: 'https://openapi.dev.bozedu.net/component/ebook_main/public',
+    A127: 'https://qqyxt.m.dev.bozedu.net/Course_registration/transfer.html?v=1',
+    A128: 'https://qqyxt.m.dev.bozedu.net/Course_registration/transfer.html?type=course_after_service',
+    A129: 'https://qqyxt.m.dev.bozedu.net/ktfx/xqbg.html?tab=1',
+    A130: 'https://qqyxt.m.dev.bozedu.net/ktfx/xqbg.html?tab=2',
+    A131: 'https://qqyxt.m.dev.bozedu.net/ktfx/xqbg.html?tab=3',
+    A132: 'https://qqyxt.m.dev.bozedu.net/ktfx/xqbg.html?tab=4',
   },
-  "cpm_access_level": "3"
+  cpm_access_level: '3',
 }))
 // #endif
 

+ 7 - 5
vite.config.ts

@@ -11,10 +11,11 @@ import AutoImport from 'unplugin-auto-import/vite'
 import VueMacros from 'unplugin-vue-macros/vite'
 import Icons from 'unplugin-icons/vite'
 import IconsResolver from 'unplugin-icons/resolver'
+import ConditionalCompile from './plugins/vite-plugin-conditional-compile'
 
-export default defineConfig(({command}) => {
+export default defineConfig(({ command }) => {
   const cfg = {
-    base:'',
+    base: '',
     resolve: {
       alias: {
         '~/': `${path.resolve(__dirname, 'src')}/`,
@@ -23,6 +24,7 @@ export default defineConfig(({command}) => {
       },
     },
     plugins: [
+      ConditionalCompile(),
       VueMacros({
         plugins: {
           vue: Vue({
@@ -68,11 +70,11 @@ export default defineConfig(({command}) => {
       environment: 'jsdom',
     },
   }
-  if(command === 'build') {
+  if (command === 'build') {
     cfg.base = '/webapps/page/liankao/'
     return cfg
-  } else {
+  }
+  else {
     return cfg
   }
-
 })