Pārlūkot izejas kodu

学籍卡模块优化

WINDOWS-7IFQK7E\EDY 1 gadu atpakaļ
vecāks
revīzija
bc098dd82e

+ 210 - 0
public/print.css

@@ -0,0 +1,210 @@
+.w-210mm {
+  width: 210mm
+}
+
+.relative {
+  position: relative
+}
+
+.px-18 {
+  padding-left: 4.5rem;
+  padding-right: 4.5rem
+}
+
+.py-4 {
+  padding-top: 1rem;
+  padding-bottom: 1rem
+}
+
+.min-h-40 {
+  min-height: 10rem
+}
+
+.text-sm {
+  font-size: .875rem;
+  line-height: 1.25rem
+}
+
+.z-100 {
+  z-index: 100
+}
+
+.w-42mm {
+  width: 42mm
+}
+
+.right-8 {
+  right: 2rem
+}
+
+.top-14 {
+  top: 3.5rem
+}
+
+.top-0 {
+  top: 0
+}
+
+.absolute {
+  position: absolute
+}
+
+.h-42mm {
+  height: 42mm
+}
+
+.whitespace-nowrap {
+  white-space: nowrap
+}
+
+.mt-1 {
+  margin-top: .25rem
+}
+
+.text-base {
+  font-size: 1rem;
+  line-height: 1.5rem
+}
+
+.justify-between {
+  -webkit-box-pack: justify;
+  -ms-flex-pack: justify;
+  -webkit-justify-content: space-between;
+  justify-content: space-between
+}
+
+.flex {
+  display: -webkit-box;
+  display: -ms-flexbox;
+  display: -webkit-flex;
+  display: flex
+}
+
+.flex-none {
+  -webkit-box-flex: 0;
+  -ms-flex: none;
+  -webkit-flex: none;
+  flex: none
+}
+
+.print_table {
+  print-color-adjust: exact;
+}
+
+.print_table thead {
+  display: table-header-group
+}
+
+.print_table thead td {
+  font-size: 26px;
+  font-weight: bold;
+  text-align: center;
+  padding-bottom: 2.5rem
+}
+
+.print_table>tr td {
+  padding-bottom: .5rem
+}
+
+/*/~ 打印时不生效 ~/
+.print_table tbody {
+  border: 2px solid #000;
+}*/
+
+.print_table tbody tr {
+  page-break-inside: avoid;
+}
+
+.print_table tbody tr:first-child td {
+  border-top: 2px solid #000;
+}
+
+.print_table tbody tr:last-child td {
+  border-bottom: 2px solid #000;
+}
+
+/* 获取表格中最后一个rowspan不为空的 td */
+/* 需要js配合 */
+.print_table tbody tr td[rowspan].last {
+  border-bottom: 2px solid #000;
+}
+
+.print_table tbody tr {
+  page-break-inside: avoid;
+}
+
+.print_table tbody td {
+  padding: 8px 8px;
+  /* border-bottom: 1px solid #000; */
+  border-top: 1px solid #000;
+}
+
+/* .print_table tbody td:not(:last-child) {
+  border-right: 1px solid #000;
+} */
+.print_table tbody td {
+  border-right: 1px solid #000;
+}
+
+.print_table tbody td:first-child:not(.ignore) {
+  border-left: 2px solid #000;
+}
+
+.print_table tbody td:last-child:not(.ignore) {
+  border-right: 2px solid #000;
+}
+
+
+
+/* 项目情况表 */
+.xmqkb_table {
+  print-color-adjust: exact;
+  font-size: 14px;
+  margin-bottom: 15px;
+}
+
+.xmqkb_table thead {
+  display: table-header-group;
+}
+
+.xmqkb_table thead td {
+  font-size: 26px;
+  font-weight: bold;
+  text-align: center;
+}
+
+.xmqkb_table .ml-10px {
+  margin-left: 10px;
+}
+
+.xmqkb_table .pl-15px {
+  padding-left: 15px;
+}
+
+.xmqkb_table .text-center {
+  text-align: center;
+}
+
+.xmqkb_table .break-all {
+  word-break: break-all;
+}
+
+.xmqkb_table tbody tr {
+  page-break-inside: avoid;
+}
+
+.xmqkb_table tr {
+  line-height: 30px;
+}
+
+.xmqkb_table tr.f5f7fa {
+  background: #f5f7fa;
+}
+
+.xmqkb_table tr:not(.not-line) td {
+  border-bottom: 1px solid #f1f1f1;
+}
+
+.xmqkb_table tr td {
+  padding: 8px 5px;
+}

+ 134 - 125
src/components/FileUpload/index.vue

@@ -1,148 +1,157 @@
 <template>
-    <el-upload
-        action="#"
-        :http-request="httpRequest"
-        :on-remove="onRemove"
-        :on-exceed="onExceed"
-        :before-upload="beforeUpload"
-        :file-list="FILE_LIST"
-        v-bind="attrs"
-    >
-        <template #default>
-            <slot>
-                <el-button size="small" type="primary">点击上传</el-button>
-            </slot>
-        </template>
-        <template #tip>
-            <slot name="tip"></slot>
-        </template>
-    </el-upload>
+  <el-upload
+    action="#"
+    :http-request="httpRequest"
+    :on-remove="onRemove"
+    :on-exceed="onExceed"
+    :before-upload="beforeUpload"
+    :file-list="FILE_LIST"
+    v-bind="attrs"
+  >
+    <template #default>
+      <slot>
+        <el-button size="small" type="primary">点击上传</el-button>
+      </slot>
+    </template>
+    <template #tip>
+      <slot name="tip"></slot>
+    </template>
+  </el-upload>
 </template>
 
 <script>
 import { defineComponent, ref, watch } from "@vue/composition-api";
 import { useUserStore } from "@/stores/user";
 import { request } from "@/utils/request";
