Browse Source

解决冲突

WINDOWS-7IFQK7E\EDY 1 year ago
parent
commit
91392709a7

+ 1 - 0
package.json

@@ -23,6 +23,7 @@
     "@vueuse/core": "^8.1.1",
     "axios": "^0.26.1",
     "clipboard": "^2.0.11",
+    "d3": "^7.8.5",
     "default-passive-events": "^2.0.0",
     "docxtemplater": "^3.31.6",
     "echarts": "^5.4.0",

File diff suppressed because it is too large
+ 3333 - 552
pnpm-lock.yaml


+ 1 - 1
public/config.js

@@ -24,7 +24,7 @@ const production = {
 
 function isWhich() {
   if (window.location.href.includes('localhost')) {
-    return local
+    return production
   } else if (window.location.href.includes('bozedu')) {
     return development
   } else {

+ 35 - 3
src/layout/app/index.vue

@@ -10,7 +10,10 @@
       <main class="main">
         <Navbar></Navbar>
         <div class="main-wrapper">
-          <div class="main-content">
+          <div class="main-content divide-y">
+            <div class="py-3" v-if="isShowHeader">
+              <el-page-header @back="goBack" :content="headerContent" />
+            </div>
             <router-view></router-view>
           </div>
         </div>
@@ -30,6 +33,19 @@ export default defineComponent({
     Sidebar,
     Navbar,
   },
+  methods: {
+    goBack() {
+      this.$router.go(-1)
+    }
+  },
+  computed: {
+    isShowHeader() {
+      return (!this.$route.hidden) && (this.$route?.meta?.back || this.$route?.name?.endsWith('detail') || this.$route?.meta?.title?.includes('详情'))
+    },
+    headerContent() {
+      return this.$route?.query?.header ?? '详情页面'
+    },
+  },
   setup() {
     const SidebarStore = useSidebarStore();
     const toggle = () => SidebarStore.toggleIsCollapse();
@@ -43,6 +59,16 @@ export default defineComponent({
 <style lang="scss">
 @import "@/styles/mixin.scss";
 @import "@/styles/variables.scss";
+
+.el-page-header {
+ margin: 10px 0;
+  border-bottom: 1px solid #f2f2f2;
+  padding-bottom: 13px;
+  .el-page-header__title {
+    font-size: 16px;
+  }
+}
+
 .app-wrapper {
   display: flex;
   flex-direction: column;
@@ -67,15 +93,18 @@ export default defineComponent({
     justify-content: flex-start;
     align-items: flex-start;
     height: calc(100vh - 54px);
+
     .aside {
       flex: none;
       height: 100%;
       width: $sideBarWidth;
+
       // overflow: hidden;
       &.isCollapse {
         width: 54px;
       }
     }
+
     .main {
       flex: auto;
       height: 100%;
@@ -114,6 +143,7 @@ export default defineComponent({
     }
   }
 }
+
 .content {
   background: #f2f6fc;
   height: 100%;
@@ -122,6 +152,7 @@ export default defineComponent({
   padding-right: 20px;
   padding-bottom: 20px;
 }
+
 .top-box {
   box-sizing: border-box;
   width: 100%;
@@ -129,12 +160,13 @@ export default defineComponent({
   background: #fff;
   border-radius: 6px;
 }
+
 .info-box {
   border: 1px solid #e0e0e0;
   background: #fff;
   border-radius: 6px;
 }
+
 .icon-more {
   transform: rotate(90deg);
-}
-</style>
+}</style>

+ 2 - 0
src/main.js

@@ -25,6 +25,8 @@ import permission from '@/directive/permission'
 console.log('permission :>> ', permission);
 Vue.directive('permission', permission)
 
+import 'virtual:windi.css';
+
 new Vue({
   el: '#app',
   pinia: createPinia(),

+ 8 - 3
src/router/index.js

@@ -84,7 +84,7 @@ export const allRoutes = [
                 path: "bmlb/:id",
                 name: "bjhd_hdlb_hdxq_bmlb",
                 hidden: true,
-                meta: { title: "报名列表" },
+                meta: { title: "报名列表", back: true, },
                 component: () => import("@/views/bjhd/hdlb/hdxq/bmlb/index.vue"),
                 props: true,
             }]
@@ -442,7 +442,7 @@ export const allRoutes = [
                 {
                     path: "wdpfx/:id",
                     hidden: true,
-                    meta: { title: "评分项" },
+                    meta: { title: "评分项", back: true },
                     name: "wypj_wdsz_wdpfx",
                     component: () => import("@/views/wypj/wdsz/wdpfx/index.vue"),
                     props: true,
@@ -460,7 +460,12 @@ export const allRoutes = [
             meta: { title: "德育二维码" },
         }]
     },
-
+    {
+        path: '/scancode',
+        component: () => import('@/views/wypj/scanCode.vue'),
+        meta: { title: "二维码" },
+        hidden: true,
+    },
     // {
     //     path: "/fxxt",
     //     component: AppLayout,

File diff suppressed because it is too large
+ 13 - 9
src/stores/user.js


+ 18 - 9
src/views/bjhd/bmlb/api.js

@@ -2,15 +2,7 @@ import request from '@/utils/request';
 export const sign_list = (data = {}) =>
     request({
         url: '/xddy/dygl_hdbm/index',
-        data: {
-            xdb_id:data.xdb_id,
-            page: data.page,
-            limit: data.limit,
-            xdh_xsxm: data.xdh_xsxm,
-            xdh_xsxh: data.xdh_xsxh,
-            xdh_sjhm: data.xdh_sjhm,
-            xdh_hdmc: data.xdh_hdmc
-        }
+        data,
     })
 export const sign_edit = (data = {}) =>
     request({
@@ -37,4 +29,21 @@ export const sign_del = (data = {}) =>
         }
     })
 
+export const hd_list = (data = {}) =>
+  request({
+    url: "/xddy/dygl_bjhd/index",
+    data,
+  });
+
+export const bm_add = (data = {}) =>
+  request({
+    url: "/xddy/dygl_hdbm/add",
+    data,
+  });
 
+  
+export const bm_edit = (data = {}) =>
+  request({
+    url: "/xddy/dygl_hdbm/edit",
+    data,
+  });

+ 179 - 68
src/views/bjhd/bmlb/index.vue

@@ -17,50 +17,24 @@
         <el-input v-model="signForm.hdmc" clearable @clear="getListData">
         </el-input>
       </el-form-item>
-      <el-button type="primary" class="ml5" @click="getListData"
-        >搜索</el-button
-      >
+      <el-button type="primary" class="ml5" @click="getListData">搜索</el-button>
     </el-form>
     <div>
-      <el-upload
-        class="upload-demo"
-        :action="import_type_url"
-        :show-file-list="false"
-        :data="import_type_data"
-        :on-success="import_success"
-        style="display: inline-block; margin: 0 10px"
-      >
+      <!-- <el-upload class="upload-demo" :action="import_type_url" :show-file-list="false" :data="import_type_data"
+        :on-success="import_success" style="display: inline-block; margin: 0 10px">
         <el-button type="primary">导入</el-button>
-      </el-upload>
-      <el-button type="primary" @click="exportSign">导入模板下载</el-button>
+      </el-upload> -->
+      <!-- <el-button type="primary" @click="exportSign">导入模板下载</el-button> -->
+      <el-button type="primary" @click="handleAddOrEdit()">添加</el-button>
       <el-button type="primary" @click="exportSign">导出</el-button>
-      <el-button
-        type="danger"
-        :disabled="multipleSelection.length == 0"
-        @click="delSign"
-        >删除</el-button
-      >
+      <el-button type="danger" :disabled="multipleSelection.length == 0" @click="delSign">删除</el-button>
     </div>
-    <el-table
-      :data="signList"
-      v-loading="loading"
-      tooltip-effect="dark"
-      class="mt20"
-      style="width: 100%"
-      @selection-change="handleSelectionChange"
-    >
+    <el-table :data="signList" v-loading="loading" tooltip-effect="dark" class="mt20" style="width: 100%"
+      @selection-change="handleSelectionChange">
       <el-table-column type="selection" align="center" width="55">
       </el-table-column>
-      <el-table-column
-        label="活动名称"
-        align="left"
-        prop="xdb_hdmc"
-      ></el-table-column>
-      <el-table-column
-        label="学生姓名"
-        align="left"
-        prop="xdh_xsxm"
-      ></el-table-column>
+      <el-table-column label="活动名称" align="left" prop="xdb_hdmc"></el-table-column>
+      <el-table-column label="学生姓名" align="left" prop="xdh_xsxm"></el-table-column>
       <el-table-column label="学籍号" prop="xdh_xsxh" width="auto">
       </el-table-column>
       <el-table-column label="手机号码" prop="xdh_sjhm"></el-table-column>
@@ -70,25 +44,51 @@
           </el-rate>
         </template>
       </el-table-column>
+      <el-table-column label="操作">
+        <template slot-scope="scope">
+          <el-button type="text" @click="handleAddOrEdit(scope.row)">编辑</el-button>
+        </template>
+      </el-table-column>
     </el-table>
-    <footer
-      class="flex-item-none"
-      style="display: flex; justify-content: flex-end; margin-top: 30px"
-    >
-      <el-pagination
-        background
-        layout="total,prev, pager, next"
-        :page-size="limit"
-        :total="total"
-        :current-page.sync="cur_page"
-        @current-change="handleCurrentChange"
-      ></el-pagination>
+    <footer class="flex-item-none" style="display: flex; justify-content: flex-end; margin-top: 30px">
+      <el-pagination background layout="total,prev, pager, next" :page-size="limit" :total="total"
+        :current-page.sync="cur_page" @current-change="handleCurrentChange"></el-pagination>
     </footer>
+    <el-dialog :title="title" :visible.sync="editDialogShow">
+      <el-form :model="newForm" ref="newForm" :rules="rules" label-width="100px">
+        <el-form-item label="学生姓名" prop="xdh_xsxm">
+          <el-input v-model="newForm.xdh_xsxm" placeholder="请输入学生姓名"></el-input>
+        </el-form-item>
+        <el-form-item label="学籍号" prop="xdh_xsxh">
+          <el-input v-model="newForm.xdh_xsxh" />
+        </el-form-item>
+        <el-form-item label="手机号码" prop="xdh_sjhm">
+          <el-input v-model="newForm.xdh_sjhm" type="number" />
+        </el-form-item>
+        <el-form-item label="学生得分" prop="xdh_xsdf">
+          <el-input v-model="newForm.xdh_xsdf" type="number" />
+        </el-form-item>
+        <el-form-item label="活动名称" prop="xdb_id">
+          <el-select v-model="newForm.xdb_id">
+            <el-option v-for="item in hdData" :key="item.xdb_id" :label="item.xdb_hdmc"
+              :value="{ value: item.xdb_id, label: item.xdb_hdmc }"></el-option>
+          </el-select>
+          <!-- <el-input v-model="newForm.xdb_hdmc" placeholder="请输入活动名称"></el-input> -->
+        </el-form-item>
+        <el-form-item label="学生评价" prop="xdh_xspj">
+          <el-rate class="rate" v-model="newForm.xdh_xspj"></el-rate>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="text-center">
+        <el-button @click="editDialogShow = false">取 消</el-button>
+        <el-button type="primary" @click="newFormSubmit('newForm')">确 定</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
-import { sign_list, sign_del } from "./api";
+import { sign_list, sign_del, hd_list, bm_add, bm_edit } from "./api";
 import { useUserStore } from "@/stores/user";
 const { token, real_name } = useUserStore();
 export default {
@@ -108,23 +108,24 @@ export default {
       },
       signList: [],
       multipleSelection: [],
-      commentDialogVisible: false,
-      commentForm: {
-        xdh_id: "",
-        xdh_xsxm: "",
-        xdh_xsxh: "",
-        xdh_sjhm: "",
-        xdb_id: "",
-        xdh_xsdf: "",
-        xdh_xspj: "",
-        xdh_xspj_ms: "",
-      },
       rules: {
         xdh_xspj: [
-          { required: true, message: "请打分评价", trigger: "change" },
+          { required: true, message: "请打分评价", trigger: "submit" },
+        ],
+        xdh_xsxh: [
+          { required: true, message: "请输入学籍号", trigger: "submit" },
         ],
-        xdh_xspj_ms: [
-          { required: true, message: "请输入评价描述", trigger: "blur" },
+        xdh_xsdf: [
+          { required: true, message: "请输入学生分数", trigger: "submit" },
+        ],
+        xdh_xsxm: [
+          { required: true, message: "请输入学生姓名", trigger: "submit" },
+        ],
+        xdh_sjhm: [
+          { required: true, message: "请输入手机号码", trigger: "submit" },
+        ],
+        xdb_id: [
+          { required: true, message: "请选择活动", trigger: "submit" },
         ],
       },
       colors: ["#99A9BF", "#F7BA2A", "#FF9900"],
@@ -134,6 +135,19 @@ export default {
         "/xddy/dygl_hdbm/import?issubmit=1&token=" +
         token,
       import_type_data: {},
+      editDialogShow: false,
+      newForm: {
+        xdh_xspj: null,
+        xdh_xsxh: '',
+        xdh_xsdf: '',
+        xdh_xsxm: '',
+        xdh_sjhm: '',
+        xdb_id: '',
+      },
+      hdData: [],
+      title: '',
+      isEdit: false,
+      xdh_id:'',
     };
   },
   methods: {
@@ -163,10 +177,102 @@ export default {
     handleSelectionChange(val) {
       this.multipleSelection = val;
     },
+    getHdList() {
+      let data = {
+        page: 1,
+        limit: 999,
+      };
+      hd_list(data).then((res) => {
+        if (res.code == 1) {
+          this.hdData = res.data.page_data;
+        }
+      });
+    },
     handleCurrentChange(val) {
       this.cur_page = val;
       this.getListData();
     },
+    handleAddOrEdit(item) {
+      this.getHdList();
+      this.editDialogShow = true;
+      if (item) {
+        this.isEdit = true;
+        this.title = '编辑'
+        this.xdh_id = item.xdh_id;
+        Object.keys(this.newForm).forEach((key, i) => {
+          this.newForm[key] = item[key];
+        });
+        this.newForm.xdb_id = {
+          label: item.xdb_hdmc,
+          value: item.xdb_id
+        }
+        console.log(this.newForm.xdb_id,'22222');
+      } else {
+         this.isEdit = false;
+        this.title = '新增'
+        Object.keys(this.newForm).forEach((key, item) => {
+          this.newForm[key] = "";
+        });
+        this.newForm.xdh_xspj = null;
+
+      }
+
+    },
+    newFormSubmit(formName) {
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          this.loading = true;
+          let data = {
+            xddy_dygl_hdbm: {
+              xdh_xspj: this.newForm.xdh_xspj,
+              xdh_xsxh: this.newForm.xdh_xsxh,
+              xdh_xsdf: this.newForm.xdh_xsdf,
+              xdh_xsxm: this.newForm.xdh_xsxm,
+              xdh_sjhm: this.newForm.xdh_sjhm,
+              xdb_id: this.newForm.xdb_id.value,
+              xdb_hdmc: this.newForm.xdb_id.label,
+            }
+          };
+          console.log(data,'1111111');
+          if (!this.isEdit) {
+            bm_add(data).then((res) => {
+              this.loading = false;
+              if (res.code == 1) {
+                this.$message({
+                  message: "添加成功!",
+                  type: "success",
+                });
+                this.editDialogShow = false;
+                this.getListData();
+              } else {
+                this.$message({
+                  message: res.msg,
+                  type: "error",
+                });
+              }
+            });
+          } else {
+            data.xdh_id = this.xdh_id;
+            bm_edit(data).then((res) => {
+              this.loading = false;
+              if (res.code == 1) {
+                this.$message({
+                  message: "编辑成功!",
+                  type: "success",
+                });
+                this.editDialogShow = false;
+                this.getListData();
+              } else {
+                this.$message({
+                  message: res.msg,
+                  type: "error",
+                });
+              }
+            });
+          }
+        }
+      });
+    },
     exportSign() {
       let link =
         window.globalVariables.api +
@@ -221,17 +327,22 @@ export default {
             }
           });
         })
-        .catch(() => {});
+        .catch(() => { });
     },
   },
   mounted() {
-    if (this.$route.params.id != "") {
+    // if (this.$route.params.id != "") {
       this.xdb_id = this.$route.params.id;
       this.getListData();
-    }
+    // }
   },
 };
 </script>
 
-<style scoped>
+<style scoped lang="scss">
+::v-deep{
+  .rate{
+    line-height: 48px;
+  }
+}
 </style>

+ 3 - 3
src/views/bjhd/xsdflb/index.vue

@@ -22,7 +22,7 @@
       >
     </el-form>
     <div>
-      <el-upload
+      <!-- <el-upload
         class="upload-demo"
         :action="import_type_url"
         :show-file-list="false"
@@ -31,8 +31,8 @@
         style="display: inline-block; margin: 0 10px"
       >
         <el-button type="primary">导入</el-button>
-      </el-upload>
-      <el-button type="primary" @click="exportSign">导入模板下载</el-button>
+      </el-upload> -->
+      <!-- <el-button type="primary" @click="exportSign">导入模板下载</el-button> -->
       <el-button type="primary" @click="exportSign">导出</el-button>
       <el-button
         type="danger"

+ 242 - 0
src/views/wypj/scanCode.vue

@@ -0,0 +1,242 @@
+<template>
+    <div class="box">
+        <div class="box_title">五育评价</div>
+        <el-divider></el-divider>
+        <el-form :model="newForm" ref="newForm" :rules="rules" label-width="20vw" class="box_form">
+            <el-form-item label="学生姓名" prop="wdwp_xs_xm">
+                <el-input disabled v-model="newForm.wdwp_xs_xm" placeholder="请输入学生姓名"></el-input>
+            </el-form-item>
+            <el-form-item label="学籍号" prop="wdwp_xs_xjh">
+                <el-input disabled v-model="newForm.wdwp_xs_xjh" />
+            </el-form-item>
+            <div class="" style="margin: 6vw 0;">检查项目 : </div>
+            <div v-for="item in jcsmData" :key="item.xdww_id" style="padding: 0 5px;">
+                <div>{{ item.xdww_name }}</div>
+                <div v-for="pf in item.xddy_dygl_wypj_wdpfx" :key="pf.xdwwp_id" class="px_15 flex"
+                    style="margin-bottom: 5vw;">
+                    <span class="pf_name"> {{ pf.xdwwp_name }} </span>
+                    <el-input type="number" min="0" max="100" v-model="pf.fs" />
+                </div>
+            </div>
+            <el-form-item label="评分用户类型" prop="wdwp_pfyhlx" style="margin-top: 5vw;">
+                <!-- <select class="select" v-model="newForm.wdwp_pfyhlx">
+                    <option value="1">教师</option>
+                    <option value="2">家长</option>
+                </select> -->
+                <el-select v-model="newForm.wdwp_pfyhlx" popper-class="pop-select">
+                    <el-option value="1" label="教师">教师</el-option>
+                    <el-option value="2" label="家长">家长</el-option>
+                </el-select>
+            </el-form-item>
+        </el-form>
+        <div slot="footer" class="text-center">
+            <!-- <el-button @click="editDialogShow = false">取 消</el-button> -->
+            <el-button type="primary" @click="newFormSubmit('newForm')">确 定</el-button>
+        </div>
+    </div>
+</template>
+<script>
+import request from '@/utils/request';
+export default {
+    name: "index",
+    data() {
+        return {
+            rules: {
+                wdwp_xs_xjh: [
+                    { required: true, message: "请输入学生学籍号", trigger: "submit" },
+                ],
+                wdwp_xs_xm: [
+                    { required: true, message: "请输入学生姓名", trigger: "submit" },
+                ],
+                wdwp_pfyhlx: [
+                    { required: true, message: "请选择评分用户类型", trigger: "submit" },
+                ],
+            },
+            newForm: {
+                wdwp_xs_xjh: '',
+                wdwp_xs_xm: '11',
+                wdwp_pfyhlx: '1'
+            },
+            hdData: [],
+            title: '',
+            isEdit: false,
+            xdh_id: '',
+            jcsmData: [],
+            params: {},
+        }
+    },
+    methods: {
+        getJcxm() {
+            request({
+                url: '/xddy/dygl_wypj_wdsz/index',
+                data: {
+                    token: this.params.token,
+                    page: 1,
+                    limit: 99,
+                }
+            }).then(res => {
+                if (res.code == '1') {
+                    this.jcsmData = res.data.page_data;
+                }
+            })
+        },
+        newFormSubmit(formName) {
+            this.$refs[formName].validate((valid) => {
+                if (valid) {
+                    let arr1 = [];
+                    let flag = false;
+                    this.jcsmData.forEach(item => {
+                        let obj1 = {
+                            xdww_id: item.xdww_id,
+                            xdww_name: item.xdww_name,
+                            xddy_dygl_wypj_wdpfx: [],
+                        }
+                        let arr2 = [];
+                        item?.xddy_dygl_wypj_wdpfx.forEach(key => {
+                            if (!key.fs) {
+                                return flag = true;
+                            }
+                            arr2.push({
+                                xdwwp_id: key.xdwwp_id,
+                                xdwwp_name: key.xdwwp_name,
+                                fs: key.fs,
+                            });
+                        })
+                        obj1.xddy_dygl_wypj_wdpfx = arr2;
+                        arr1.push(obj1);
+                    })
+                    if (flag) {
+                        return alert('请填写完整')
+                    }
+                    let data = {
+                        token: this.params.token,
+                        issubmit: '1',
+                        api: 'json',
+                        pj_json: JSON.stringify(arr1),
+                        wdwp_pfyhlx: this.newForm.wdwp_pfyhlx,
+                        wdwp_sm_id: this.params.sm_id,
+                        wdwp_xs_xjh: this.newForm.wdwp_xs_xjh,
+                        wdwp_xs_xm: this.newForm.wdwp_xs_xm,
+                    };
+                    request({
+                        url: '/xddy/dygl_wypj_pjjl/batch_pj',
+                        data,
+                    }).then(res => {
+                        if (res.code == 1) {
+                            alert(res.msg);
+                        } else {
+                            alert(res.msg);
+                        }
+                    })
+                }
+            })
+        }
+    },
+    mounted() {
+        var temp1 = location.href.split('?');
+        var pram = temp1[1];
+        var keyValue = pram.split('&');
+        // var obj = {};
+        for (var i = 0; i < keyValue.length; i++) {
+            var item = keyValue[i].split('=');
+            var key = item[0];
+            var value = item[1];
+            this.params[key] = value;
+        }
+        this.newForm.wdwp_xs_xjh = this.params.xsxh;
+        this.newForm.wdwp_xs_xm = decodeURI(this.params.xsxm);
+
+        if (this.params.token) {
+            request({
+                url: '/user/main/login',
+                data: {
+                    token: this.params.token
+                }
+            }).then(res => {
+                if (res.code == 1) {
+                    localStorage.setItem('userInfo', JSON.stringify(res.data));
+                    this.getJcxm();
+                }
+            })
+        }
+    },
+}
+</script>
+<style lang="scss" scoped>
+.flex {
+    display: flex;
+    align-items: center;
+}
+
+.px_15 {
+    padding: 5px 20px;
+}
+
+.box {
+    width: 100vw;
+    padding: 3vw 2vw;
+
+    .box_title {
+        width: 100%;
+        font-size: 5vw;
+    }
+
+    .box_form {
+        font-size: 4vw;
+    }
+}
+
+::v-deep {
+    .el-form {
+        .el-form-item__label {
+            font-size: 4vw !important;
+        }
+
+        .el-form-item {
+            margin: 5vw 0;
+        }
+
+        .el-input__inner {
+            width: 70vw;
+            height: 7vw;
+            padding: 1vw 2vw;
+            font-size: 4vw;
+        }
+
+        // .pop_select {
+        //     font-size: 4vw !important;
+        // }
+    }
+
+    .el-button {
+        font-size: 4vw;
+        padding: 20px 40px;
+        box-sizing: content-box;
+        border-radius: 20px;
+        margin-top:15vw;
+    }
+
+    // .el-select-dropdown__item {
+    //     font-size: 4vw !important;
+    //     padding: 0 5px;
+    // }
+
+}
+
+.pop-select {
+    .el-select-dropdown__item {
+        font-size: 4vw !important;
+        height: 6vw;
+        line-height: 6vw;
+        padding: 0 10px;
+    }
+}
+
+
+.pf_name {
+    min-width: 17vw;
+    text-align: right;
+    padding-right: 5px;
+    color: #555;
+    font-weight: 400;
+}</style>

+ 13 - 18
src/views/wypj/wdsz/wdpfx/api.js

@@ -2,14 +2,7 @@ import request from '@/utils/request';
 export const wdpfx_list = (data = {}) =>
     request({
         url: '/xddy/dygl_wypj_wdpfx/index',
-        data: {
-            page: data.page,
-            limit: data.limit,
-            keyword: data.keyword,
-
-
-
-        }
+        data,
     })
 export const wdpfx_add = (data = {}) =>
     request({
@@ -18,20 +11,22 @@ export const wdpfx_add = (data = {}) =>
             issubmit: '1',
             xddy_dygl_wypj_wdpfx: {
                 xdwwp_name: data.xdwwp_name,
+                xdww_id: data.xdww_id,
             }
         }
     })
 export const wdpfx_edit = (data = {}) =>
-    request({
-        url: '/xddy/dygl_wypj_wdpfx/edit',
-        data: {
-            issubmit: '1',
-            xdwwp_id: data.xdwwp_id,
-            xddy_dygl_wypj_wdpfx: {
-                xdwwp_name: data.xdwwp_name,
-            }
-        }
-    })
+  request({
+    url: "/xddy/dygl_wypj_wdpfx/edit",
+    data: {
+      issubmit: "1",
+      xdwwp_id: data.xdwwp_id,
+      xddy_dygl_wypj_wdpfx: {
+        xdwwp_name: data.xdwwp_name,
+        xdww_id: data.xdww_id,
+      },
+    },
+  });
 export const wdpfx_del = (data = {}) =>
     request({
         url: '/xddy/dygl_wypj_wdpfx/delete',

+ 1 - 0
src/views/wypj/wdsz/wdpfx/index.vue

@@ -109,6 +109,7 @@ export default {
         page: this.cur_page,
         limit: this.limit,
         keyword: this.keyword,
+        xdww_id: this.xdww_id,
       };
 
       wdpfx_list(data).then((res) => {

+ 11 - 7
src/views/wypj/wypj/index.vue

@@ -24,8 +24,8 @@
       </div>
     </div>
     <div class="mt20 content-box">
-      <h3 class="title">成长树</h3>
-      <ul class="mt20 ml20 type-list">
+      <!-- <h3 class="title">成长树</h3> -->
+      <!-- <ul class="mt20 ml20 type-list">
         <li>
           <span class="dot purple"></span>
           <span class="d-in-block v-mid">思想品德</span>
@@ -46,10 +46,11 @@
           <span class="dot blue"></span>
           <span class="d-in-block v-mid">其他</span>
         </li>
-      </ul>
-      <div class="mt30 text-center">
-        <img src="@/assets/tree.png" class="w60" alt="" />
-      </div>
+      </ul> -->
+      <!-- <div class="mt30 text-center"> -->
+        <!-- <img src="@/assets/tree.png" class="w60" alt="" /> -->
+        <theTree />
+      <!-- </div> -->
     </div>
   </div>
 </template>
@@ -57,7 +58,7 @@
 <script>
 import * as echarts from "echarts";
 import { grade_list, wypj_data } from "./api";
-
+import theTree from './tree.vue'
 export default {
   name: "index",
   data() {
@@ -68,6 +69,9 @@ export default {
       curInfo: {},
     };
   },
+  components: {
+    theTree
+  },
   methods: {
     getGradeList() {
       let data = {

+ 153 - 0
src/views/wypj/wypj/tree.vue

@@ -0,0 +1,153 @@
+<template>
+  <div class="w-full flex flex-col justify-start items-center  overflow-hidden ">
+    <div class="w-full flex justify-between items-center border-b py-2 px-5">
+      <h3 class="text-lg">成长树</h3>
+
+      <el-select class="w-400px" v-model="xh" filterable remote reserve-keyword placeholder="请输入学生姓名"
+        :remote-method="remoteMethod" :loading="loading" @change="xhChange" clearable @clear="remoteMethod" >
+        <el-option v-for="item in options" :key="item.xdxx_xsxh" :label="item.xdxx_xsxm + ' ' + item.xdxx_xsxh"
+          :value="item.xdxx_xsxh" />
+      </el-select>
+    </div>
+    <div id="d3" v-show="this.treeData"></div>
+    <el-empty v-show="!this.treeData"></el-empty>
+  </div>
+</template>
+
+<script>
+import request from '@/utils/request';
+import * as d3 from 'd3'
+console.log('d3 : ', d3)
+export default {
+  data() {
+    return {
+      treeData: null,
+      loading: false,
+      options: [],
+      xh: undefined
+    }
+  },
+  methods: {
+    // 获取树形数据
+    getTreeData() {
+      if (!this.xh) return;
+      request({
+        url: '/xddy/dygl_wypj_pjjl/tree_pjjl',
+        data: {
+          wdwp_xs_xjh: this.xh
+        }
+      }).then(res => {
+        if (res.code == '1') {
+          if (res.data.data?.length === 0) return;
+          this.treeData = {
+            name: '',
+            children: [{
+              name: '',
+              children: res.data.data.map(({ xdww_name, pfx_list }) => ({ name: xdww_name, children: pfx_list.map(({ xdwwp_name, wdwp_xs_df }) => ({ name: xdwwp_name + ' (' + wdwp_xs_df + ')' })) }))
+            }]
+          }
+
+
+
+          // Specify the chart’s dimensions.
+          const width = 820;
+          const height = 450;
+          const cx = width * 0.5; // adjust as needed to fit
+          const cy = height; // adjust as needed to fit
+          const radius = 360;
+
+          // Create a radial tree layout. The layout’s first dimension (x)
+          // is the angle, while the second (y) is the radius.
+          const tree = d3.tree()
+            .size([5 / 6 * Math.PI, radius])
+            .separation((a, b) => (a.parent == b.parent ? 1 : 2) / a.depth);
+
+          // Sort the tree and apply the layout.
+          const root = tree(d3.hierarchy(this.treeData)
+            .sort((a, b) => d3.ascending(a.data.name, b.data.name)));
+
+          // Creates the SVG container.
+          const svg = d3.select("#d3")
+            .append("svg")
+            .attr("width", width)
+            .attr("height", height)
+            .attr("viewBox", [-cx, -cy, width, height])
+            .attr("style", "width: 100%; height: auto; font: 10px sans-serif;")
+          // .attr("transform", "rotate(-70)");
+
+          // Append links.
+          svg.append("g")
+            .attr("fill", "none")
+            .attr("stroke", "rgb(134,61,34)")
+            .attr("stroke-opacity", 1)
+            .attr("stroke-linejoin", "round")
+            .selectAll()
+            .data(root.links())
+            .join("path")
+            .attr("d", d3.linkRadial()
+              .angle(d => d.x)
+              .radius(d => d.y))
+            .attr("stroke-width", (d) => (3 - d.source.depth) * 8)
+            .attr("stroke-linejoin", "round")
+            .attr("transform", "rotate(-70)");
+
+          // Append nodes.
+          svg.append("g")
+            .selectAll()
+            .data(root.descendants())
+            .join("circle")
+            .attr("transform", d => `rotate(${d.x * 180 / Math.PI - 90}) translate(${d.y},0)`)
+            .attr("fill", "rgb(134,61,34)")
+            .attr("r", 0)
+
+          // Append labels.
+          svg.append("g")
+            .attr("stroke-linejoin", "round")
+            .attr("stroke-width", 3)
+            .selectAll()
+            .data(root.descendants())
+            .join("text")
+            .attr("transform", d => `rotate(-70) rotate(${d.x * 180 / Math.PI - 90}) translate(${d.y},0) rotate(${d.x >= Math.PI ? 180 : 0})`)
+            .attr("dy", "0.51em")
+            .attr("x", d => d.x < Math.PI === !d.children ? 3 : -3)
+            .attr("text-anchor", d => d.x < Math.PI === !d.children ? "start" : "end")
+            .attr("paint-order", "stroke")
+            .attr("stroke", "white")
+            .attr("fill", "currentColor")
+            .text(d => d.data.name);
+
+
+          svg.node();
+
+        }
+
+      })
+    },
+    remoteMethod(keyword) {
+      this.loading = true
+      request({
+        url: '/xddy/dygl_xsczda_xs/index',
+        data: {
+          keyword
+        }
+      }).then(res => {
+        if (res.code == '1') {
+          this.options = res.data.page_data
+        }
+
+        this.loading = false
+      })
+    },
+    xhChange(val) {
+      if (!val) {
+        this.treeData = null
+        return;
+      }
+      this.getTreeData()
+    }
+  },
+  mounted() {
+    this.getTreeData()
+  }
+}
+</script>

+ 11 - 2
src/views/wypj/xsewm/index.vue

@@ -229,9 +229,18 @@ export default {
       this.firstForm.class = "";
     },
     showQr(item) {
-      console.log(item, 111);
       this.appSrc =
-        "xs," + item.xdwx_id + "," + item.xdwx_xsxh + "," + item.dept_id;
+        "http://60.188.226.44:8000/app/xddy/#/scanCode?xsxm=" +
+        item.xdwx_xsxm +
+        "&xsxh=" +
+        item.xdwx_xsxh +
+        "&sm_id=" +
+        item.sm_id +
+        "&token=" +
+        token +
+        "&xdwx_id=" +
+        item.xdwx_id;
+
       this.dialogVisible = true;
     },
     switchGrade() {