Bläddra i källkod

三重一大新增需求

AlvisLiu 1 år sedan
förälder
incheckning
c0b02f636e

+ 8 - 0
src/router/index.js

@@ -246,6 +246,14 @@ export const allRoutes = [
             meta: { title: "打印报表" },
             props: true,
           },
+          {
+            path: "/xmlxsb/xmsq/xqscholl/:id",
+            hidden: true,
+            name: "xmlxsb_xmsq_xqscholl",
+            component: () => import("@/views/xmlxsb/xmsq/xqscholl/index.vue"),
+            meta: { title: "学校项目详情" },
+            props: true,
+          },
         ],
       },
 

+ 75 - 21
src/views/xmlxsb/bbtj/index.vue

@@ -15,7 +15,7 @@
       </div>
       <el-form label-width="100px" :inline="true">
         <el-form-item>
-          <el-select class="mr10" v-model="school_value" placeholder="请选择学校">
+          <el-select class="mr10" v-model="school_value" placeholder="请选择学校" filterable @change="handleChangeSchool">
             <el-option v-for="item in school_type" :key="item.value" :label="item.label" :value="item.value"></el-option>
           </el-select>
         </el-form-item>
@@ -82,13 +82,19 @@
         <el-button type="primary" @click="formSubmit('addForm')">确 定</el-button>
       </div>
     </el-dialog>
+
+     <!-- tips -->
+     <div class="tipsMain" v-show="ifEquip">
+        <p>{{ errorMsg }}</p>
+      </div>
+
   </div>
 </template>
 
 <script>
 import { bbtj_list, bbtj_add, bbtj_del, bbys, org_tree,org_list } from "./itemApi";
 import { useUserStore } from "@/stores/user";