-import { Message } from 'element-ui'
+import { Message } from "element-ui";
 
 export default defineComponent({
-    props: { part: String, full: String, size: Number },
-    setup(props, context) {
-        const attrs = context.attrs
-        const { token } = useUserStore()
+  props: { part: String, full: String, size: Number },
+  setup(props, context) {
+    const attrs = context.attrs;
+    const { token } = useUserStore();
 
-        const List_part = ref(props.part)
-        const List_full = ref(props.full)
-        console.log('file upload ', List_part.value, List_full.value);
+    const List_part = ref(props.part);
+    const List_full = ref(props.full);
+    console.log("file upload ", List_part.value, List_full.value);
 
-        const FILE_LIST = ref([])
-        if (List_part.value !== undefined && List_part.value !== '' && List_part.value !== null) {
-            FILE_LIST.value = List_part.value.split(';').map((part_url, idx) => ({
-                part_url,
-                url: window.globalVariables.api + part_url,
-                status: 1,
-                uid: Date.now() - idx,
-                name: part_url.split('/').pop()
-            }))
-        }
-        if (List_full.value !== undefined && List_full.value !== '' && List_full.value !== null) {
-            FILE_LIST.value = List_full.value.split(';').map((item, idx) => {
-                const [part_url, name] = item.split('|')
-                return ({
-                    part_url,
-                    url: window.globalVariables.api + part_url,
-                    status: 1,
-                    name,
-                    uid: Date.now() - idx
-                })
-            })
-        }
-
-        /**
-            * const STATUS_MAP = {
-            *   0: 'READY',
-            *   1: 'SUCCESS',
-            *   2: 'FAIL'
-            * }
-        */
+    const FILE_LIST = ref([]);
+    if (
+      List_part.value !== undefined &&
+      List_part.value !== "" &&
+      List_part.value !== null
+    ) {
+      FILE_LIST.value = List_part.value.split(";").map((part_url, idx) => ({
+        part_url,
+        url: window.globalVariables.api + part_url,
+        status: 1,
+        uid: Date.now() - idx,
+        name: part_url.split("/").pop(),
+      }));
+    }
+    if (
+      List_full.value !== undefined &&
+      List_full.value !== "" &&
+      List_full.value !== null
+    ) {
+      FILE_LIST.value = List_full.value.split(";").map((item, idx) => {
+        const [part_url, name] = item.split("|");
+        return {
+          part_url,
+          url: window.globalVariables.api + part_url,
+          status: 1,
+          name,
+          uid: Date.now() - idx,
+        };
+      });
+    }
 
-        function beforeUpload(file) {
-            if (props.size) {
-                const isLtSize = file.size / 1024 / 1024 < props.size;
-                if (!isLtSize) {
-                    Message.warning(`上传文件大小不能超过 ${props.size}MB!`);
-                }
-                return isLtSize;
-            }
+    /**
+     * const STATUS_MAP = {
+     *   0: 'READY',
+     *   1: 'SUCCESS',
+     *   2: 'FAIL'
+     * }
+     */
 
+    function beforeUpload(file) {
+      if (props.size) {
+        const isLtSize = file.size / 1024 / 1024 < props.size;
+        if (!isLtSize) {
+          Message.warning(`上传文件大小不能超过 ${props.size}MB!`);
         }
+        return isLtSize;
+      }
+    }
 
-        const httpRequest = ({ file }) => {
-            FILE_LIST.value.push({
-                status: 0,
-                raw: file,
-                uid: file.uid
-            })
-            const formData = new FormData();
-            formData.append("api", 'json');
-            formData.append('token', token);
-            formData.append("filedata", file);
-            formData.append('urltype', '1');
-            request({
-                url: 'upload/main/file',
-                data: formData,
-                timeout: 1000 * 60
-            })
-                .then(({ data }) => {
-                    const { url: part_url, file_name } = data
-                    const target = FILE_LIST.value.find(({ uid }) => uid === file.uid);
-                    target.status = 1
-                    target.url = part_url
-                    target.part_url = part_url
-                    target.name = file_name
-                    handleSuccess()
-                })
-        }
+    const httpRequest = ({ file }) => {
+      FILE_LIST.value.push({
+        status: 0,
+        raw: file,
+        uid: file.uid,
+      });
+      const formData = new FormData();
+      formData.append("api", "json");
+      formData.append("token", token);
+      formData.append("filedata", file);
+      formData.append("urltype", "2");
+      request({
+        url: "upload/main/file",
+        data: formData,
+        timeout: 1000 * 60,
+      }).then(({ data }) => {
+        const { url: part_url, file_name } = data;
+        const target = FILE_LIST.value.find(({ uid }) => uid === file.uid);
+        target.status = 1;
+        target.url = part_url;
+        target.part_url = part_url;
+        target.name = file_name;
+        handleSuccess();
+      });
+    };
 
-        function handleSuccess() {
-            if (FILE_LIST.value.every(item => item.status === 1)) {
-                let part = [];
-                let full = [];
-                FILE_LIST.value.forEach(item => {
-                    part.push(item.part_url);
-                    full.push(`${item.part_url}|${item.name}`);
-                })
-                List_part.value = part.join(';')
-                List_full.value = full.join(';')
-            }
-        }
+    function handleSuccess() {
+      if (FILE_LIST.value.every((item) => item.status === 1)) {
+        let part = [];
+        let full = [];
+        FILE_LIST.value.forEach((item) => {
+          part.push(item.part_url);
+          full.push(`${item.part_url}|${item.name}`);
+        });
+        List_part.value = part.join(";");
+        List_full.value = full.join(";");
+      }
+    }
 
-        function onRemove(file, fileList) {
-            FILE_LIST.value = fileList
-            handleSuccess()
-        }
-        function onExceed() {
-            Message.warning(`最多允许上传${attrs.limit}个文件`)
-        }
+    function onRemove(file, fileList) {
+      FILE_LIST.value = fileList;
+      handleSuccess();
+    }
+    function onExceed() {
+      Message.warning(`最多允许上传${attrs.limit}个文件`);
+    }
 
-        watch(() => List_part.value, () => {
-            context.emit('input', List_part.value)
+    watch(
+      () => List_part.value,
+      () => {
+        context.emit("input", List_part.value);
 
-            context.emit('update:part', List_part.value)
-            context.emit('update:full', List_full.value)
+        context.emit("update:part", List_part.value);
+        context.emit("update:full", List_full.value);
 
-            context.emit('success', FILE_LIST.value)
-        })
+        context.emit("success", FILE_LIST.value);
+      }
+    );
 
-        return {
-            attrs,
-            httpRequest,
-            FILE_LIST,
-            onRemove,
-            onExceed,
-            beforeUpload
-        }
-    }
-})
+    return {
+      attrs,
+      httpRequest,
+      FILE_LIST,
+      onRemove,
+      onExceed,
+      beforeUpload,
+    };
+  },
+});
 </script>
 

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 114 - 12
src/stores/user.js


+ 113 - 171
src/views/xsxjk/bbgl/bbxq/xqlb/index.vue

@@ -248,7 +248,7 @@
         </el-form-item>
         <div class="total mb-5">
           <el-form-item label-width="0">
-            <div class="flex justify-between">
+            <div class="">
               <div class="w-80px">
                 <h4 class="mb20 ml20 font-size-15 color-2">家庭主要</h4>
               </div>
@@ -347,141 +347,105 @@
         <el-button type="primary" @click="formSubmit">确 定</el-button>
       </div>
     </el-dialog>
