Browse Source

学生综合素质添加德育评价

bzkf30 1 year ago
parent
commit
a5f2415df7

BIN
src/assets/bg.png


BIN
src/assets/icon-BMI.png


BIN
src/assets/icon-backrun.png


BIN
src/assets/icon-ball.png


BIN
src/assets/icon-heart.png


BIN
src/assets/icon-jump.png


BIN
src/assets/icon-longrun.png


BIN
src/assets/icon-lung.png


BIN
src/assets/icon-pullup.png


BIN
src/assets/icon-scale.png


BIN
src/assets/icon-shortrun.png


BIN
src/assets/icon-sit.png


BIN
src/assets/icon-situp.png


BIN
src/assets/icon-skip.png


BIN
src/assets/icon-vision.png


+ 11 - 14
src/pages/xdjx/kcpzgl/xsgl.vue

@@ -98,6 +98,7 @@ const handleTableColBtn_edit = async (scope: { row: TYPE_TABLE_FIELD }) => {
   const res = await detailApi(scope.row[TABLE_KEY]);
   dialogForm_Data.value = res.data.one_info;
   dialogVisible_addOrEdit.value = true;
+  initAddClass(dialogForm_Data.value.grade_id);
 };
 const handleTableColBtn_audit = (scope: { row: TYPE_TABLE_FIELD }) => {
   whichDialogSubmit = "edit";
@@ -343,22 +344,18 @@ async function initClass() {
 }
 
 const addClassData = ref([]);
-watch(
-  () => dialogForm_Data.value.grade_id,
-  (newValue, oldValue) => {
-    addClassData.value = [];
-    dialogForm_Data.value.class_id = "";
-    if (newValue) {
-      initAddClass();
-    }
-  },
-  { immediate: true }
-);
+function handleGradeChange(data) {
+  addClassData.value = [];
+  dialogForm_Data.value.class_id = "";
+  if (data) {
+    initAddClass(data);
+  }
+}
 
-async function initAddClass() {
+async function initAddClass(grade_id) {
   let res = await request({
     url: "/jcxx/class/index",
-    data: { grade_id: dialogForm_Data.value.grade_id, limit: "100" },
+    data: { grade_id: grade_id, limit: "100" },
   });
   if (res.code == 1) {
     addClassData.value = res.data.page_data;
@@ -453,7 +450,7 @@ function initClassName(val) {
         <remote-cascader-class v-model="dialogForm_Data.class_id" v-model:modelName="dialogForm_Data.class_name" v-model:gradeId="dialogForm_Data.grade_id" v-model:gradeName="dialogForm_Data.grade_name"></remote-cascader-class>
       </el-form-item> -->
       <el-form-item label="年级:" prop="grade_id">
-        <remote-select to="grade" v-model="dialogForm_Data.grade_id" v-model:modelName="dialogForm_Data.grade_name"></remote-select>
+        <remote-select to="grade" v-model="dialogForm_Data.grade_id" v-model:modelName="dialogForm_Data.grade_name" @change="handleGradeChange"></remote-select>
       </el-form-item>
       <el-form-item label="班级:" prop="class_id">
         <el-select v-model="dialogForm_Data.class_id" placeholder="请选择" @change="initClassName" clearable style="width: 100%;">

+ 11 - 14
src/pages/xdjx/xszhsz/cxddgl/index.vue

@@ -109,6 +109,7 @@ const handleTableColBtn_edit = async (scope: { row: TYPE_TABLE_FIELD }) => {
   const res = await detailApi(scope.row[TABLE_KEY]);
   dialogForm_Data.value = res.data.one_info;
   dialogVisible_addOrEdit.value = true;
+  initAddClass(dialogForm_Data.value.grade_id);
 };
 const handleTableColBtn_audit = (scope: { row: TYPE_TABLE_FIELD }) => {
   whichDialogSubmit = "edit";
@@ -407,22 +408,18 @@ async function initClass() {
 }
 
 const addClassData = ref([]);
-watch(
-  () => dialogForm_Data.value.grade_id,
-  (newValue, oldValue) => {
-    addClassData.value = [];
-    dialogForm_Data.value.class_id = "";
-    if (newValue) {
-      initAddClass();
-    }
-  },
-  { immediate: true }
-);
+function handleGradeChange(data) {
+  addClassData.value = [];
+  dialogForm_Data.value.class_id = "";
+  if (data) {
+    initAddClass(data);
+  }
+}
 
-async function initAddClass() {
+async function initAddClass(grade_id) {
   let res = await request({
     url: "/jcxx/class/index",
-    data: { grade_id: dialogForm_Data.value.grade_id, limit: "100" },
+    data: { grade_id: grade_id, limit: "100" },
   });
   if (res.code == 1) {
     addClassData.value = res.data.page_data;
@@ -559,7 +556,7 @@ function initClassName(val) {
           v-model:grade-name="dialogForm_Data.grade_name"></remote-cascader-class>
       </el-form-item> -->
       <el-form-item label="年级名称:" prop="grade_id">
-        <remote-select to="grade" v-model="dialogForm_Data.grade_id" v-model:modelName="dialogForm_Data.grade_name"></remote-select>
+        <remote-select to="grade" v-model="dialogForm_Data.grade_id" v-model:modelName="dialogForm_Data.grade_name" @change="handleGradeChange"></remote-select>
       </el-form-item>
       <el-form-item label="班级名称:" prop="class_id">
         <el-select v-model="dialogForm_Data.class_id" placeholder="请选择" @change="initClassName" clearable style="width: 100%;">

+ 50 - 0
src/pages/xdjx/xszhsz/xscjbgd/components/api.js

@@ -0,0 +1,50 @@
+import request from '@/utils/request'
+export const xjk_list = (data = {}) =>
+    request({
+        url: '/xddy/dygl_xsxjk/index',
+        data: {
+            page: data.page,
+            limit: data.limit,
+            keyword: data.keyword,
+            xdx_xsxh: xdx_xsxh,
+        }
+    })
+
+export const xjk_detail = (data = {}) =>
+    request({
+        url: '/xddy/dygl_xsxjk/detail',
+        data: {
+            xdx_id: data.xdx_id,
+            xdx_xsxh: data.xdx_xsxh
+
+        },
+    })
+
+export const xslb_list = (data = {}) =>
+    request({
+        url: '/xddy/xstzjk_xslb/index',
+        data: {
+            page: data.page,
+            limit: data.limit,
+            keyword: data.keyword,
+            xtj_xsxm: data.xtj_xsxm,
+            xtj_xsxh: data.xtj_xsxh,
+            grade_id: data.grade_id,
+            grade_name: data.grade_name,
+            class_id: data.class_id,
+            class_name: data.class_name,
+            xtj_jlrq: data.xtj_jlrq,
+            xdx_id: data.xdx_id,
+        }
+    })
+
+
+export const xslb_detail = (data = {}) =>
+    request({
+        url: '/xddy/xstzjk_xslb/detail',
+        data: {
+            xtj_id: data.xtj_id,
+            xtj_xsxh: data.xtj_xsxh,
+        },
+    })
+

+ 469 - 0
src/pages/xdjx/xszhsz/xscjbgd/components/index.vue

@@ -0,0 +1,469 @@
+<template>
+  <div class="content">
+    <div class="d-flex mb20">
+      <div class="content-box Info">
+        <div style="width: 100%; height: 150px; position: relative">
+          <img style="
+              width: calc(100% - 42px);
+              height: 128px;
+              margin: 20px 0 0 20px;
+              position: absolute;
+            " src="@/assets/bg.png" alt="" />
+          <img style="
+              width: 105px;
+              height: 105px;
+              border-radius: 105px;
+              position: absolute;
+              top: 50%;
+              left: 50%;
+              margin-left: -52px;
+              margin-top: 10px;
+            " :src="jcxxInfo.xdx_sczp" alt="" />
+        </div>
+        <div style="text-align: center; margin-top: 50px">
+          <p style="
+              font-size: 20px;
+              font-family: PingFangSC, PingFangSC-Semibold;
+              font-weight: 600;
+            ">
+            {{ jcxxInfo.xdx_xsxm }}
+          </p>
+          <p style="
+              font-size: 14px;
+              font-family: PingFang, PingFang-Bold;
+              font-weight: 700;
+              color: #8083a3;
+            ">
+            学籍号:{{ jcxxInfo.xdx_xsxh }}
+          </p>
+        </div>
+        <div>
+          <ul>
+            <li>性别</li>
+            <li>{{ jcxxInfo.xdx_xb_option_n }}</li>
+          </ul>
+          <ul>
+            <li>民族</li>
+            <li>{{ jcxxInfo.xdx_mz }}</li>
+          </ul>
+          <ul>
+            <li>出生年月</li>
+            <li>{{ jcxxInfo.xdx_csrq }}</li>
+          </ul>
+          <ul>
+            <li>血型</li>
+            <li>{{ jcxxInfo.xdx_xx }}</li>
+          </ul>
+        </div>
+        <div>
+          <ul>
+            <li>身份证号码</li>
+            <li>{{ jcxxInfo.xdx_zjhm }}</li>
+          </ul>
+          <ul>
+            <li>户籍所在地</li>
+            <li>{{ jcxxInfo.xdx_jtzz }}</li>
+          </ul>
+          <ul>
+            <li>家庭住址</li>
+            <li>{{ jcxxInfo.xdx_xxdz }}</li>
+          </ul>
+        </div>
+      </div>
+      <div class="ml20 content-box student-body-health" style="height: 730px">
+        <div>
+          <span>学生体质健康</span>
+          <!-- <a>查看更多</a> -->
+        </div>
+        <div>
+          <div>
+            <img src="@/assets/icon-heart.png" alt="" />
+            <div>
+              <span>{{ tzjkInfo.xtj_jcxl }}</span>
+              <span>基础心率</span>
+            </div>
+          </div>
+          <div>
+            <img src="@/assets/icon-BMI.png" alt="" />
+            <div>
+              <span>{{ tzjkInfo.xtj_bmi }}</span>
+              <span>BMI</span>
+            </div>
+          </div>
+          <div>
+            <img src="@/assets/icon-scale.png" alt="" />
+            <div>
+              <span>{{ tzjkInfo.xtj_tzl }}</span>
+              <span>体脂率</span>
+            </div>
+          </div>
+          <div>
+            <img src="@/assets/icon-lung.png" alt="" />
+            <div>
+              <span>{{ tzjkInfo.xtj_fhl }}</span>
+              <span>肺活量</span>
+            </div>
+          </div>
+        </div>
+        <div>
+          <span></span>
+          <div>
+            <div class="tzjk-info">
+              <img src="@/assets/icon-vision.png" />
+              <span>{{ tzjkInfo.xtj_sl }}</span>
+            </div>
+            <div>视力</div>
+          </div>
+          <div>
+            <div class="tzjk-info">
+              <img src="@/assets/icon-backrun.png" />
+              <span>{{ tzjkInfo.xtj_wfp }}</span>
+            </div>
+            <div>往返跑</div>
+          </div>
+          <div class="tzjk-info">
+            <div>
+              <img src="@/assets/icon-longrun.png" />
+              <span>{{ tzjkInfo.xtj_nlp }}</span>
+            </div>
+            <div>耐力跑成绩</div>
+          </div>
+          <div class="tzjk-info">
+            <div>
+              <img src="@/assets/icon-shortrun.png" />
+              <span>{{ tzjkInfo.xtj_50mp }}</span>
+            </div>
+            <div>50米跑</div>
+          </div>
+          <div class="tzjk-info">
+            <div>
+              <img src="@/assets/icon-situp.png" />
+              <span>{{ tzjkInfo.xtj_1fzywqz }}</span>
+            </div>
+            <div>1分钟仰卧起坐</div>
+          </div>
+          <div class="tzjk-info">
+            <div>
+              <img src="@/assets/icon-jump.png" />
+              <span>{{ tzjkInfo.xtj_ldty }}</span>
+            </div>
+            <div>立定跳远</div>
+          </div>
+          <div class="tzjk-info">
+            <div>
+              <img src="@/assets/icon-skip.png" />
+              <span>{{ tzjkInfo.xtj_1fzts }}</span>
+            </div>
+            <div>1分钟跳绳</div>
+          </div>
+          <div class="tzjk-info">
+            <div>
+              <img src="@/assets/icon-pullup.png" />
+              <span>{{ tzjkInfo.xtj_ytxs }}</span>
+            </div>
+            <div>引体向上</div>
+          </div>
+          <div class="tzjk-info">
+            <div>
+              <img src="@/assets/icon-sit.png" />
+              <span>{{ tzjkInfo.xtj_zwtqq }}</span>
+            </div>
+            <div>坐位体前屈</div>
+          </div>
+          <div class="tzjk-info">
+            <div>
+              <img src="@/assets/icon-ball.png" />
+              <span>{{ tzjkInfo.xtj_sxq }}</span>
+            </div>
+            <div>实心球</div>
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { xjk_list, xslb_list, xjk_detail, xslb_detail } from "./api";
+export default {
+  name: "index",
+  data() {
+    return {
+      limit: 10,
+      total: 12,
+      cur_page: 1,
+      keyword: "",
+      jcxxInfo: {},
+      tzjkInfo: {},
+      firstForm: {
+        grade: "",
+        class: "",
+      },
+      xtj_id: "",
+      xtj_xsxh: "",
+      xdx_xsxm: "",
+      xdx_xsxh: "",
+    };
+  },
+  props: ["xxx_xsxh"],
+  watch: {
+    xxx_xsxh: {
+      immediate: true,
+      handler(val) {
+        this.xtj_xsxh = val;
+        this.tzjkData()
+        this.jcxxData();
+      }
+    }
+  },
+  methods: {
+    jcxxData() {
+      let data = {
+        xdx_xsxh: this.xtj_xsxh,
+      };
+
+      xjk_detail(data).then((res) => {
+        if (res.code == 1) {
+          this.jcxxInfo = res.data.one_info;
+          let a = this.jcxxInfo.xdx_sczp.indexOf("|");
+          this.jcxxInfo.xdx_sczp = this.jcxxInfo.xdx_sczp.substring(0, a);
+          console.log(this.jcxxInfo.xdx_sczp, "xdx_sczp");
+        }
+      });
+    },
+
+    tzjkData() {
+      let data = {
+        xtj_xsxh: this.xtj_xsxh,
+      };
+
+      xslb_detail(data).then((res) => {
+        if (res.code == 1) {
+          this.tzjkInfo = res.data.one_info;
+        }
+      });
+    },
+  },
+  // mounted() {
+  //   if (this.$route.params.xtj_xsxh != "") {
+  //     (this.xtj_xsxh = this.$route.params.xtj_xsxh), this.tzjkData();
+  //     this.jcxxData();
+  //   }
+  // },
+};
+</script>
+
+<style lang="scss" scoped>
+.d-flex {
+  display: flex;
+}
+.ml20 {
+  margin-left: 20px;
+}
+* {
+  box-sizing: unset !important;
+}
+//基本信息
+.Info div:nth-child(3) {
+  display: flex;
+  flex-wrap: wrap;
+  margin: 0 auto;
+
+  ul {
+    width: calc(50% - 47px);
+    height: 50px;
+    border: 1px dashed #dadada;
+    border-radius: 12px;
+    margin-left: 20px;
+    margin-bottom: 20px;
+    padding: 15px 0 0 15px;
+    & :nth-child(1) {
+      font-size: 12px;
+      font-family: PingFangSC, PingFangSC-Semibold;
+      font-weight: 600;
+      text-align: left;
+      color: #9a9a9a;
+      margin-bottom: 5px;
+    }
+    &:nth-child(2) {
+      font-size: 14px;
+      font-family: PingFang, PingFang-Medium;
+      font-weight: 500;
+      color: #000000;
+    }
+  }
+}
+.Info div:nth-child(4) {
+  ul {
+    width: calc(100% - 57px);
+    height: 50px;
+    border: 1px dashed #dadada;
+    border-radius: 12px;
+    margin-left: 20px;
+    margin-bottom: 20px;
+    padding: 15px 0 0 15px;
+    & :nth-child(1) {
+      font-size: 12px;
+      font-family: PingFangSC, PingFangSC-Semibold;
+      font-weight: 600;
+      text-align: left;
+      color: #9a9a9a;
+      margin-bottom: 5px;
+    }
+    &:nth-child(2) {
+      font-size: 14px;
+      font-family: PingFang, PingFang-Medium;
+      font-weight: 500;
+      color: #000000;
+    }
+  }
+}
+
+//体质健康
+.student-body-health {
+  & > div:nth-child(1) {
+    display: flex;
+    justify-content: space-between;
+    padding: 15px 20px 15px 20px;
+    border-bottom: 1px solid #e4e6e8;
+    & :nth-child(1) {
+      font-size: 18px;
+      font-family: PingFangSC, PingFangSC-Semibold;
+      font-weight: 600;
+      color: #171721;
+    }
+    & :nth-child(2) {
+      font-size: 14px;
+      font-family: PingFangSC, PingFangSC-Regular;
+      font-weight: 400;
+      color: #265cd4;
+    }
+  }
+  & > div:nth-child(2) {
+    margin-top: 25px;
+    display: flex;
+    flex-wrap: wrap;
+    & > div:nth-child(1) {
+      margin-left: 20px;
+      border-bottom: 1px solid #5f5f5f53;
+      border-right: 1px solid #5f5f5f53;
+    }
+    & > div:nth-child(3) {
+      margin-left: 20px;
+    }
+    & > div:nth-child(4) {
+      border-top: 1px solid #5f5f5f53;
+      border-left: 1px solid #5f5f5f53;
+    }
+
+    & > div {
+      padding: 45px;
+      display: flex;
+      width: calc(50% - 112px);
+      align-items: center;
+      justify-content: center;
+      div {
+        display: flex;
+        flex-direction: column;
+        padding-left: 30px;
+        & :nth-child(1) {
+          display: inline-block;
+          width: 100px;
+          font-size: 20px;
+          font-family: PingFangSC, PingFangSC-Semibold;
+          font-weight: 600;
+          color: #171721;
+        }
+        & :nth-child(2) {
+          font-size: 14px;
+          font-family: PingFangSC, PingFangSC-Regular;
+          font-weight: 400;
+          color: #8083a3;
+        }
+      }
+    }
+  }
+
+  & > div:nth-child(3) {
+    & > span {
+      height: 1px;
+      display: block;
+      background-color: #5f5f5f53;
+      width: 90%;
+      margin: 0 5%;
+    }
+    margin-top: 10px;
+    display: flex;
+    flex-wrap: wrap;
+    & > div:nth-child(even) {
+      padding-left: 35px;
+      & > div:nth-child(2) {
+        padding-right: 20px;
+        border-right: 1px solid #5f5f5f53;
+      }
+    }
+
+    & > div {
+      display: flex;
+      flex-direction: row;
+      padding: 20px 5px;
+      justify-content: space-between;
+      width: calc(50% - 45px);
+      align-items: center;
+      & > div:nth-child(1) {
+        display: flex;
+        align-items: center;
+        font-size: 20px;
+        font-family: PingFangSC, PingFangSC-Semibold;
+        font-weight: 600;
+        color: #171721;
+      }
+      & > div:nth-child(2) {
+        font-size: 14px;
+        font-family: PingFangSC, PingFangSC-Regular;
+        font-weight: 400;
+        color: #8083a3;
+      }
+    }
+  }
+  .tzjk-info img {
+    width: 30px;
+    height: 30px;
+    padding-right: 10px;
+  }
+}
+//通用
+.content {
+  // background: #f2f6fc;
+  height: 700px;
+  width: 100%;
+  // margin: -10px;
+  // padding-right: 20px;
+  padding-bottom: 20px;
+}
+
+.content-box {
+  width: 100%;
+  background: #fff;
+  border-radius: 6px;
+  border: 1px solid #ccc;
+
+  .title {
+    box-sizing: border-box;
+    width: 100%;
+    font-size: 18px;
+    border-bottom: 1px solid #e4e6e8;
+    padding: 15px 0 15px 20px;
+    font-family: PingFangSC, PingFangSC-Semibold;
+    font-weight: 600;
+    color: #171721;
+  }
+}
+//布局
+.Info {
+  width: 40%;
+}
+.student-body-health {
+  width: 60%;
+}
+</style>

+ 26 - 15
src/pages/xdjx/xszhsz/xscjbgd/index.vue

@@ -6,6 +6,7 @@ import { pick } from "lodash-es";
 import { ElMessage } from "element-plus";
 import type { FormInstance, FormRules } from "element-plus";
 import type { AxiosRequestConfig } from "axios";
+import dypjComponent from "./components/index.vue";
 
 // #region (constant)
 const TABLE_KEY = "xxx_id";
@@ -105,6 +106,7 @@ const handleTableColBtn_edit = async (scope: { row: TYPE_TABLE_FIELD }) => {
   const res = await detailApi(scope.row[TABLE_KEY]);
   dialogForm_Data.value = res.data.one_info;
   dialogVisible_addOrEdit.value = true;
+  initAddClass(dialogForm_Data.value.grade_id);
 };
 const handleTableColBtn_audit = (scope: { row: TYPE_TABLE_FIELD }) => {
   whichDialogSubmit = "edit";
@@ -354,22 +356,18 @@ async function initClass() {
 }
 
 const addClassData = ref([]);
-watch(
-  () => dialogForm_Data.value.grade_id,
-  (newValue, oldValue) => {
-    addClassData.value = [];
-    dialogForm_Data.value.class_id = "";
-    if (newValue) {
-      initAddClass();
-    }
-  },
-  { immediate: true }
-);
+function handleGradeChange(data) {
+  addClassData.value = [];
+  dialogForm_Data.value.class_id = "";
+  if (data) {
+    initAddClass(data);
+  }
+}
 
-async function initAddClass() {
+async function initAddClass(grade_id) {
   let res = await request({
     url: "/jcxx/class/index",
-    data: { grade_id: dialogForm_Data.value.grade_id, limit: "100" },
+    data: { grade_id: grade_id, limit: "100" },
   });
   if (res.code == 1) {
     addClassData.value = res.data.page_data;
@@ -383,6 +381,13 @@ function initClassName(val) {
     }
   });
 }
+
+const dialogVisible_evaluate = ref(false);
+const currentXh = ref("");
+const handleTableColBtn_evaluate = (scope: { row: TYPE_TABLE_FIELD }) => {
+  dialogVisible_evaluate.value = true;
+  currentXh.value = scope.row.xxx_xsxh;
+};
 </script>
 
 <template>
@@ -437,13 +442,15 @@ function initClassName(val) {
         <el-table-column prop="grade_name" label="年级名称" width="auto" show-overflow-tooltip></el-table-column>
         <!-- <el-table-column prop="class_id" label="班级编号" width="auto" show-overflow-tooltip></el-table-column> -->
         <el-table-column prop="class_name" label="班级名称" width="auto" show-overflow-tooltip></el-table-column>
-        <el-table-column label="操作" fixed="right">
+        <el-table-column label="操作" fixed="right" width="250">
           <template #default="scope">
             <el-button link :auto-insert-space="false" @click="handleTableColBtn_edit(scope)" type="primary">编辑
             </el-button>
             <!-- <el-button link :auto-insert-space="false" @click="handleTableColBtn_audit(scope)" type="primary" >审核</el-button> -->
             <el-button link :auto-insert-space="false" @click="handleTableColBtn_detail(scope)" type="primary">详情
             </el-button>
+            <el-button link :auto-insert-space="false" @click="handleTableColBtn_evaluate(scope)" type="primary">德育评价
+            </el-button>
             <el-button link :auto-insert-space="false" @click="handleTableColBtn_delete(scope)" type="primary">删除
             </el-button>
           </template>
@@ -482,7 +489,7 @@ function initClassName(val) {
         </remote-select>
       </el-form-item>
       <el-form-item label="年级名称:" prop="grade_id">
-        <remote-select to="grade" v-model="dialogForm_Data.grade_id" v-model:modelName="dialogForm_Data.grade_name"></remote-select>
+        <remote-select to="grade" v-model="dialogForm_Data.grade_id" v-model:modelName="dialogForm_Data.grade_name" @change="handleGradeChange"></remote-select>
       </el-form-item>
       <el-form-item label="班级名称:" prop="class_id">
         <el-select v-model="dialogForm_Data.class_id" placeholder="请选择" @change="initClassName" clearable style="width: 100%;">
@@ -513,4 +520,8 @@ function initClassName(val) {
       </div>
     </el-form>
   </el-dialog>
+
+  <el-dialog title="德育评价" width="1000px" v-model="dialogVisible_evaluate" append-to-body destroy-on-close>
+    <dypjComponent :xxx_xsxh="currentXh" />
+  </el-dialog>
 </template>

+ 19 - 2
src/pages/xdjx/xypjgl/cjlr/index.vue

@@ -8,6 +8,13 @@ import type { FormInstance, FormRules } from "element-plus";
 import type { AxiosRequestConfig } from "axios";
 import { user } from "~/store/user";
 
+const settingObj = user.power_set
+  ? JSON.parse(user.power_set)
+  : {
+      cjlr: "1",
+      cjsh: "1",
+    };
+
 // #region (constant)
 const TABLE_KEY = "xxc_id";
 const URL_CUT = "/xdjx/xypjgl_cjlr";
@@ -425,7 +432,7 @@ init();
     <div>
       <!-- <import-button @success="queryApi" :url="URL_CUT_REF"></import-button>
       <el-button @click="handleTableRowBtn_export" type="primary">导出</el-button> -->
-      <el-button @click="handleTableRowBtn_add" type="primary">新增</el-button>
+      <el-button :disabled="settingObj.cjlr==='1'?false:true" @click="handleTableRowBtn_add" type="primary">新增</el-button>
       <!-- <el-button @click="handleTableRowBtn_delete" type="danger">删除</el-button> -->
     </div>
 
@@ -445,7 +452,7 @@ init();
         <el-table-column prop="xxc_js" label="教师名称" width="auto" show-overflow-tooltip></el-table-column>
         <el-table-column prop="xxc_shzt" label="审核状态" width="auto" show-overflow-tooltip></el-table-column>
         <el-table-column label="操作" width="280" fixed="right">
-          <template #default="scope">
+          <template v-if="settingObj.cjlr==='1'" #default="scope">
             <el-button link :auto-insert-space="false" @click="handleTableColBtn_edit(scope)" type="primary">编辑
             </el-button>
             <el-button link :auto-insert-space="false" @click="handleTableColBtn_lrcj(scope)" type="primary" :disabled="scope.row.xxc_shzt_option_k!=='1'">录入成绩
@@ -457,6 +464,16 @@ init();
             <el-button link :auto-insert-space="false" @click="handleTableColBtn_delete(scope)" type="primary">删除
             </el-button>
           </template>
+          <template v-else #default="scope">
+            <el-button disabled link :auto-insert-space="false" @click="handleTableColBtn_edit(scope)" type="primary">编辑
+            </el-button>
+            <el-button disabled link :auto-insert-space="false" @click="handleTableColBtn_lrcj(scope)" type="primary">录入成绩
+            </el-button>
+            <el-button disabled link :auto-insert-space="false" @click="handleTableColBtn_submit(scope)" type="primary">提交
+            </el-button>
+            <el-button disabled link :auto-insert-space="false" @click="handleTableColBtn_delete(scope)" type="primary">删除
+            </el-button>
+          </template>
         </el-table-column>
       </el-table>
     </div>

+ 14 - 1
src/pages/xdjx/xypjgl/cjsh/index.vue

@@ -6,6 +6,14 @@ import { pick } from "lodash-es";
 import { ElMessage } from "element-plus";
 import type { FormInstance, FormRules } from "element-plus";
 import type { AxiosRequestConfig } from "axios";
+import { user } from "~/store/user";
+
+const settingObj = user.power_set
+  ? JSON.parse(user.power_set)
+  : {
+      cjlr: "1",
+      cjsh: "1",
+    };
 
 // #region (constant)
 const TABLE_KEY = "xxc_id";
@@ -393,7 +401,7 @@ init();
         <el-table-column prop="xxc_js" label="教师名称" width="auto" show-overflow-tooltip></el-table-column>
         <el-table-column prop="xxc_shzt" label="审核状态" width="auto" show-overflow-tooltip></el-table-column>
         <el-table-column label="操作" fixed="right">
-          <template #default="scope">
+          <template v-if="settingObj.cjsh==='1'" #default="scope">
             <!-- <el-button link :auto-insert-space="false" @click="handleTableColBtn_edit(scope)" type="primary" >编辑</el-button> -->
             <el-button link :auto-insert-space="false" @click="handleTableColBtn_detail(scope)" type="primary">详情</el-button>
             <el-button link :auto-insert-space="false" @click="handleTableColBtn_audit(scope)" type="primary" :disabled="scope.row.xxc_shzt_option_k!=='2'">审核
@@ -401,6 +409,11 @@ init();
             <!-- <el-button link :auto-insert-space="false" @click="handleTableColBtn_delete(scope)" type="primary" >删除
             </el-button> -->
           </template>
+          <template v-else #default="scope">
+            <el-button disabled link :auto-insert-space="false" @click="handleTableColBtn_detail(scope)" type="primary">详情</el-button>
+            <el-button disabled link :auto-insert-space="false" @click="handleTableColBtn_audit(scope)" type="primary">审核
+            </el-button>
+          </template>
         </el-table-column>
       </el-table>
     </div>

+ 7 - 5
src/pages/xdjx/xypjgl/kssz.vue

@@ -8,6 +8,8 @@ import type { FormInstance, FormRules } from "element-plus";
 import type { AxiosRequestConfig } from "axios";
 import { user } from "~/store/user";
 
+const dept_master = user.dept_master || [];
+
 // #region (constant)
 const TABLE_KEY = "xxk_id";
 const URL_CUT = "/xdjx/xypjgl_kssz";
@@ -378,9 +380,9 @@ async function handleSetting() {
 
 async function handleSettingSubmit(data) {
   let obj = {
-    user_id: user.user_id,
+    user_id: data.user_id,
     user_main: {
-      power_set: JSON.stringify(data),
+      power_set: JSON.stringify(data.setting),
     },
   };
   await request({ url: "/user/main/edit", data: obj });
@@ -414,7 +416,7 @@ async function handleSettingSubmit(data) {
       <!-- <import-button @success="queryApi" :url="URL_CUT_REF"></import-button>
       <el-button @click="handleTableRowBtn_export" type="primary">导出</el-button> -->
       <el-button @click="handleTableRowBtn_add" type="primary">新增</el-button>
-      <el-button type="primary" @click="handleSetting">权限设置</el-button>
+      <el-button :disabled="dept_master.length==0?true:false" type="primary" @click="handleSetting">权限设置</el-button>
       <span class="text-14px ml-10px text-hex-aaaaaa">只有校管理员可以修改保存权限设置</span>
       <!-- <el-button @click="handleTableRowBtn_delete" type="danger">删除</el-button> -->
     </div>
@@ -508,8 +510,8 @@ async function handleSettingSubmit(data) {
     <div class="overflow-auto" style="max-height: 500px;">
       <div class="flex items-center" v-for="(item, index) in userData" :key="index">
         <div class="w-120px">{{ item.user_realname }}</div>
-        <el-checkbox v-model="item.setting.cjlr" true-label="1" false-label="2" @change="handleSettingSubmit(item.setting)">成绩录入</el-checkbox>
-        <el-checkbox v-model="item.setting.cjsh" true-label="1" false-label="2" @change="handleSettingSubmit(item.setting)">成绩审核</el-checkbox>
+        <el-checkbox v-model="item.setting.cjlr" true-label="1" false-label="2" @change="handleSettingSubmit(item)">成绩录入</el-checkbox>
+        <el-checkbox v-model="item.setting.cjsh" true-label="1" false-label="2" @change="handleSettingSubmit(item)">成绩审核</el-checkbox>
       </div>
     </div>
     <div class="text-center mt-15px">