-const { real_name, dept_ids } = useUserStore();
+const { real_name, dept_ids,uo_id,uo_name } = useUserStore();
 export default {
   name: "bbtj",
   data() {
@@ -208,6 +214,10 @@ export default {
       id: "",
       loading: false,
       userList: [],
+
+      curChoosDeptId: '',
+      errorMsg: "无权限查看",
+      ifEquip: false,
     };
   },
   mounted() {
@@ -217,20 +227,49 @@ export default {
   methods: {
     //初始化列表数据
     getListData() {
-      this.loading = true;
-      let transObj = {
-        page: this.cur_page,
-        limit: this.limit,
-        keyword: this.keyword,
-        bb_year: this.filterTime,
-        dept_id:this.school_value,
-      };
-      bbtj_list(transObj).then((res) => {
-        this.loading = false;
-        this.tableData = res.data.page_data;
-        this.cur_page = Number(res.data.page_now);
-        this.total = Number(res.data.total_rows);
-      });
+      if (this.curChoosDeptId != "") {// 选了学校或者是全部学校
+        if (uo_id != "1058") {//登录者不是 装备科的
+          this.ifEquip = true;
+          this.tableData = [];
+        } else {
+          this.ifEquip = false;
+          this.loading = true;
+          let transObj = {
+            page: this.cur_page,
+            limit: this.limit,
+            keyword: this.keyword,
+            bb_year: this.filterTime,
+            dept_id: this.school_value,
+          };
+          bbtj_list(transObj).then((res) => {
+            this.loading = false;
+            this.tableData = res.data.page_data;
+            this.cur_page = Number(res.data.page_now);
+            this.total = Number(res.data.total_rows);
+          });
+        }
+      } else {
+        this.ifEquip = false;
+        this.loading = true;
+        let transObj = {
+          page: this.cur_page,
+          limit: this.limit,
+          keyword: this.keyword,
+          bb_year: this.filterTime,
+          dept_id: this.school_value,
+        };
+        bbtj_list(transObj).then((res) => {
+          this.loading = false;
+          this.tableData = res.data.page_data;
+          this.cur_page = Number(res.data.page_now);
+          this.total = Number(res.data.total_rows);
+        });
+      }
+
+    },
+    //学校筛选存储
+    handleChangeSchool(value) {
+      this.curChoosDeptId = value;
     },
     //多选
     handleSelectionChange(val) {
@@ -458,16 +497,18 @@ export default {
         .then(res => {
           if (res.code == "1") {
             let singleData = res.data.page_data;
+            let tempArr = [];
             singleData.forEach(item => {
-              this.school_type.push({
+              tempArr.push({
                 label: item.uo_name,
                 value: item.uo_id
               })
             })
-            this.school_type.unshift({
-              label: "全部",
-              value:''
-            })
+            let normalAdd = [
+              { label: "景宁畲族自治县教育局", value: '' },
+              {label: "所有学校",value:'school'}
+            ]
+            this.school_type=[...normalAdd, ...tempArr]
           }
         })
         .catch(err => { console.log(err) });
@@ -504,4 +545,17 @@ export default {
     }
   }
 }
+
+.tipsMain{
+  padding: 8px 16px;
+  background-color: #ecf8ff;
+  border-radius: 4px;
+  border-left: 5px solid #4351FF;
+  margin: 20px 0;
+  p{
+    font-size: 14px;
+    color: #5e6d82;
+    line-height: 1.5em;
+  }
+}
 </style>

+ 3 - 3
src/views/xmlxsb/lcgl/index.vue

@@ -9,9 +9,9 @@
       </div>
       <el-form label-width="100px" :inline="true">
         <el-form-item>
-          <el-select class="mr10" v-model="school_value" placeholder="请选择学校">
+          <!-- <el-select class="mr10" v-model="school_value" placeholder="请选择学校">
             <el-option v-for="item in school_type" :key="item.value" :label="item.label" :value="item.value"></el-option>
-          </el-select>
+          </el-select> -->
         </el-form-item>
         <el-form-item prop="state_value">
           <el-select class="mr10" v-model="type_value" placeholder="请选择类别">
@@ -272,7 +272,7 @@ export default {
         limit: this.limit,
         keyword: this.keyword,
         lc_status: this.type_value,
-        dept_id:this.school_value,
+        // dept_id:this.school_value,
       };
       lcgl_list(data).then((res) => {
         this.loading = false;

+ 76 - 23
src/views/xmlxsb/xmds/index.vue

@@ -9,7 +9,7 @@
       </div>
       <el-form label-width="100px" :inline="true">
         <el-form-item>
-        <el-select class="mr10" v-model="school_value" placeholder="请选择学校">
+        <el-select class="mr10" v-model="school_value" placeholder="请选择学校" filterable @change="handleChangeSchool">
           <el-option v-for="item in school_type" :key="item.value" :label="item.label" :value="item.value"></el-option>
         </el-select>
       </el-form-item>
@@ -93,13 +93,17 @@
       </div>
     </el-dialog>
 
+    <!-- tips -->
+    <div class="tipsMain" v-show="ifEquip">
+        <p>{{ errorMsg }}</p>
+      </div>
   </div>
 </template>
 
 <script>
 import { xmds_list, xmds_add, xmds_edit, shsz_del, org_users,org_list } from "./itemApi";
 import { useUserStore } from "@/stores/user";
-const { real_name, dept_ids } = useUserStore();
+const { real_name, dept_ids,uo_id,uo_name } = useUserStore();
 export default {
   name: "jblx",
   data() {
@@ -160,7 +164,11 @@ export default {
         },
       ],
       userList: [],
-      markDis:false,
+      markDis: false,
+
+      curChoosDeptId: '',
+      errorMsg: "无权限查看",
+      ifEquip:false,
     };
   },
   mounted() {
@@ -170,21 +178,52 @@ export default {
   methods: {
     //初始化列表数据
     getListData() {
-      this.loading = true;
-      let transObj = {
-        page: this.cur_page,
-        limit: this.limit,
-        keyword: this.keyword,
-        year: this.filterTime,
-        dept_id:this.school_value,
-        xm_is_wc:3,
-      };
-      xmds_list(transObj).then((res) => {
-        this.loading = false;
-        this.tableData = res.data.page_data;
-        this.cur_page = Number(res.data.page_now);
-        this.total = Number(res.data.total_rows);
-      });
+      
+      if (this.curChoosDeptId != "") {// 选了学校或者是全部学校
+        if (uo_id != "1058") {//登录者不是 装备科的
+          this.ifEquip = true;
+          this.tableData = [];
+        } else {
+          this.ifEquip = false;
+          this.loading = true;
+          let transObj = {
+            page: this.cur_page,
+            limit: this.limit,
+            keyword: this.keyword,
+            year: this.filterTime,
+            dept_id:this.school_value,
+            xm_is_wc:3,
+          };
+          xmds_list(transObj).then((res) => {
+            this.loading = false;
+            this.tableData = res.data.page_data;
+            this.cur_page = Number(res.data.page_now);
+            this.total = Number(res.data.total_rows);
+          });
+        }
+      } else {
+        this.ifEquip = false;
+        this.loading = true;
+        let transObj = {
+          page: this.cur_page,
+          limit: this.limit,
+          keyword: this.keyword,
+          year: this.filterTime,
+          dept_id:this.school_value,
+          xm_is_wc:3,
+        };
+        xmds_list(transObj).then((res) => {
+          this.loading = false;
+          this.tableData = res.data.page_data;
+          this.cur_page = Number(res.data.page_now);
+          this.total = Number(res.data.total_rows);
+        });
+      }
+      
+    },
+    //学校筛选存储
+    handleChangeSchool(value) {
+      this.curChoosDeptId = value;
     },
     //详情
     detailShow(item) {
@@ -243,16 +282,18 @@ export default {
         .then(res => {
           if (res.code == "1") {
             let singleData = res.data.page_data;
+            let tempArr = [];
             singleData.forEach(item => {
-              this.school_type.push({
+              tempArr.push({
                 label: item.uo_name,
                 value: item.uo_id
               })
             })
-            this.school_type.unshift({
-              label: "全部",
-              value:''
-            })
+            let normalAdd = [
+              { label: "景宁畲族自治县教育局", value: '' },
+              {label: "所有学校",value:'school'}
+            ]
+            this.school_type=[...normalAdd, ...tempArr]
           }
         })
         .catch(err => { console.log(err) });
@@ -289,4 +330,16 @@ export default {
     }
   }
 }
+.tipsMain{
+  padding: 8px 16px;
+  background-color: #ecf8ff;
+  border-radius: 4px;
+  border-left: 5px solid #4351FF;
+  margin: 20px 0;
+  p{
+    font-size: 14px;
+    color: #5e6d82;
+    line-height: 1.5em;
+  }
+}
 </style>

+ 80 - 23
src/views/xmlxsb/xmhp/index.vue

@@ -14,7 +14,7 @@
           </el-select>
         </el-form-item> -->
         <el-form-item>
-          <el-select class="mr10" v-model="school_value" placeholder="请选择学校">
+          <el-select class="mr10" v-model="school_value" placeholder="请选择学校" filterable @change="handleChangeSchool">
             <el-option v-for="item in school_type" :key="item.value" :label="item.label" :value="item.value"></el-option>
           </el-select>
         </el-form-item>
@@ -84,13 +84,18 @@
       </div>
     </el-dialog>
 
+     <!-- tips -->
+     <div class="tipsMain" v-show="ifEquip">
+        <p>{{ errorMsg }}</p>
+      </div>
+
   </div>
 </template>
 
 <script>
 import { xmhp_list, xmsq_detail,org_users ,org_list} from "./itemApi";
 import { useUserStore } from "@/stores/user";
-const { real_name, dept_ids } = useUserStore();
+const { real_name, dept_ids,uo_id,uo_name } = useUserStore();
 export default {
   name: "jblx",
   data() {
@@ -136,7 +141,12 @@ export default {
       id: "",
       loading: false,
       userList: [],
-      markDis:false,
+      markDis: false,
+
+      curChoosDeptId: '',
+      errorMsg: "无权限查看",
+      ifEquip: false,
+      
     };
   },
   mounted() {
@@ -146,21 +156,54 @@ export default {
   methods: {
     //初始化列表数据
     getListData() {
-      this.loading = true;
-      let transObj = {
-        page: this.cur_page,
-        limit: this.limit,
-        keyword: this.keyword,
-        year: this.filteTime,
-        dept_id:this.school_value,
-        xm_is_wc:1,//是否获批 1是 2否
-      };
-      xmhp_list(transObj).then((res) => {
-        this.loading = false;
-        this.tableData = res.data.page_data;
-        this.cur_page = Number(res.data.page_now);
-        this.total = Number(res.data.total_rows);
-      });
+      if (this.curChoosDeptId != "") {// 选了学校或者是全部学校
+        if (uo_id != "1058") {//登录者不是 装备科的
+          this.ifEquip = true;
+          this.tableData = [];
+        } else {
+          this.ifEquip = false;
+          this.loading = true;
+          let transObj = {
+            page: this.cur_page,
+            limit: this.limit,
+            keyword: this.keyword,
+            year: this.filteTime,
+            dept_id:this.school_value,
+            xm_is_wc:1,//是否获批 1是 2否
+          };
+          xmhp_list(transObj).then((res) => {
+            this.loading = false;
+            this.tableData = res.data.page_data;
+            this.cur_page = Number(res.data.page_now);
+            this.total = Number(res.data.total_rows);
+          });
+        }
+      } else {
+        this.ifEquip = false;
+        this.loading = true;
+        let transObj = {
+          page: this.cur_page,
+          limit: this.limit,
+          keyword: this.keyword,
+          year: this.filteTime,
+          dept_id:this.school_value,
+          xm_is_wc:1,//是否获批 1是 2否
+        };
+        xmhp_list(transObj).then((res) => {
+          this.loading = false;
+          this.tableData = res.data.page_data;
+          this.cur_page = Number(res.data.page_now);
+          this.total = Number(res.data.total_rows);
+        });
+      }
+        
+        
+
+      
+    },
+    //学校筛选存储
+    handleChangeSchool(value) {
+      this.curChoosDeptId = value;
     },
     //点击详情
     detailData(item) {
@@ -232,16 +275,18 @@ export default {
         .then(res => {
           if (res.code == "1") {
             let singleData = res.data.page_data;
+            let tempArr = [];
             singleData.forEach(item => {
-              this.school_type.push({
+              tempArr.push({
                 label: item.uo_name,
                 value: item.uo_id
               })
             })
-            this.school_type.unshift({
-              label: "全部",
-              value:''
-            })
+            let normalAdd = [
+              { label: "景宁畲族自治县教育局", value: '' },
+              {label: "所有学校",value:'school'}
+            ]
+            this.school_type=[...normalAdd, ...tempArr]
           }
         })
         .catch(err => { console.log(err) });
@@ -290,4 +335,16 @@ export default {
     }
   }
 }
+.tipsMain{
+  padding: 8px 16px;
+  background-color: #ecf8ff;
+  border-radius: 4px;
+  border-left: 5px solid #4351FF;
+  margin: 20px 0;
+  p{
+    font-size: 14px;
+    color: #5e6d82;
+    line-height: 1.5em;
+  }
+}
 </style>

+ 77 - 22
src/views/xmlxsb/xmlb/index.vue

@@ -17,7 +17,7 @@
           </el-select>
         </el-form-item> -->
         <el-form-item>
-          <el-select class="mr10" v-model="school_value" placeholder="请选择学校">
+          <el-select class="mr10" v-model="school_value" placeholder="请选择学校" filterable @change="handleChangeSchool">
             <el-option v-for="item in school_type" :key="item.value" :label="item.label" :value="item.value"></el-option>
           </el-select>
         </el-form-item>
@@ -91,13 +91,18 @@
       </div>
     </el-dialog>
 
+    <!-- tips -->
+    <div class="tipsMain" v-show="ifEquip">
+        <p>{{ errorMsg }}</p>
+      </div>
+
   </div>
 </template>
 
 <script>
 import { xmlb_list, xmlb_add, xmlb_edit, xmlb_del, xmlb_detail, org_users, org_list } from "./itemApi";
 import { useUserStore } from "@/stores/user";
-const { real_name, dept_ids } = useUserStore();
+const { real_name, dept_ids,uo_id,uo_name } = useUserStore();
 export default {
   name: "jblx",
   data() {
@@ -149,6 +154,10 @@ export default {
       },
       formLabelWidth: '120px',
       marDis: false,
+
+      curChoosDeptId: '',
+      errorMsg: "无权限查看",
+      ifEquip: false,
     };
   },
   mounted() {
@@ -158,23 +167,54 @@ export default {
   methods: {
     //初始化列表数据
     getListData() {
-      this.loading = true;
-      let transObj = {
-        page: this.cur_page,
-        limit: this.limit,
-        keyword: this.keyword,
-        dept_id:this.school_value,
-      };
-      xmlb_list(transObj).then((res) => {
-        this.loading = false;
-        if (res.code == "1") {
-          console.log(res, "000")
-          this.tableData = res.data.page_data;
-          this.cur_page = Number(res.data.page_now);
-          this.total = Number(res.data.total_rows);
+      if (this.curChoosDeptId != "") {// 选了学校或者是全部学校
+        if (uo_id != "1058") {//登录者不是 装备科的
+          this.ifEquip = true;
+          this.tableData = [];
+        } else {
+          this.ifEquip = false;
+          this.loading = true;
+          let transObj = {
+            page: this.cur_page,
+            limit: this.limit,
+            keyword: this.keyword,
+            dept_id:this.school_value,
+          };
+          xmlb_list(transObj).then((res) => {
+            this.loading = false;
+            if (res.code == "1") {
+              console.log(res, "000")
+              this.tableData = res.data.page_data;
+              this.cur_page = Number(res.data.page_now);
+              this.total = Number(res.data.total_rows);
+            }
+          });
         }
+      } else {
+        this.ifEquip = false;
+        this.loading = true;
+        let transObj = {
+          page: this.cur_page,
+          limit: this.limit,
+          keyword: this.keyword,
+          dept_id:this.school_value,
+        };
+        xmlb_list(transObj).then((res) => {
+          this.loading = false;
+          if (res.code == "1") {
+            console.log(res, "000")
+            this.tableData = res.data.page_data;
+            this.cur_page = Number(res.data.page_now);
+            this.total = Number(res.data.total_rows);
+          }
+        });
+      }
 
-      });
+      
+    },
+    //学校筛选存储
+    handleChangeSchool(value) {
+      this.curChoosDeptId = value;
     },
     //多选
     handleSelectionChange(val) {
@@ -367,16 +407,18 @@ export default {
         .then(res => {
           if (res.code == "1") {
             let singleData = res.data.page_data;
+            let tempArr = [];
             singleData.forEach(item => {
-              this.school_type.push({
+              tempArr.push({
                 label: item.uo_name,
                 value: item.uo_id
               })
             })
-            this.school_type.unshift({
-              label: "全部",
-              value:''
-            })
+            let normalAdd = [
+              { label: "景宁畲族自治县教育局", value: '' },
+              {label: "所有学校",value:'school'}
+            ]
+            this.school_type=[...normalAdd, ...tempArr]
           }
         })
         .catch(err => { console.log(err) });
@@ -412,4 +454,17 @@ export default {
     }
   }
 }
+
+.tipsMain{
+  padding: 8px 16px;
+  background-color: #ecf8ff;
+  border-radius: 4px;
+  border-left: 5px solid #4351FF;
+  margin: 20px 0;
+  p{
+    font-size: 14px;
+    color: #5e6d82;
+    line-height: 1.5em;
+  }
+}
 </style>

+ 131 - 22
src/views/xmlxsb/xmsq/index.vue

@@ -16,8 +16,8 @@
         </el-button>
       </div>
       <el-form label-width="100px" :inline="true">
-        <el-form-item>
-          <el-select class="mr10" v-model="school_value" placeholder="请选择学校">
+        <el-form-item v-show="activeName=='fourth'">
+          <el-select class="mr10" v-model="school_value" placeholder="请选择学校" filterable @change="handleChangeSchool">
             <el-option v-for="item in school_type" :key="item.value" :label="item.label" :value="item.value"></el-option>
           </el-select>
         </el-form-item>
@@ -168,7 +168,38 @@
           </el-table-column>
         </el-table>
       </el-tab-pane>
-
+      <el-tab-pane label="学校上报项目" name="fourth">
+        <el-table :data="schoolTable" tooltip-effect="dark" style="width: 100%" @selection-change="handleSelectionChangeXXSBDXM">
+          <el-table-column type="selection" align="center" width="55"></el-table-column>
+          <el-table-column label="序号" align="center" type="index" width="50"></el-table-column>
+          <el-table-column label="项目名称" show-overflow-tooltip prop="xm_name" width="auto"></el-table-column>
+          <el-table-column label="项目类别" prop="xm_type"></el-table-column>
+          <el-table-column label="项目理由" show-overflow-tooltip prop="xm_reason"></el-table-column>
+          <el-table-column label="申请科室" show-overflow-tooltip prop="department_name"></el-table-column>
+          <el-table-column label="项目预算(元)" prop="xm_price"></el-table-column>
+          <el-table-column label="申报时间" prop="xm_sbsj" show-overflow-tooltip></el-table-column>
+          <el-table-column label="项目方式" prop="lb_name"></el-table-column>
+          <el-table-column label="状态">
+            <template slot-scope="scope">
+              <div
+                :class="scope.row.xm_status_option_k == '4' ? 'red' : (scope.row.xm_status_option_k == '3' ? 'blue' : ' ')">
+                {{ scope.row.xm_status }}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column label="操作" width="200">
+            <template slot-scope="scope">
+              <div class="">
+                <el-button type="text" @click="schollDetail(scope.row)">详情</el-button>
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-tab-pane>
+      <!-- tips -->
+      <div class="tipsMain" v-show="activeName=='fourth' && ifEquip">
+        <p>{{ errorMsg }}</p>
+      </div>
     </el-tabs>
     <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"
@@ -205,7 +236,8 @@
           </el-select>
         </el-form-item>
         <el-form-item label="项目预算" prop="xmys">
-          <el-input v-model="dialogForm.xmys" placeholder="请输入项目预算(数字)" oninput="value=value.replace(/^\.+|[^\d.]/g,'')">
+          <!-- oninput="value=value.replace(/^\.+|[^\d.]/g,'')" -->
+          <el-input v-model="dialogForm.xmys" placeholder="请输入项目预算(数字)">
             <template slot="append">元</template>
           </el-input>
         </el-form-item>
@@ -311,7 +343,7 @@
 <script>
 import { xmsq_list, xmsq_add, xmsq_edit, xmsq_del, xmsq_detail, xmlb_list, lcgl_list, xmsh_check, bbys, org_list, org_users } from "./itemApi";
 import { useUserStore } from "@/stores/user";
-const { real_name, user_id, dept_ids } = useUserStore();
+const { real_name, user_id, dept_ids,uo_id,uo_name } = useUserStore();
 import Tinymce from "@/components/TinymceVue/index.vue";
 import FileUpload from "@/components/FileUpload/index.vue";
 export default {
@@ -325,7 +357,7 @@ export default {
       state_value: "",
       keyword: "",
       activeName: "first",
-      school_value: "",
+      school_value: "school",
       school_type: [],
       /*** 1:未提交;2:已退回;3:审核中;4:审核通过;*/
       type_list: [
@@ -357,6 +389,7 @@ export default {
       applyTable: [],
       auditTable: [], //审核列表
       checkedTable: [],
+      schoolTable: [],//学校表单
       limit: 10,
       total: 0,
       cur_page: 1,
@@ -399,7 +432,8 @@ export default {
           { required: true, message: '请选择关联流程', trigger: 'change' }
         ],
         xmys: [
-          { required: true, message: '请输入项目预算', trigger: 'blur' }
+          { required: true, message: '请输入项目预算', trigger: 'blur' },
+          { pattern: /^\d+$/,  message: '请输入数字',  trigger: 'blur'}
         ],
         sbsj: [
           { required: true, message: '请选择申报时间', trigger: 'change' }
@@ -417,6 +451,7 @@ export default {
       multipleSelection: [],
       multipleSelectionWSHD: [],
       multipleSelectionSHGDXM: [],
+      multipleSelectionXXSBDXM: [],
       isEdit: false,
       id: "",
       loading: false,
@@ -463,6 +498,9 @@ export default {
       },
       curXMID:'',
 
+      curChoosDeptId:'',
+      errorMsg: "无权限查看",
+      ifEquip:false,
     };
   },
   mounted() {
@@ -494,6 +532,9 @@ export default {
         break;
         case 'third':
         this.initChecked();
+          break;
+        case 'fourth':
+          this.initSchool();
         break;
       }
     }
@@ -508,7 +549,7 @@ export default {
         limit: this.limit,
         keyword: this.keyword,
         xm_status: this.state_value,
-        dept_id:this.school_value,
+        // dept_id:this.school_value,
         my_xm: 1,//我的申请
       };
       xmsq_list(transObj).then((res) => {
@@ -528,7 +569,7 @@ export default {
         limit: this.limit,
         keyword: this.keyword,
         xm_status: this.state_value,
-        dept_id:this.school_value,
+        // dept_id:this.school_value,
         my_check: 1,
       };
       xmsq_list(transObj).then((res) => {
@@ -547,7 +588,7 @@ export default {
         page: this.cur_page,
         limit: this.limit,
         keyword: this.keyword,
-        dept_id:this.school_value,
+        // dept_id:this.school_value,
         xm_status: 5,
         xm_is_wc:2,
       };
@@ -560,28 +601,62 @@ export default {
         }
       });
     },
+    //学校上报的项目初始化
+    initSchool() {
+      this.loading = true;
+      let equipmentId = 1058;//装备科
+      if (uo_id != equipmentId) {//登录者不是装备科的
+        this.ifEquip = true;
+        return
+      } else {
+        this.ifEquip = false;
+        let transObj = {
+          page: this.cur_page,
+          limit: this.limit,
+          keyword: this.keyword,
+          my_xm: 0,
+          dept_id: this.school_value,
+        };
+        xmsq_list(transObj).then((res) => {
+          this.loading = false;
+          if (res.code == "1") {
+            this.schoolTable = res.data.page_data;
+            this.cur_page = Number(res.data.page_now);
+            this.total = Number(res.data.total_rows);
+          }
+        });
+      }
+      
+    },
     //tabPane 的切换
     paneTabSwitch(tab) {
       if (tab.name == "second") {
         this.initMyApply();
       } else if (tab.name == "third") {
         this.initChecked();
-      } else {
+      } else if(tab.name == "first") {
         this.getListData();
+      }else{
+        this.initSchool();
       }
       let setInLoc = tab.name;
       window.localStorage.setItem('initName', setInLoc);
     },
+    //学校筛选存储
+    handleChangeSchool(value) {
+      this.curChoosDeptId = value;
+    },
     //搜索按钮
     searchBtn() {
       let ifInitName = localStorage.getItem('initName');
       if (ifInitName == "second") {
         this.initMyApply();
-        console.log("111")
       } else if (ifInitName == "third") {
         this.initChecked();
-      } else {
+      } else if(ifInitName == "first") {
         this.getListData();
+      } else {
+        this.initSchool();
       }
     },
     //关键词搜索按钮
@@ -589,11 +664,12 @@ export default {
       let ifInitName = localStorage.getItem('initName');
       if (ifInitName == "second") {
         this.initMyApply();
-        console.log("111")
       } else if (ifInitName == "third") {
         this.initChecked();
-      } else {
+      } else if(ifInitName == "first") {
         this.getListData();
+      } else {
+        this.initSchool();
       }
     },
     //我申请的-详情
@@ -601,6 +677,11 @@ export default {
       let chooseID = item.xm_id;
       this.$router.push({ name: "xmlxsb_xmsq_xq", params: { id: chooseID } });
     },
+    //学校上报的项目详情
+    schollDetail(item) {
+      let chooseID = item.xm_id;
+      this.$router.push({ name: "xmlxsb_xmsq_xqscholl", params: { id: chooseID } });
+    },
     //多选(我申请的)
     handleSelectionChange(val) {
       this.multipleSelection = [];
@@ -616,6 +697,11 @@ export default {
       this.multipleSelectionSHGDXM = [];
       this.multipleSelectionSHGDXM = val;
     },
+    //多选(学校上报的项目)
+    handleSelectionChangeXXSBDXM(val) {
+      this.multipleSelectionXXSBDXM = [];
+      this.multipleSelectionXXSBDXM = val;
+    },
     //导出-我申请的
     exportAll() {
       let Token = JSON.parse(window.localStorage.getItem('userInfo')).token;
@@ -1178,7 +1264,16 @@ export default {
     //翻页
     handleCurrentChange(val) {
       this.cur_page = val;
-      this.getListData();
+      let ifInitName = localStorage.getItem('initName');
+      if (ifInitName == "second") {
+        this.initMyApply();
+      } else if (ifInitName == "third") {
+        this.initChecked();
+      } else if(ifInitName == "first") {
+        this.getListData();
+      } else {
+        this.initSchool();
+      }
     },
     //项目类别列表数据
     xmlbList() {
@@ -1244,16 +1339,17 @@ export default {
         .then(res => {
           if (res.code == "1") {
             let singleData = res.data.page_data;
+            let tempArr = [];
             singleData.forEach(item => {
-              this.school_type.push({
+              tempArr.push({
                 label: item.uo_name,
                 value: item.uo_id
               })
             })
-            this.school_type.unshift({
-              label: "全部",
-              value:''
-            })
+            let normalAdd = [
+              {label: "所有学校",value:'school'}
+            ]
+            this.school_type=[...normalAdd, ...tempArr]
           }
         })
         .catch(err => { console.log(err) });
@@ -1263,7 +1359,7 @@ export default {
 };
 </script>
 
-<style scoped>
+<style lang="scss" scoped>
 .red {
   color: red;
 }
@@ -1276,4 +1372,17 @@ export default {
   color: red;
   font-weight: bold;
 }
+
+.tipsMain{
+  padding: 8px 16px;
+  background-color: #ecf8ff;
+  border-radius: 4px;
+  border-left: 5px solid #4351FF;
+  margin: 20px 0;
+  p{
+    font-size: 14px;
+    color: #5e6d82;
+    line-height: 1.5em;
+  }
+}
 </style>

+ 260 - 0
src/views/xmlxsb/xmsq/xqscholl/index.vue

@@ -0,0 +1,260 @@
+<template>
+  <div>
+    <div class="w-full flex justify-end">
+      <el-button type="primary" @click="printPDF">打印</el-button>
+    </div>
+    <div class="formShow topPart">
+
+      <div id="printBox" class="py-4 px-18 w-210mm relative min-h-40 text-black  ">
+        <img class="redZhang absolute z-100 top-14 right-8" v-if="isShFinish" src="@/assets/images/label_szyd.png"
+          alt="" />
+
+        <!-- <div class="text-2xl font-bold text-center mb-10 normalTitle">{{ tableFormData.xm_name }}</div> -->
+
+        <!-- <div class="d-flex flex-between baseInfoPrintTop">
+        <div class="mb-2">景宁畲族自治县教育局</div>
+      </div> -->
+
+        <table class="Tb print_table" width="100%" cellspacing="0" cellpadding="0">
+          <thead>
+            <tr >
+              <td colspan="4" style="border: 0;">
+                <div class="text-2xl font-bold text-center mb-10 normalTitle">{{ tableFormData.xm_name }}</div>
+              </td>
+            </tr>
+          </thead>
+          <tr>
+            <td colspan="4" style="border: 0;">
+              {{ printDepartTitle }}
+            </td>
+          </tr>
+          <tbody>
+            <tr>
+              <td class="titleOpt" style="width:150px;">项目名称</td>
+              <td>{{ tableFormData.xm_name }}</td>
+            </tr>
+            <tr>
+              <td class="titleOpt" style="width:150px;">项目类别</td>
+              <td>{{ tableFormData.lb_name }}</td>
+            </tr>
+            <tr>
+              <td class="titleOpt" style="width:150px;">项目理由</td>
+              <td>{{ tableFormData.xm_reason }}</td>
+            </tr>
+            <tr>
+              <td class="titleOpt" style="width:150px;">申请科室</td>
+              <td>{{ tableFormData.department_name }}</td>
+            </tr>
+            <tr>
+              <td class="titleOpt" style="width:150px;">项目预算</td>
+              <td>{{ tableFormData.xm_price }}元</td>
+            </tr>
+            <tr>
+              <td class="titleOpt" style="width:150px;">申报时间</td>
+              <td>{{ tableFormData.xm_sbsj }}</td>
+            </tr>
+            <tr>
+              <td class="titleOpt" style="width:150px;">项目内容</td>
+              <td>
+                <!-- <div class="specialTd" v-html="tableFormData.xm_content"></div> -->
+                <div class="specialTd" style=" white-space: pre-line;">
+                  <!-- <pre v-html="formattedContent"></pre> -->
+                  {{ this.content }}
+                </div>
+              </td>
+            </tr>
+            <tr>
+              <td class="titleOpt" style="width:150px;">项目方式</td>
+              <td>{{ tableFormData.xm_type }}</td>
+            </tr>
+            <tr>
+              <td class="titleOpt" style="width:150px;">项目附件</td>
+              <td>
+                <div class="singleD" v-for="(item, index) in fileFinalArr" :key="index">
+                  <span class="alink" @click="downLoadfile(item.fileUrl, '', item.fileName)">{{ item.fileName }}</span>
+                </div>
+              </td>
+            </tr>
+            <tr v-show="tableFormData.xm_hpsj">
+              <td class="titleOpt" style="width:150px;">日期:</td>
+              <td>{{ tableFormData.xm_hpsj }}</td>
+            </tr>
+            <tr v-show="tableFormData.xm_hysmc">
+              <td class="titleOpt" style="width:150px;">会议名称:</td>
+              <td>{{ tableFormData.xm_hysmc }}</td>
+            </tr>
+            <tr v-show="tableFormData.xm_hpnr">
+              <td class="titleOpt" style="width:150px;">内容:</td>
+              <td>{{ tableFormData.xm_hpnr }}</td>
+            </tr>
+          </tbody>
+
+        </table>
+        
+        <div class="flex justify-between mt-1 whitespace-nowrap text-base">
+          <div class="flex-none">打印人:{{ real_name }}</div>
+          <div class="flex-none">打印时间:{{ currrentTime }}</div>
+        </div>
+
+      </div>
+    </div>
+
+    <div class="bottomPart">
+      <h4 class="Htitle">流程处理</h4>
+      <div class="table" style="width:100%;">
+        <el-table :data="tableData" style="width: 100%">
+          <el-table-column type="selection" align="center" width="55"></el-table-column>
+          <el-table-column label="序号" align="center" type="index" width="50"></el-table-column>
+          <el-table-column prop="sh_dept_name" label="审核部门"></el-table-column>
+          <el-table-column prop="sh_user_name" label="审核人"></el-table-column>
+          <el-table-column prop="create_dateline" label="审核时间"></el-table-column>
+          <el-table-column label="操作">
+            <template slot-scope="scope">
+              <div :class="{ 'red': scope.row.sh_status == '3' }">
+                {{ scope.row.sh_status == 1 ? "未处理" : (scope.row.sh_status == 2 ? '通过' : '不通过') }}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column prop="clyj" label="处理意见" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <div :class="{ 'red': scope.row.sh_status == '3' }">
+                {{ scope.row.sh_reason }}
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <!-- <div style="text-align:center;margin-top:20px;">
+      <el-button type="primary" @click="backBtn()">返回</el-button>
+    </div> -->
+  </div>
+</template>
+
+<script>
+import { xmsq_detail, org_users } from "./itemApi";
+import { useUserStore } from "@/stores/user";
+const { real_name, user_id, dept_ids,uo_id, uo_name, } = useUserStore();
+import { download, download2, download3 } from "@/utils/request";
+export default {
+  name: "xq",
+  data() {
+    return {
+      tableFormData: '',
+      tableData: [],
+      fileFinalArr: [],
+      real_name: real_name,
+      currrentTime: '',
+      isShFinish: false,
+      content: '',
+      printDepartTitle:'',
+    };
+  },
+  mounted() {
+    this.printDepartTitle = uo_name;
+    this.initData();
+  },
+  methods: {
+    initData() {
+      //获取下进入的时间
+      this.currrentTime = this.currentTime();
+      let transId = this.$route.params.id;
+      let transObj = {
+        xm_id: transId
+      }
+      xmsq_detail(transObj)
+        .then(res => {
+          if (res.code == "1") {
+            this.tableFormData = res.data.one_info;
+            this.tableData = res.data.one_info.shjl;
+            this.content = res.data.one_info.xm_content;
+            //判断是几个附件
+            let ifOneB = res.data.one_info.xm_file.indexOf(",");
+            if (ifOneB != '-1') {//能找到,不止一个附件
+              let muilArr = res.data.one_info.xm_file.split(',');
+              let flileArr = []
+              muilArr.forEach(item => {
+                let secSpil = item.split('|');
+                flileArr.push({
+                  fileUrl: secSpil[0],
+                  fileName: secSpil[1]
+                })
+              })
+              this.fileFinalArr = flileArr;
+            } else {
+              let singleArr = res.data.one_info.xm_file.split('|');
+              this.fileFinalArr = [{
+                fileUrl: singleArr[0],
+                fileName: singleArr[1]
+              }];
+            }
+            //判断是否全部审核过了
+            let SHJL = res.data.one_info.shjl;
+            SHJL.forEach(item => {
+              if (item.sh_status == 2) {
+                this.isShFinish = true;
+              } else {
+                this.isShFinish = false;
+              }
+            })
+
+          }
+        })
+        .catch(err => { console.log(err) })
+    },
+    //下载按钮
+    downLoadfile(url, data, name) {
+      download3(url, data, name)
+    },
+    currentTime() {
+      const now = new Date();
+      const year = now.getFullYear();
+      const month = now.getMonth() + 1; // 注意月份是从 0 开始计数的
+      const day = now.getDate();
+      const hour = now.getHours();
+      const minute = now.getMinutes().toString().padStart(2, '0');
+      const second = now.getSeconds().toString().padStart(2, '0');
+      let finShow = `${year}-${month}-${day} ${hour}:${minute}:${second}`;
+      return finShow
+
+    },
+    backBtn() {
+      this.$router.push({ name: 'xmlxsb_xmsq', params: {} })
+    },
+    printPDF() {
+      // this.$print({
+      //   printable: "printBox",
+      //   type: "html",
+      //   targetStyles: ["*"], // 打印内容使用所有HTML样式,没有设置这个属性/值,设置分页打印没有效果
+      //   font_size: ""
+      // });
+
+      this.$print2();
+    },
+
+  },
+  filters: {
+    nl2br(value) {
+      return value.replace(/\n/g, '<br/>');
+    }
+  },
+  computed: {
+    formattedContent() {
+      return this.content.replace(/\n/g, '<br>');
+    }
+  }
+
+};
+</script>
+
+<style scoped>
+@import url("@/styles/printStyle.scss");
+/* @import "/public/print.css"; */
+
+.alink {
+  color: rgb(0, 149, 199);
+  cursor: pointer;
+
+}
+</style>
+ 

+ 20 - 0
src/views/xmlxsb/xmsq/xqscholl/itemApi.js

@@ -0,0 +1,20 @@
+import request from '@/utils/request';
+
+//项目申请 -详情
+export const xmsq_detail = (data = {}) =>
+  request({
+    url: '/jdbg/xmlxsb_xmsq/detail',
+    data
+  });
+
+
+  export const org_users = (data = {}) =>
+    request({
+        url: '/user/main/index',
+        data: {
+            dept_id:data.dept_id,
+            all:'1',
+            page: data.page,
+            limit:data.limit
+        }
+    })