-    <el-dialog :visible.sync="detailDialogFormVisible" width="700px">
-      <div id="printBox">
-        <h3 class="text-center mb45">XXX学校高等教育学生学籍卡</h3>
-        <el-form ref="form" :model="dialogForm" label-width="0px">
-          <table class="form-table" cellpadding="0" cellspacing="0">
-            <tr>
-              <td>
-                <h3 class="font-size-14">学生姓名</h3>
-              </td>
-              <td>
-                <div class="font-size-14">
-                  {{ detailInfo.xdx_xsxm }}
-                </div>
-              </td>
-              <td>
-                <h3 class="font-size-14">性别</h3>
-              </td>
-              <td>
-                <div class="font-size-14">{{ detailInfo.xdx_xb_option_n }}</div>
-              </td>
-
-              <td rowspan="5" class="text-center">
-                <img
-                  v-if="detailInfo.xdx_sczp"
-                  style="width: 120px; height: 160px"
-                  :src="detailInfo.xdx_sczp"
-                  alt=""
-                />
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <h3 class="font-size-14">民族</h3>
-              </td>
-              <td>
-                <div class="font-size-14">{{ detailInfo.xdx_mz }}</div>
-              </td>
-              <td>
-                <h3 class="font-size-14">出生年月</h3>
-              </td>
-              <td>
-                <div class="font-size-14">{{ detailInfo.xdx_csrq }}</div>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <h3 class="font-size-14">身份证号</h3>
-              </td>
-              <td>
-                <div class="font-size-14">{{ detailInfo.xdx_zjhm }}</div>
-              </td>
-              <td>
-                <h3 class="font-size-14">政治面貌</h3>
-              </td>
-              <td>
-                <div class="font-size-14">{{ detailInfo.xdx_zzmm }}</div>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <h3 class="font-size-14">籍贯</h3>
-              </td>
-              <td>
-                <div class="font-size-14">{{ detailInfo.xdx_jg }}</div>
-              </td>
-              <td>
-                <h3 class="font-size-14">家庭住址</h3>
-              </td>
-              <td>
-                <div class="font-size-14">{{ detailInfo.xdx_jtzz }}</div>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <h3 class="font-size-14" style="height: 53px">爱好</h3>
-              </td>
-              <td colspan="3">
-                <div class="font-size-14" style="height: 53px">
-                  {{ detailInfo.xdx_ahtc }}
-                </div>
-              </td>
-            </tr>
-          </table>
-
-          <table class="form-table-two" cellpadding="0" cellspacing="0">
-            <tr v-if="jtcyDetailInfo.length > 0">
-              <td rowspan="3" class="w20">
-                <h3 class="font-size-14">家庭主要</h3>
-              </td>
-              <td class="w10">
-                <h3 class="font-size-14">称谓</h3>
-              </td>
-              <td class="w10">
-                <h3 class="font-size-14">姓名</h3>
-              </td>
-              <td class="w15">
-                <h3 class="font-size-14">政治面貌</h3>
-              </td>
-              <td class="w20">
-                <h3 class="font-size-14">工作单位</h3>
-              </td>
-              <td class="w10">
-                <h3 class="font-size-14">职务</h3>
-              </td>
-              <td class="w20">
-                <h3 class="font-size-14">手机号码</h3>
-              </td>
-            </tr>
-
-            <tr v-for="(item, index) in jtcyDetailInfo" :key="index">
-              <td>
-                <div class="font-size-14">{{ item.xdxj_cw }}</div>
-              </td>
-              <td>
-                <div class="font-size-14">{{ item.xdxj_xm }}</div>
-              </td>
-              <td>
-                <div class="font-size-14">{{ item.xdxj_zzmm }}</div>
-              </td>
-              <td>
-                <div class="font-size-14">{{ item.xdxj_gzdw }}</div>
-              </td>
-              <td>
-                <div class="font-size-14">{{ item.xdxj_zw }}</div>
-              </td>
-              <td>
-                <div class="font-size-14">{{ item.xdxj_sjhm }}</div>
-              </td>
-            </tr>
-          </table>
-        </el-form>
-      </div>
-      <div slot="footer" class="text-center">
-        <el-button @click="formCancel">取 消</el-button>
-        <el-button type="primary" @click="printHTML">打印</el-button>
+    <el-dialog :visible.sync="detailDialogFormVisible" width="820px">
+      <div class="w-210mm mx-auto">
+        <div
+          class="py-4 px-18 w-210mm relative min-h-40 text-black"
+          id="printBox"
+        >
+          <el-form ref="form" :model="dialogForm">
+            <table
+              class="print_table"
+              width="100%"
+              cellpadding="0"
+              cellspacing="0"
+            >
+              <thead>
+                <tr>
+                  <td colspan="14">{{ school_name }}学生学籍卡</td>
+                </tr>
+              </thead>
+              <!-- <tr>
+                <td colspan="14">景宁畲族自治县教育局</td>
+              </tr> -->
+              <tbody>
+                <tr>
+                  <td colspan="2">学生姓名</td>
+                  <td colspan="4">{{ detailInfo.xdx_xsxm }}</td>
+                  <td colspan="2">性别</td>
+                  <td colspan="4">
+                    {{ detailInfo.xdx_xb_option_n }}
+                  </td>
+                  <td
+                    rowspan="4"
+                    style="width: 114px; height: 156px; padding: 0 0 0 1px"
+                  >
+                    <img
+                      v-if="detailInfo.xdx_sczp"
+                      style="width: 114px; height: 156px"
+                      :src="detailInfo.xdx_sczp"
+                      alt=""
+                    />
+                  </td>
+                </tr>
+                <tr>
+                  <td colspan="2">民族</td>
+                  <td colspan="4">{{ detailInfo.xdx_mz }}</td>
+                  <td colspan="2">出生年月</td>
+                  <td colspan="4" class="ignore">{{ detailInfo.xdx_csrq }}</td>
+                </tr>
+                <tr>
+                  <td colspan="2">身份证号</td>
+                  <td colspan="4">{{ detailInfo.xdx_zjhm }}</td>
+                  <td colspan="2">政治面貌</td>
+                  <td colspan="4" class="ignore">{{ detailInfo.xdx_zzmm }}</td>
+                </tr>
+                <tr>
+                  <td colspan="2">籍贯</td>
+                  <td colspan="4">{{ detailInfo.xdx_jg }}</td>
+                  <td colspan="2"></td>
+                  <td colspan="4" class="ignore"></td>
+                </tr>
+                <tr>
+                  <td colspan="2">家庭住址</td>
+                  <td colspan="12">{{ detailInfo.xdx_jtzz }}</td>
+                </tr>
+                <tr>
+                  <td colspan="2">爱好</td>
+                  <td colspan="12">{{ detailInfo.xdx_ahtc }}</td>
+                </tr>
+                <tr v-if="jtcyDetailInfo.length > 0">
+                  <td
+                    class="last"
+                    colspan="2"
+                    :rowspan="jtcyDetailInfo.length + 1"
+                  >
+                    家庭主要
+                  </td>
+                  <td colspan="2">称谓</td>
+                  <td colspan="2">姓名</td>
+                  <td colspan="2">政治面貌</td>
+                  <td colspan="2">工作单位</td>
+                  <td colspan="2">职务</td>
+                  <td colspan="2">手机号码</td>
+                </tr>
+
+                <tr v-for="(item, index) in jtcyDetailInfo" :key="index">
+                  <td colspan="2" class="ignore">{{ item.xdxj_cw }}</td>
+                  <td colspan="2">{{ item.xdxj_xm }}</td>
+                  <td colspan="2">{{ item.xdxj_zzmm }}</td>
+                  <td colspan="2">{{ item.xdxj_gzdw }}</td>
+                  <td colspan="2">{{ item.xdxj_zw }}</td>
+                  <td colspan="2">{{ item.xdxj_sjhm }}</td>
+                </tr>
+              </tbody>
+            </table>
+          </el-form>
+        </div>
+        <div slot="footer" class="text-center">
+          <el-button @click="formCancel">取 消</el-button>
+          <el-button type="primary" @click="printHTML">打印</el-button>
+        </div>
       </div>
     </el-dialog>
   </div>
@@ -506,7 +470,7 @@ import {
 } from "./api";
 
 import { useUserStore } from "@/stores/user";
-const { token } = useUserStore();
+const { token, user_org } = useUserStore();
 import FileUpload from "@/components/FileUpload/index.vue";
 export default {
   name: "index",
@@ -624,6 +588,7 @@ export default {
           key: "xdxj_sjhm",
         },
       ],
+      school_name: "",
     };
   },
   methods: {
@@ -966,7 +931,7 @@ export default {
         if (res.code == 1) {
           this.detailInfo = res.data.one_info;
           let a = this.detailInfo.xdx_sczp.indexOf("|");
-          this.detailInfo.xdx_sczp = this.detailInfo.xdx_sczp.substring(0, a);
+          this.detailInfo.xdx_sczp =  window.globalVariables.api +this.detailInfo.xdx_sczp.substring(0, a);
         }
       });
       let data1 = {
@@ -996,6 +961,8 @@ export default {
       });
     },
     formCancel() {
+      this.detailInfo = {};
+      this.jtcyDetailInfo = {};
       this.dialogFormVisible = false;
       this.detailDialogFormVisible = false;
     },
@@ -1019,12 +986,20 @@ export default {
     this.getListData();
     this.teamListData();
     this.getClassData();
+    if (user_org) {
+      user_org.map((item) => {
+        if (item.uo_type === "2") {
+          this.school_name = item.uo_name;
+        }
+      });
+    }
   },
 };
 </script>
 
 
 <style lang="scss" scoped>
+@import "/public/print.css";
 ::v-deep .el-input {
   width: 180px;
 }
@@ -1034,38 +1009,5 @@ export default {
   font-weight: 600;
   line-height: 22px;
 }
-.form-table {
-  width: 100%;
-  border-collapse: collapse;
-  padding: auto;
-  td {
-    width: 20%;
-    height: 30px;
-    line-height: 30px;
-    padding: 4px 4px 5px 5px;
-    border: 1px solid #dbdbdb;
-  }
-  td:nth-child(odd) {
-    background-color: #f0f3f8;
-  }
-  td:nth-child(5) {
-    background-color: #fff;
-  }
-}
-.form-table-two {
-  width: 100%;
-  border-collapse: collapse;
-  padding: auto;
-  td {
-    height: 30px;
-    line-height: 30px;
-    padding: 4px 4px 5px 5px;
-    border: 1px solid #dbdbdb;
-    border-top: none;
-  }
-  tr:first-child {
-    background-color: #f0f3f8;
-  }
-}
 </style>
 

+ 14 - 12
src/views/xsxjk/hmc/index.vue

@@ -238,7 +238,7 @@
         </el-form-item>
         <div class="total mb-5">
           <el-form-item label-width="0">
-            <div class="flex justify-between">
+            <div class="">
               <div class="w-80px">
                 <h4 class="mb20 ml20 font-size-15 color-2">家庭主要</h4>
               </div>
@@ -354,7 +354,7 @@
             >导入模板下载</el-button
           >
         </el-form-item>
-        <el-form-item label="学期" prop="team_id">
+        <!-- <el-form-item label="学期" prop="team_id">
           <el-select
             v-model="importForm.team_id"
             placeholder="请选择学期"
@@ -369,7 +369,7 @@
               :value="item.team_id"
             ></el-option>
           </el-select>
-        </el-form-item>
+        </el-form-item> -->
       </el-form>
       <div slot="footer">
         <el-button @click="formCancel">取 消</el-button>
@@ -531,21 +531,21 @@ export default {
     },
     importAll() {
       this.importFormVisible = true;
-      this.importForm = {
-        team_id: "",
-        team_name: "",
-      };
+      // this.importForm = {
+      //   team_id: "",
+      //   team_name: "",
+      // };
     },
     httpRequest(file) {
-      if (!this.importForm.team_id) {
-        return Message.error("请选择学期。");
-      }
+      // if (!this.importForm.team_id) {
+      //   return Message.error("请选择学期。");
+      // }
 
       const formData = new FormData();
       formData.append("token", token);
       formData.append("issubmit", "1");
-      formData.append("team_id", this.importForm.team_id);
-      formData.append("team_name", this.importForm.team_name);
+      // formData.append("team_id", this.importForm.team_id);
+      // formData.append("team_name", this.importForm.team_name);
       formData.append("file", file.file);
 
       request({
@@ -804,6 +804,8 @@ export default {
         xdx_szdxz: this.dialogForm.szdxz,
         xdx_hjry: this.dialogForm.xdx_hjry,
       };
+      console.log(data, 1111);
+
       if (!this.isEdit) {
         hmc_add(data).then((res) => {
           if (res.code == 1) {

+ 145 - 172
src/views/xsxjk/xjk/index.vue

@@ -3,6 +3,7 @@
     <div class="d-flex flex-between pt7">
       <div>
         <el-button type="primary" @click="exportAll">导出</el-button>
+        <el-button type="primary" @click="addData">生成学生人数统计</el-button>
         <!-- <el-button type="primary" @click="addData">添加</el-button>
       <el-button
         type="danger"
@@ -55,6 +56,10 @@
     </div>
 
     <el-table
+      class="print_table"
+      width="100%"
+      cellpadding="0"
+      cellspacing="0"
       :data="tableData"
       tooltip-effect="dark"
       v-loading="loading"
@@ -120,140 +125,105 @@
       ></el-pagination>
     </footer>
 
-    <el-dialog :visible.sync="detailDialogFormVisible" width="700px">
-      <div id="printBox">
-        <h3 class="text-center mb45">XXX学校高等教育学生学籍卡</h3>
-        <el-form ref="form" :model="dialogForm" label-width="0px">
-          <table class="form-table" cellpadding="0" cellspacing="0">
-            <tr>
-              <td>
-                <h3 class="font-size-14">学生姓名</h3>
-              </td>
-              <td>
-                <div class="font-size-14">
-                  {{ detailInfo.xdx_xsxm }}
-                </div>
-              </td>
-              <td>
-                <h3 class="font-size-14">性别</h3>
-              </td>
-              <td>
-                <div class="font-size-14">{{ detailInfo.xdx_xb_option_n }}</div>
-              </td>
-
-              <td rowspan="5" class="text-center">
-                <img
-                  v-if="detailInfo.xdx_sczp"
-                  style="width: 120px; height: 160px"
-                  :src="detailInfo.xdx_sczp"
-                  alt=""
-                />
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <h3 class="font-size-14">民族</h3>
-              </td>
-              <td>
-                <div class="font-size-14">{{ detailInfo.xdx_mz }}</div>
-              </td>
-              <td>
-                <h3 class="font-size-14">出生年月</h3>
-              </td>
-              <td>
-                <div class="font-size-14">{{ detailInfo.xdx_csrq }}</div>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <h3 class="font-size-14">身份证号</h3>
-              </td>
-              <td>
-                <div class="font-size-14">{{ detailInfo.xdx_zjhm }}</div>
-              </td>
-              <td>
-                <h3 class="font-size-14">政治面貌</h3>
-              </td>
-              <td>
-                <div class="font-size-14">{{ detailInfo.xdx_zzmm }}</div>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <h3 class="font-size-14">籍贯</h3>
-              </td>
-              <td>
-                <div class="font-size-14">{{ detailInfo.xdx_jg }}</div>
-              </td>
-              <td>
-                <h3 class="font-size-14">家庭住址</h3>
-              </td>
-              <td>
-                <div class="font-size-14">{{ detailInfo.xdx_jtzz }}</div>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <h3 class="font-size-14" style="height: 53px">爱好</h3>
-              </td>
-              <td colspan="3">
-                <div class="font-size-14" style="height: 53px">
-                  {{ detailInfo.xdx_ahtc }}
-                </div>
-              </td>
-            </tr>
-          </table>
-          <table class="form-table-two" cellpadding="0" cellspacing="0">
-            <tr v-if="jtcyDetailInfo.length > 0">
-              <td rowspan="3" class="w20">
-                <h3 class="font-size-14">家庭主要</h3>
-              </td>
-              <td class="w10">
-                <h3 class="font-size-14">称谓</h3>
-              </td>
-              <td class="w10">
-                <h3 class="font-size-14">姓名</h3>
-              </td>
-              <td class="w15">
-                <h3 class="font-size-14">政治面貌</h3>
-              </td>
-              <td class="w20">
-                <h3 class="font-size-14">工作单位</h3>
-              </td>
-              <td class="w10">
-                <h3 class="font-size-14">职务</h3>
-              </td>
-              <td class="w20">
-                <h3 class="font-size-14">手机号码</h3>
-              </td>
-            </tr>
+    <el-dialog :visible.sync="detailDialogFormVisible" width="820px">
+      <div class="w-210mm mx-auto">
+        <div
+          class="py-4 px-18 w-210mm relative min-h-40 text-black"
+          id="printBox"
+        >
+          <el-form ref="form" :model="dialogForm">
+            <table
+              class="print_table"
+              width="100%"
+              cellpadding="0"
+              cellspacing="0"
+            >
+              <thead>
+                <tr>
+                  <td colspan="14">{{ school_name }}学生学籍卡</td>
+                </tr>
+              </thead>
+              <!-- <tr>
+                <td colspan="14">景宁畲族自治县教育局</td>
+              </tr> -->
+              <tbody>
+                <tr>
+                  <td colspan="2">学生姓名</td>
+                  <td colspan="4">{{ detailInfo.xdx_xsxm }}</td>
+                  <td colspan="2">性别</td>
+                  <td colspan="4">
+                    {{ detailInfo.xdx_xb_option_n }}
+                  </td>
+                  <td
+                    rowspan="4"
+                    style="width: 114px; height: 156px; padding: 0 0 0 1px"
+                  >
+                    <img
+                      v-if="detailInfo.xdx_sczp"
+                      style="width: 114px; height: 156px"
+                      :src="detailInfo.xdx_sczp"
+                      alt=""
+                    />
+                  </td>
+                </tr>
+                <tr>
+                  <td colspan="2">民族</td>
+                  <td colspan="4">{{ detailInfo.xdx_mz }}</td>
+                  <td colspan="2">出生年月</td>
+                  <td colspan="4" class="ignore">{{ detailInfo.xdx_csrq }}</td>
+                </tr>
+                <tr>
+                  <td colspan="2">身份证号</td>
+                  <td colspan="4">{{ detailInfo.xdx_zjhm }}</td>
+                  <td colspan="2">政治面貌</td>
+                  <td colspan="4" class="ignore">{{ detailInfo.xdx_zzmm }}</td>
+                </tr>
+                <tr>
+                  <td colspan="2">籍贯</td>
+                  <td colspan="4">{{ detailInfo.xdx_jg }}</td>
+                  <td colspan="2"></td>
+                  <td colspan="4" class="ignore"></td>
+                </tr>
+                <tr>
+                  <td colspan="2">家庭住址</td>
+                  <td colspan="12">{{ detailInfo.xdx_jtzz }}</td>
+                </tr>
+                <tr>
+                  <td colspan="2">爱好</td>
+                  <td colspan="12">{{ detailInfo.xdx_ahtc }}</td>
+                </tr>
+                <tr v-if="jtcyDetailInfo.length > 0">
+                  <td
+                    class="last"
+                    colspan="2"
+                    :rowspan="jtcyDetailInfo.length + 1"
+                  >
+                    家庭主要
+                  </td>
+                  <td colspan="2">称谓</td>
+                  <td colspan="2">姓名</td>
+                  <td colspan="2">政治面貌</td>
+                  <td colspan="2">工作单位</td>
+                  <td colspan="2">职务</td>
+                  <td colspan="2">手机号码</td>
+                </tr>
 
-            <tr v-for="(item, index) in jtcyDetailInfo" :key="index">
-              <td>
-                <div class="font-size-14">{{ item.xdxj_cw }}</div>
-              </td>
-              <td>
-                <div class="font-size-14">{{ item.xdxj_xm }}</div>
-              </td>
-              <td>
-                <div class="font-size-14">{{ item.xdxj_zzmm }}</div>
-              </td>
-              <td>
-                <div class="font-size-14">{{ item.xdxj_gzdw }}</div>
-              </td>
-              <td>
-                <div class="font-size-14">{{ item.xdxj_zw }}</div>
-              </td>
-              <td>
-                <div class="font-size-14">{{ item.xdxj_sjhm }}</div>
-              </td>
-            </tr>
-          </table>
-        </el-form>
-      </div>
-      <div slot="footer" class="text-center">
-        <el-button @click="formCancel">取 消</el-button>
-        <el-button type="primary" @click="printHTML">打印</el-button>
+                <tr v-for="(item, index) in jtcyDetailInfo" :key="index">
+                  <td colspan="2" class="ignore">{{ item.xdxj_cw }}</td>
+                  <td colspan="2">{{ item.xdxj_xm }}</td>
+                  <td colspan="2">{{ item.xdxj_zzmm }}</td>
+                  <td colspan="2">{{ item.xdxj_gzdw }}</td>
+                  <td colspan="2">{{ item.xdxj_zw }}</td>
+                  <td colspan="2">{{ item.xdxj_sjhm }}</td>
+                </tr>
+              </tbody>
+            </table>
+          </el-form>
+        </div>
+        <div slot="footer" class="text-center">
+          <el-button @click="formCancel">取 消</el-button>
+          <el-button type="primary" @click="printHTML">打印</el-button>
+        </div>
       </div>
     </el-dialog>
   </div>
@@ -263,7 +233,7 @@
 import { xjk_list, xjk_detail, family_list, xqgl_list } from "./api";
 import { request } from "@/utils/request";
 import { useUserStore } from "@/stores/user";
-const { token } = useUserStore();
+const { token, user_org } = useUserStore();
 export default {
   name: "index",
   data() {
@@ -317,9 +287,32 @@ export default {
       detailDialogFormVisible: false,
       jtcyDetailInfo: [],
       team_id: "",
+      school_name: "",
+      dept_id: "",
     };
   },
   methods: {
+    addData() {
+      this.loading = true;
+      request({
+        url: "xddy/dygl_xsrstjlb/recreate_data",
+        data: {
+          token: token,
+          site: "jnmf",
+          client: "web",
+          api: "json",
+          page: "1",
+          limit: "10000",
+          issubmit: 1,
+          dept_id: this.dept_id,
+        },
+      }).then((res) => {
+        if (res.code == "1") {
+          this.loading = false;
+          this.getListData();
+        }
+      });
+    },
     printHTML() {
       this.$print({
         printable: "printBox",
@@ -332,7 +325,7 @@ export default {
       this.cur_page = val;
       this.getListData();
     },
-    async getListData() {
+    getListData() {
       this.loading = true;
       xqgl_list({ limit: 999 }).then((res) => {
         if (res.code == 1) {
@@ -347,7 +340,7 @@ export default {
                 xdx_xsxh: this.xdx_xsxh,
                 xdx_lxfs: this.xdx_lxfs,
                 class_name: this.class_name,
-                team_id: this.team_id,
+                // team_id: this.team_id,
               };
               xjk_list(data).then((res) => {
                 this.loading = false;
@@ -379,7 +372,9 @@ export default {
         if (res.code == 1) {
           this.detailInfo = res.data.one_info;
           let a = this.detailInfo.xdx_sczp.indexOf("|");
-          this.detailInfo.xdx_sczp = this.detailInfo.xdx_sczp.substring(0, a);
+          this.detailInfo.xdx_sczp =
+            window.globalVariables.api +
+            this.detailInfo.xdx_sczp.substring(0, a);
           console.log(this.detailInfo.xdx_sczp, 123);
         }
       });
@@ -394,6 +389,9 @@ export default {
     },
 
     formCancel() {
+      this.detailInfo = {};
+      this.jtcyDetailInfo = {};
+      this.dialogFormVisible = false;
       this.detailDialogFormVisible = false;
     },
 
@@ -417,47 +415,22 @@ export default {
   },
   mounted() {
     this.getListData();
+    if (user_org) {
+      user_org.map((item) => {
+        if (item.uo_type === "2") {
+          this.school_name = item.uo_name;
+          this.dept_id = item.uo_id;
+        }
+      });
+    }
   },
 };
 </script>
 
 
-
 <style lang="scss" scoped>
+@import "/public/print.css";
 ::v-deep .el-input {
   width: 160px;
 }
-.form-table {
-  width: 100%;
-  border-collapse: collapse;
-  padding: auto;
-  td {
-    width: 20%;
-    height: 30px;
-    line-height: 30px;
-    padding: 4px 4px 5px 5px;
-    border: 1px solid #dbdbdb;
-  }
-  td:nth-child(odd) {
-    background-color: #f0f3f8;
-  }
-  td:nth-child(5) {
-    background-color: #fff;
-  }
-}
-.form-table-two {
-  width: 100%;
-  border-collapse: collapse;
-  padding: auto;
-  td {
-    height: 30px;
-    line-height: 30px;
-    padding: 4px 4px 5px 5px;
-    border: 1px solid #dbdbdb;
-    border-top: none;
-  }
-  tr:first-child {
-    background-color: #f0f3f8;
-  }
-}
-</style>
+</style>

+ 155 - 185
src/views/xsxjk/xsrstjlb/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-form class="flex-row border-bottom-1" :inline="true">
+    <!-- <el-form class="flex-row border-bottom-1" :inline="true">
       <h3 class="font-size-16" style="position: relative; top: -2px">
         学校总人数
       </h3>
@@ -27,12 +27,9 @@
         <div id="lineBox" style="height: 500px"></div>
       </div>
       <div id="pieBox" class="w30" style="height: 500px"></div>
-    </div>
+    </div> -->
     <div class="d-flex flex-between pt7">
       <div>
-        <el-button type="primary" v-loading="loading" @click="addData"
-          >生成数据</el-button
-        >
         <el-button type="primary" @click="exportAll">导出打印</el-button>
         <el-button
           type="danger"
@@ -191,155 +188,165 @@ export default {
   },
 
   methods: {
-    getLine() {
-      var chartDom = document.getElementById("lineBox");
-      var myChart = echarts.init(chartDom);
-      var option;
-      option = {
-        xAxis: {
-          type: "category",
-          boundaryGap: false,
-          data: this.lineXData,
-        },
-        yAxis: {
-          type: "value",
-          axisLabel: {
-            formatter: function (value) {
-              if (Math.floor(value) === value) {
-                return value; // 显示整数刻度
-              }
-              return ""; // 不显示小数刻度
-            },
-          },
-        },
-        grid: {
-          left: "3%",
-          right: "5%",
-          bottom: "3%",
-          containLabel: true,
-        },
-        series: [
-          {
-            data: this.lineData,
-            type: "line",
-            smooth: true,
-            label: {
-              show: true,
-              position: "top",
-            },
-            areaStyle: {
-              color: "#4351FF",
-              opacity: ".15",
-            },
-            lineStyle: {
-              color: "#4351FF",
-            },
-          },
-        ],
-      };
-      option && myChart.setOption(option);
-    },
-    getPie() {
-      var chartDom = document.getElementById("pieBox");
-      var myChart = echarts.init(chartDom);
-      var option;
-      option = {
-        tooltip: {
-          trigger: "item",
-        },
-        legend: {
-          top: "5%",
-          left: "center",
-        },
-        series: [
-          {
-            type: "pie",
-            radius: ["40%", "70%"],
-            avoidLabelOverlap: false,
-            itemStyle: {
-              borderRadius: 10,
-              borderColor: "#fff",
-              borderWidth: 2,
-            },
-            color: [
-              "#4351FF",
-              {
-                type: "linear",
-                x: 0,
-                y: 0,
-                x2: 0,
-                y2: 1,
-                colorStops: [
-                  {
-                    offset: 0,
-                    color: "#FBB0BF", // 0% 处的颜色
-                  },
-                  {
-                    offset: 1,
-                    color: "#FBB0BF", // 100% 处的颜色
-                  },
-                ],
-                global: false, // 缺省为 false
-              },
-            ],
-            label: {
-              show: false,
-              position: "center",
-            },
-            emphasis: {
-              label: {
-                show: true,
-                fontSize: "40",
-                fontWeight: "bold",
-              },
-            },
-            labelLine: {
-              show: false,
-            },
-            data: this.pieData,
-          },
-        ],
-      };
+    // getLine() {
+    //   var chartDom = document.getElementById("lineBox");
+    //   var myChart = echarts.init(chartDom);
+    //   var option;
+    //   option = {
+    //     xAxis: {
+    //       type: "category",
+    //       boundaryGap: false,
+    //       data: this.lineXData,
+    //     },
+    //     yAxis: {
+    //       type: "value",
+    //       axisLabel: {
+    //         formatter: function (value) {
+    //           if (Math.floor(value) === value) {
+    //             return value; // 显示整数刻度
+    //           }
+    //           return ""; // 不显示小数刻度
+    //         },
+    //       },
+    //     },
+    //     grid: {
+    //       left: "3%",
+    //       right: "5%",
+    //       bottom: "3%",
+    //       containLabel: true,
+    //     },
+    //     series: [
+    //       {
+    //         data: this.lineData,
+    //         type: "line",
+    //         smooth: true,
+    //         label: {
+    //           show: true,
+    //           position: "top",
+    //         },
+    //         areaStyle: {
+    //           color: "#4351FF",
+    //           opacity: ".15",
+    //         },
+    //         lineStyle: {
+    //           color: "#4351FF",
+    //         },
+    //       },
+    //     ],
+    //   };
+    //   option && myChart.setOption(option);
+    // },
+    // getPie() {
+    //   var chartDom = document.getElementById("pieBox");
+    //   var myChart = echarts.init(chartDom);
+    //   var option;
+    //   option = {
+    //     tooltip: {
+    //       trigger: "item",
+    //     },
+    //     legend: {
+    //       top: "5%",
+    //       left: "center",
+    //     },
+    //     series: [
+    //       {
+    //         type: "pie",
+    //         radius: ["40%", "70%"],
+    //         avoidLabelOverlap: false,
+    //         itemStyle: {
+    //           borderRadius: 10,
+    //           borderColor: "#fff",
+    //           borderWidth: 2,
+    //         },
+    //         color: [
+    //           "#4351FF",
+    //           {
+    //             type: "linear",
+    //             x: 0,
+    //             y: 0,
+    //             x2: 0,
+    //             y2: 1,
+    //             colorStops: [
+    //               {
+    //                 offset: 0,
+    //                 color: "#FBB0BF", // 0% 处的颜色
+    //               },
+    //               {
+    //                 offset: 1,
+    //                 color: "#FBB0BF", // 100% 处的颜色
+    //               },
+    //             ],
+    //             global: false, // 缺省为 false
+    //           },
+    //         ],
+    //         label: {
+    //           show: false,
+    //           position: "center",
+    //         },
+    //         emphasis: {
+    //           label: {
+    //             show: true,
+    //             fontSize: "40",
+    //             fontWeight: "bold",
+    //           },
+    //         },
+    //         labelLine: {
+    //           show: false,
+    //         },
+    //         data: this.pieData,
+    //       },
+    //     ],
+    //   };
 
-      option && myChart.setOption(option);
-    },
+    //   option && myChart.setOption(option);
+    // },
     handleCurrentChange(val) {
       this.cur_page = val;
       this.getListData();
     },
     getListData() {
       this.loading = true;
-      let data = {
-        page: this.cur_page,
-        limit: this.limit,
-        keyword: this.keyword,
-        team_id: this.firstForm.team,
-        grade_id: this.firstForm.grade,
-        num: this.num,
-      };
+      team_search({ limit: 999 }).then((res) => {
+        if (res.code == 1) {
+          this.teamList = res.data.page_data;
+          this.teamList.map((item) => {
+            if (item.team_current_option_k == "1") {
+              this.team_id = item.team_id;
+              let data = {
+                page: this.cur_page,
+                limit: this.limit,
+                keyword: this.keyword,
+                team_id: this.team_id,
+                grade_id: this.firstForm.grade,
+                num: this.num,
+              };
 
-      rstj_list(data).then((res) => {
-        this.loading = false;
-        this.tableData = res.data.page_data;
-        let leftData = res.data.chats.left;
-        this.lineData = [];
-        this.lineXData = [];
-        leftData.map((item) => {
-          this.lineData.push(item.num);
-          this.lineXData.push(item.team_name);
-        });
-        let rightData = res.data.chats.right;
-        this.pieData = [];
-        rightData.map((item) => {
-          this.pieData.push({ value: item.xdx_xb, value: item.num });
-        });
-        this.cur_page = Number(res.data.page_now);
-        this.total = Number(res.data.total_rows);
+              rstj_list(data).then((res) => {
+                this.loading = false;
+                this.tableData = res.data.page_data;
+                // let leftData = res.data.chats.left;
+                // this.lineData = [];
+                // this.lineXData = [];
+                // leftData.map((item) => {
+                //   this.lineData.push(item.num);
+                //   this.lineXData.push(item.team_name);
+                // });
+                // let rightData = res.data.chats.right;
+                // this.pieData = [];
+                // rightData.map((item) => {
+                //   this.pieData.push({ value: item.xdx_xb, value: item.num });
+                // });
+                // this.cur_page = Number(res.data.page_now);
+                // this.total = Number(res.data.total_rows);
 
-        this.$nextTick(() => {
-          this.getPie();
-          this.getLine();
-        });
+                // this.$nextTick(() => {
+                //   this.getPie();
+                //   this.getLine();
+                // });
+              });
+            }
+          });
+        }
       });
     },
     gradeListData() {
@@ -358,43 +365,7 @@ export default {
         }
       });
     },
-    teamListData() {
-      let data = {
-        page: 1,
-        limit: 9999,
-      };
-      team_search(data).then((res) => {
-        if (res.code == 1) {
-          this.teamList = res.data.page_data;
-          // let obj = {
-          //   team_id: "",
-          //   team_name: "全部",
-          // };
-          // this.teamList.unshift(obj);
-        }
-      });
-    },
-    addData() {
-      this.loading = true;
-      request({
-        url: "xddy/dygl_xsrstjlb/recreate_data",
-        data: {
-          token: token,
-          site: "jnmf",
-          client: "web",
-          api: "json",
-          page: "1",
-          limit: "10000",
-          issubmit: 1,
-          dept_id: this.dept_id,
-        },
-      }).then((res) => {
-        if (res.code == "1") {
-          this.loading = false;
-          this.getListData();
-        }
-      });
-    },
+
     delData() {
       this.$confirm("确认删除这些信息?", "提示", {
         confirmButtonText: "确定",
@@ -462,10 +433,9 @@ export default {
       });
     }
     this.getListData();
-    this.getLine();
-    this.getPie();
+    // this.getLine();
+    // this.getPie();
     this.gradeListData();
-    this.teamListData();
   },
 };
 </script>

+ 114 - 171
src/views/xsxjk/xsydlb/index.vue

@@ -50,7 +50,6 @@
             placeholder="请选择学年学期"
             clearable
             @change="getListData"
-            
           >
             <el-option
               v-for="item in teamList"
@@ -248,7 +247,7 @@
         </el-form-item>
         <div class="total mb-5">
           <el-form-item label-width="0">
-            <div class="flex justify-between">
+            <div class="">
               <div class="w-80px">
                 <h4 class="mb20 ml20 font-size-15 color-2">家庭主要</h4>
               </div>
@@ -347,140 +346,105 @@
         <el-button type="primary" @click="formSubmit">确 定</el-button>
       </div>
     </el-dialog>
-    <el-dialog :visible.sync="detailDialogFormVisible" width="700px">
-      <div id="printBox">
-        <h3 class="text-center mb45">XXX学校高等教育学生学籍卡</h3>
-        <el-form ref="form" :model="dialogForm" label-width="0px">
-          <table class="form-table" cellpadding="0" cellspacing="0">
-            <tr>
-              <td>
-                <h3 class="font-size-14">学生姓名</h3>
-              </td>
-              <td>
-                <div class="font-size-14">
-                  {{ detailInfo.xdx_xsxm }}
-                </div>
-              </td>
-              <td>
-                <h3 class="font-size-14">性别</h3>
-              </td>
-              <td>
-                <div class="font-size-14">{{ detailInfo.xdx_xb_option_n }}</div>
-              </td>
-
-              <td rowspan="5" class="text-center">
-                <img
-                  v-if="detailInfo.xdx_sczp"
-                  style="width: 120px; height: 160px"
-                  :src="detailInfo.xdx_sczp"
-                  alt=""
-                />
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <h3 class="font-size-14">民族</h3>
-              </td>
-              <td>
-                <div class="font-size-14">{{ detailInfo.xdx_mz }}</div>
-              </td>
-              <td>
-                <h3 class="font-size-14">出生年月</h3>
-              </td>
-              <td>
-                <div class="font-size-14">{{ detailInfo.xdx_csrq }}</div>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <h3 class="font-size-14">身份证号</h3>
-              </td>
-              <td>
-                <div class="font-size-14">{{ detailInfo.xdx_zjhm }}</div>
-              </td>
-              <td>
-                <h3 class="font-size-14">政治面貌</h3>
-              </td>
-              <td>
-                <div class="font-size-14">{{ detailInfo.xdx_zzmm }}</div>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <h3 class="font-size-14">籍贯</h3>
-              </td>
-              <td>
-                <div class="font-size-14">{{ detailInfo.xdx_jg }}</div>
-              </td>
-              <td>
-                <h3 class="font-size-14">家庭住址</h3>
-              </td>
-              <td>
-                <div class="font-size-14">{{ detailInfo.xdx_jtzz }}</div>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <h3 class="font-size-14" style="height: 53px">爱好</h3>
-              </td>
-              <td colspan="3">
-                <div class="font-size-14" style="height: 53px">
-                  {{ detailInfo.xdx_ahtc }}
-                </div>
-              </td>
-            </tr>
-          </table>
-          <table class="form-table-two" cellpadding="0" cellspacing="0">
-            <tr v-if="jtcyDetailInfo.length > 0">
-              <td rowspan="3" class="w20">
-                <h3 class="font-size-14">家庭主要</h3>
-              </td>
-              <td class="w10">
-                <h3 class="font-size-14">称谓</h3>
-              </td>
-              <td class="w10">
-                <h3 class="font-size-14">姓名</h3>
-              </td>
-              <td class="w15">
-                <h3 class="font-size-14">政治面貌</h3>
-              </td>
-              <td class="w20">
-                <h3 class="font-size-14">工作单位</h3>
-              </td>
-              <td class="w10">
-                <h3 class="font-size-14">职务</h3>
-              </td>
-              <td class="w20">
-                <h3 class="font-size-14">手机号码</h3>
-              </td>
-            </tr>
+    <el-dialog :visible.sync="detailDialogFormVisible" width="820px">
+      <div class="w-210mm mx-auto">
+        <div
+          class="py-4 px-18 w-210mm relative min-h-40 text-black"
+          id="printBox"
+        >
+          <el-form ref="form" :model="dialogForm">
+            <table
+              class="print_table"
+              width="100%"
+              cellpadding="0"
+              cellspacing="0"
+            >
+              <thead>
+                <tr>
+                  <td colspan="14">{{ school_name }}学生学籍卡</td>
+                </tr>
+              </thead>
+              <!-- <tr>
+                <td colspan="14">景宁畲族自治县教育局</td>
+              </tr> -->
+              <tbody>
+                <tr>
+                  <td colspan="2">学生姓名</td>
+                  <td colspan="4">{{ detailInfo.xdx_xsxm }}</td>
+                  <td colspan="2">性别</td>
+                  <td colspan="4">
+                    {{ detailInfo.xdx_xb_option_n }}
+                  </td>
+                  <td
+                    rowspan="4"
+                    style="width: 114px; height: 156px; padding: 0 0 0 1px"
+                  >
+                    <img
+                      v-if="detailInfo.xdx_sczp"
+                      style="width: 114px; height: 156px"
+                      :src="detailInfo.xdx_sczp"
+                      alt=""
+                    />
+                  </td>
+                </tr>
+                <tr>
+                  <td colspan="2">民族</td>
+                  <td colspan="4">{{ detailInfo.xdx_mz }}</td>
+                  <td colspan="2">出生年月</td>
+                  <td colspan="4" class="ignore">{{ detailInfo.xdx_csrq }}</td>
+                </tr>
+                <tr>
+                  <td colspan="2">身份证号</td>
+                  <td colspan="4">{{ detailInfo.xdx_zjhm }}</td>
+                  <td colspan="2">政治面貌</td>
+                  <td colspan="4" class="ignore">{{ detailInfo.xdx_zzmm }}</td>
+                </tr>
+                <tr>
+                  <td colspan="2">籍贯</td>
+                  <td colspan="4">{{ detailInfo.xdx_jg }}</td>
+                  <td colspan="2"></td>
+                  <td colspan="4" class="ignore"></td>
+                </tr>
+                <tr>
+                  <td colspan="2">家庭住址</td>
+                  <td colspan="12">{{ detailInfo.xdx_jtzz }}</td>
+                </tr>
+                <tr>
+                  <td colspan="2">爱好</td>
+                  <td colspan="12">{{ detailInfo.xdx_ahtc }}</td>
+                </tr>
+                <tr v-if="jtcyDetailInfo.length > 0">
+                  <td
+                    class="last"
+                    colspan="2"
+                    :rowspan="jtcyDetailInfo.length + 1"
+                  >
+                    家庭主要
+                  </td>
+                  <td colspan="2">称谓</td>
+                  <td colspan="2">姓名</td>
+                  <td colspan="2">政治面貌</td>
+                  <td colspan="2">工作单位</td>
+                  <td colspan="2">职务</td>
+                  <td colspan="2">手机号码</td>
+                </tr>
 
-            <tr v-for="(item, index) in jtcyDetailInfo" :key="index">
-              <td>
-                <div class="font-size-14">{{ item.xdxj_cw }}</div>
-              </td>
-              <td>
-                <div class="font-size-14">{{ item.xdxj_xm }}</div>
-              </td>
-              <td>
-                <div class="font-size-14">{{ item.xdxj_zzmm }}</div>
-              </td>
-              <td>
-                <div class="font-size-14">{{ item.xdxj_gzdw }}</div>
-              </td>
-              <td>
-                <div class="font-size-14">{{ item.xdxj_zw }}</div>
-              </td>
-              <td>
-                <div class="font-size-14">{{ item.xdxj_sjhm }}</div>
-              </td>
-            </tr>
-          </table>
-        </el-form>
-      </div>
-      <div slot="footer" class="text-center">
-        <el-button @click="formCancel">取 消</el-button>
-        <el-button type="primary" @click="printHTML">打印</el-button>
+                <tr v-for="(item, index) in jtcyDetailInfo" :key="index">
+                  <td colspan="2" class="ignore">{{ item.xdxj_cw }}</td>
+                  <td colspan="2">{{ item.xdxj_xm }}</td>
+                  <td colspan="2">{{ item.xdxj_zzmm }}</td>
+                  <td colspan="2">{{ item.xdxj_gzdw }}</td>
+                  <td colspan="2">{{ item.xdxj_zw }}</td>
+                  <td colspan="2">{{ item.xdxj_sjhm }}</td>
+                </tr>
+              </tbody>
+            </table>
+          </el-form>
+        </div>
+        <div slot="footer" class="text-center">
+          <el-button @click="formCancel">取 消</el-button>
+          <el-button type="primary" @click="printHTML">打印</el-button>
+        </div>
       </div>
     </el-dialog>
   </div>
@@ -505,7 +469,7 @@ import {
 } from "./api";
 
 import { useUserStore } from "@/stores/user";
-const { token } = useUserStore();
+const { token, user_org } = useUserStore();
 import FileUpload from "@/components/FileUpload/index.vue";
 export default {
   name: "index",
@@ -524,7 +488,7 @@ export default {
       firstForm: {
         team: "",
       },
-
+      school_name: "",
       tableData: [],
       teamList: [],
       gradeList: [],
@@ -941,7 +905,9 @@ export default {
         if (res.code == 1) {
           this.detailInfo = res.data.one_info;
           let a = this.detailInfo.xdx_sczp.indexOf("|");
-          this.detailInfo.xdx_sczp = this.detailInfo.xdx_sczp.substring(0, a);
+          this.detailInfo.xdx_sczp =
+            window.globalVariables.api +
+            this.detailInfo.xdx_sczp.substring(0, a);
         }
       });
       let data1 = {
@@ -971,6 +937,8 @@ export default {
       });
     },
     formCancel() {
+      this.detailInfo = {};
+      this.jtcyDetailInfo = {};
       this.dialogFormVisible = false;
       this.detailDialogFormVisible = false;
     },
@@ -990,6 +958,13 @@ export default {
     },
   },
   mounted() {
+    if (user_org) {
+      user_org.map((item) => {
+        if (item.uo_type === "2") {
+          this.school_name = item.uo_name;
+        }
+      });
+    }
     this.getListData();
     this.teamListData();
     this.getClassData();
@@ -999,39 +974,7 @@ export default {
 
 
 <style lang="scss" scoped>
-.form-table {
-  width: 100%;
-  border-collapse: collapse;
-  padding: auto;
-  td {
-    width: 20%;
-    height: 30px;
-    line-height: 30px;
-    padding: 4px 4px 5px 5px;
-    border: 1px solid #dbdbdb;
-  }
-  td:nth-child(odd) {
-    background-color: #f0f3f8;
-  }
-  td:nth-child(5) {
-    background-color: #fff;
-  }
-}
-.form-table-two {
-  width: 100%;
-  border-collapse: collapse;
-  padding: auto;
-  td {
-    height: 30px;
-    line-height: 30px;
-    padding: 4px 4px 5px 5px;
-    border: 1px solid #dbdbdb;
-    border-top: none;
-  }
-  tr:first-child {
-    background-color: #f0f3f8;
-  }
-}
+@import "/public/print.css";
 ::v-deep .el-input {
   width: 180px;
 }