فهرست منبع

增加申请审批功能

mork 1 ماه پیش
والد
کامیت
3f1ac0e078

+ 2 - 2
public/static/config/config.js

@@ -32,10 +32,10 @@ let systemConfig = {
   // columnIds: [1657, 1659, 1666, 1676, 1665, 1651, 1662,1736],
   // 政务网环境
   modelIds:
-    serverType == "互联网" ? [1667, 1690, 1677, 1673, 1780] : [1780, 1777, 1783, 1785, 2154],
+    serverType == "互联网" ? [1667, 1690, 1677, 1673, 1780, 1834] : [1780, 1777, 1783, 1785, 2154],
   columnIds:
     serverType == "互联网"
-      ? [1657, 1659, 1666, 1676, 1665, 1651, 1662, 1736]
+      ? [1657, 1659, 1666, 1676, 1665, 1651, 1662, 1736, 1772]
       : [2429, 2428, 2426, 2425, 2430, 2432, 2431, 2840],
 
   preCountDmsId: serverType == "互联网" ? 1652 : 2436, // 政务网 2436  互联网 1652

+ 1 - 1
src/components/yxgl/card.vue

@@ -6,7 +6,7 @@
         <!-- {{value}} -->
         <NumberScroll :value="value" :duration="2000" />
       </div>
-      <div class="leftInfo_growth" :style="{ color: growthColors[upStatus + 1] }">
+      <div class="leftInfo_growth" v-if="upStatus != 99" :style="{ color: growthColors[upStatus + 1] }">
         <el-icon
           ><Top v-if="upStatus == 1" /><SemiSelect v-if="upStatus == 0" /><Bottom
             v-if="upStatus == -1"

+ 1 - 1
src/main.js

@@ -37,7 +37,7 @@ initApp.config.globalProperties.$getDmsTypes = (cName, index) => {
 };
 // 添加自定义方法,得到用户类型【1:游客;2:普通用户;3:管理员】
 const getUserType = () => {
-  console.log("=====userInfo==="+JSON.stringify(store.state.userInfo));
+  // console.log("=====userInfo==="+JSON.stringify(store.state.userInfo));
   if (store.state.userInfo && store.state.userInfo.id != null) {
     // 得到用户id
     let userId = store.state.userInfo.id;

+ 19 - 2
src/views/Yxgl.vue

@@ -35,6 +35,10 @@
             <el-icon><Ticket /></el-icon>
             <template #title>数据管理</template>
           </el-menu-item>
+          <el-menu-item index="sqsp">
+            <el-icon><Management /></el-icon>
+            <template #title>申请审批</template>
+          </el-menu-item>
         </el-sub-menu>
       </el-menu>
       <div
@@ -47,6 +51,7 @@
       >
         <el-backtop target=".viewBox" :right="20" :bottom="70" />
         <StatisticalAnalysis v-if="menuActive == 'StatisticalAnalysis'" />
+        <Sqsp v-if="menuActive == 'sqsp'" />
         <iframe v-else :src="iframeUrl" frameborder="0" sandbox="allow-same-origin allow-scripts"></iframe>
       </div>
     </div>
@@ -55,6 +60,7 @@
 
 <script>
 import StatisticalAnalysis from "@/views/yxgl/StatisticalAnalysis.vue";
+import Sqsp from "@/views/yxgl/Sqsp.vue";
 export default {
   name: "yxgl",
   data() {
@@ -66,7 +72,8 @@ export default {
   },
   // 2. 局部注册组件(键值同名可简写)
   components: {
-    StatisticalAnalysis, // 完整写法:MyButton: MyButton
+    StatisticalAnalysis,
+    Sqsp, // 完整写法:MyButton: MyButton
   },
   mounted() {},
   methods: {
@@ -97,7 +104,7 @@ export default {
         default:
           break;
       }
-      console.log(this.menuActive, this.iframeUrl);
+      // console.log(this.menuActive, this.iframeUrl);
     },
   },
 };
@@ -131,6 +138,16 @@ export default {
   overflow-y: auto;
   padding-bottom: 120px;
 }
+.viewBox2 {
+  width: calc(100vw - 200px);
+  margin: 0;
+  // height: calc(100vh - 120px);
+  height: 100vh;
+  position: relative;
+  overflow: hidden;
+  overflow-y: auto;
+  padding-bottom: 120px;
+}
 iframe {
   width: 100%;
   height: calc(100%);

+ 564 - 0
src/views/yxgl/Sqsp.vue

@@ -0,0 +1,564 @@
+<template>
+  <div class="mainBox" v-loading="getDataStatus">
+    <!-- 搜索区域 -->
+    <div class="searchBox">
+      <div style="font-size: large">
+            <el-select
+              v-model="selByValue"
+              size="small"
+              style="width: 120px"
+              @change="handleSelectChange"
+            >
+              <el-option
+                v-for="item in selectOptions"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              />
+            </el-select>
+      </div>
+    </div>
+    <!-- 服务调用card -->
+    <div class="flex">
+      <card
+        v-for="item in TopCardDatas"
+        :key="item.name"
+        class="card flex"
+        :title="item.name"
+        :value="item.value"
+        :growth="item.growth"
+        :iconName="item.iconName"
+        :iconColor="item.iconColor"
+        :upStatus="item.upStatus"
+      />
+    </div>
+    <!-- 服务类信息统计 -->
+    <div class="bigCard">
+      <div style="width: 100%; max-height: 600px">
+       <el-table
+        :data="tableDatas"
+        style="width: 100%"
+        max-height="590"
+        :header-cell-style="headerCellStyle"
+        :row-style="rowStyle"
+        :cell-style="cellStyle">
+          <el-table-column type="index" label="序号" width="100" />
+          <el-table-column prop="title" label="姓名" />
+          <!-- <el-table-column prop="content" label="电话" /> formatPhoneNumber -->
+          <el-table-column label="电话" :formatter="gethoneNumber" />
+          <el-table-column prop="job" label="工作内容" show-overflow-tooltip/>
+          <el-table-column prop="organizationName" label="组织名称" show-overflow-tooltip/>
+          <el-table-column label="用户类型" :formatter="formatUserType" />
+          <el-table-column prop="name" label="名称" show-overflow-tooltip/>
+          <el-table-column
+            :formatter="formatStatus"
+            label="状态"
+          >
+            <template #default="scope">
+              <el-tag
+                v-if="formatStatus(scope.row) != '-'"
+                :type="scope.row.status === 2 ? 'success' : scope.row.status === '-1' ? 'danger' : 'primary'"
+                >{{ formatStatus(scope.row) }}</el-tag
+              >
+            </template>
+          </el-table-column>
+
+          <el-table-column prop="sqly" label="申请理由" show-overflow-tooltip/>
+          <el-table-column prop="bhly" label="驳回理由" show-overflow-tooltip/>
+
+          <!-- <el-table-column
+            :formatter="formatReason"
+            label="状态理由"
+          >
+            <template #default="scope">
+                <span>{{ formatReason(scope.row) }}</span>
+            </template>
+          </el-table-column> -->
+          <el-table-column fixed="right" label="操作" width="150">
+            <template #default="scope">
+              <el-button
+                link
+                :disabled="(scope.row.status != '-1' && scope.row.status != 1)"
+                type="primary"
+                size="small"
+                @click.prevent="finishRow(scope.$index)"
+              >
+                通过
+              </el-button>
+              <el-button
+                link
+                :disabled="scope.row.status != 1"
+                type="danger"
+                size="small"
+                @click.prevent="rejectRow(scope.$index)"
+              >
+                驳回
+              </el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+        </div>
+        <!-- 分页控件 -->
+        <div class="pagination-section">
+          <span class="total-text">共 {{ total }} 条数据</span>
+          <el-pagination
+            layout="prev, pager, next, jumper, total"
+            :total="total"
+            :current-page="currentPage"
+            :page-size="pageSize"
+            @current-change="handleCurrentChange"
+          >
+          </el-pagination>
+      </div>
+    </div>
+
+    <el-dialog v-model="dialogFormTGVisible" title="提示信息" width="400">
+      <span>是否确认?</span>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button @click="dialogFormTGVisible = false">取消</el-button>
+          <el-button type="primary" @click="subimtBtn('confirm')">
+            确认
+          </el-button>
+        </div>
+      </template>
+    </el-dialog>
+
+    <el-dialog v-model="dialogFormVisible" title="提示信息" width="400">
+      <el-form :model="rejectForm">
+        <el-form-item label="">
+          <el-input type="textarea" v-model="rejectForm.bhly" placeholder="请输入驳回内容……" height="100px" :autosize="{ minRows: 5 }" />
+        </el-form-item>
+      </el-form>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button @click="dialogFormVisible = false">取消</el-button>
+          <el-button type="primary" @click="subimtBtn('reject')">
+            确认
+          </el-button>
+        </div>
+      </template>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import card from "@/components/yxgl/card.vue";
+import api from "@/api/content";
+
+export default {
+  name: "",
+  components: {
+    card,
+  },
+  computed: {
+    headerCellStyle() {
+      return {
+        // backgroundColor: "rgba(24, 144, 255, 0.25)",
+        color: "#fff",
+        fontWeight: "bold",
+        // borderBottom: "2px solid rgba(24, 144, 255, 0.3)",
+        padding: "12px 8px",
+      };
+    },
+    rowStyle() {
+      return {
+        // 调整行背景色为更浅的黑色,增加透明度
+        backgroundColor: "rgba(0, 0, 0, 0.05)",
+        borderBottom: "1px solid rgba(255, 255, 255, 0.05)",
+        transition: "all 0.3s ease",
+      };
+    },
+    cellStyle() {
+      return {
+        color: "#e0e0e0",
+        padding: "12px 8px",
+        borderRight: "1px solid rgba(255, 255, 255, 0.05)",
+      };
+    },
+  },
+  data() {
+    return {
+      operateValue:{},
+      dataList:[],
+      dialogFormVisible: false,
+      dialogFormTGVisible: false,
+      rejectForm: {},
+      // 获取数据状态
+      getDataStatus: true,
+      // 筛选条件下拉框选项
+      selectOptions: [{
+        label: "所有",
+        value: "0",
+      },
+      {
+        label: "已通过",
+        value: "2",
+      },
+      {
+        label: "已驳回",
+        value: "-1",
+      },
+      {
+        label: "待审核",
+        value: "1",
+      },
+      ],
+      // 排序字段
+      selByValue: "0",
+      TopCardDatas: [
+        {
+          name: "用户总数",
+          value: "0",
+          growth: "--",
+          iconColor: "#2563db",
+          iconName: "Avatar",
+          upStatus: 99,
+        },
+        {
+          name: "已通过总数",
+          value: "0",
+          growth: "--",
+          iconColor: "#16a34a",
+          iconName: "WalletFilled",
+          upStatus: 99,
+        },
+        {
+          name: "已驳回总数",
+          value: "0",
+          growth: "--",
+          iconColor: "#e34833",
+          iconName: "CollectionTag",
+          upStatus: 99,
+        },
+        {
+          name: "待审核总数",
+          value: "0",
+          growth: "--",
+          iconColor: "#ca8a04",
+          iconName: "Paperclip",
+          upStatus: 99,
+        },
+      ],
+      tableDatas: [],
+      itemTableDatas:[],
+      // 分页大小
+      pageSize: 10,
+      // 当前页码
+      currentPage: 1,
+      // 数据总条数
+      total: 0,
+    };
+  },
+  watch: {
+
+  },
+  mounted() {
+    this.getColumnListDate();
+  },
+  methods: {
+    // 处理分页变化
+    handleCurrentChange(page) {
+      this.currentPage = page;
+      // 根据当前筛选状态决定数据源
+      const sourceData = this.selByValue === "0" ? this.itemTableDatas :
+                         this.itemTableDatas.filter(item => item.status == this.selByValue);
+      const start = (this.currentPage - 1) * this.pageSize;
+      const end = start + this.pageSize;
+      this.tableDatas = sourceData.slice(start, end);
+    },
+    gethoneNumber(row){
+      return this.formatPhoneNumber(row.content);
+    },
+    formatPhoneNumber(phone) {
+      if (!phone) return "";
+      return phone.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2");
+    },
+    formatUserType(row) {
+      // row 是当前行数据,authorId 为该行字段
+      return row.authorId === 1 ? '管理员' : '普通用户'
+    },
+    formatStatus(row) {
+      return row.status === 2 ? '已通过' : row.status === '-1' ? '已驳回' : row.status === 1 ? '待审核' : '-'
+    },
+    formatReason(row) {
+      return row.status === 2 ? row.sqly : row.status === '-1' ? row.bhly : row.status === 1 ? row.sqly : '-'
+    },
+    finishRow(index){
+      this.dialogFormTGVisible = true;
+      this.operateValue = this.tableDatas[index]
+
+    },
+    rejectRow(index){
+      this.rejectForm = {}
+      this.dialogFormVisible = true;
+      this.operateValue = this.tableDatas[index]
+    },
+    subimtBtn(type){
+      const that = this;
+      if(type == 'reject'){
+        if(!this.rejectForm.bhly){
+          this.$message.error("请输入驳回原因");
+        }
+      }
+
+      let item = that.dataList.data.filter(item => item.id == this.operateValue.pid)[0];
+      let yztArr = JSON.parse(item.c_yzt_permission);
+      yztArr.forEach(element => {
+        if(element.id == this.operateValue.id){
+          if(type == 'confirm'){
+            element.status = 2;
+            element.statusText = "已通过";
+          }else{
+            element.status = '-1';
+            element.statusText = "已驳回";
+            element.bhly = this.rejectForm.bhly;
+          }
+        }
+      });
+      let str = {id:this.operateValue.pid,c_yzt_permission:yztArr}
+      that.save(str)
+    },
+    // 保存
+    save(content){
+      const that = this;
+      let param = {
+        content: JSON.stringify(content),
+        columnId: systemConfig.columnIds[8],
+        modelId: systemConfig.modelIds[5],
+      }
+      api.updateContent(param).then((res) => {
+        if (res.code === 200) {
+          that.$message.success("保存成功");
+          that.operateValue = {}
+          that.dialogFormVisible = false;
+          that.dialogFormTGVisible = false;
+          that.getColumnListDate();
+        }
+      });
+    },
+    handleSelectChange(){
+      // console.log(this.selByValue);
+      // 筛选时重置页码到第一页
+      this.currentPage = 1;
+      const sourceData = this.selByValue === "0" ? this.itemTableDatas : this.itemTableDatas.filter(item => item.status == this.selByValue);
+      // 更新总条数
+      this.total = sourceData.length;
+      // 更新当前页数据
+      const start = (this.currentPage - 1) * this.pageSize;
+      const end = start + this.pageSize;
+      this.tableDatas = sourceData.slice(start, end);
+    },
+    getColumnListDate(){
+      const that = this;
+      that.tableDatas = [];
+      const param = {
+        columnId: systemConfig.columnIds[8],
+        orderBy: [{"field":"title","orderByType":2}],
+        states: '0,1,2,3,5',
+        pageSize: 99999,
+        page: 0
+      };
+      api.getSimpleContentList(param).then((res) => {
+        // console.log("====getColumnListDate====="+res);
+        if (res.code === 200) {
+          that.dataList = res.content;
+          // that.total = res.content.count;
+          that.getDataStatus = false;
+          // console.log(res.content);
+          that.getTableData(res.content);
+          }
+        });
+    },
+    getTableData(param){
+      const that = this;
+      let count = 0;
+      param.data.forEach((item,index) => {
+        // let tabStr = {
+        //   title:item.title,
+        //   content:item.content,
+        //   job:item.c_job,
+        //   organizationName:item.c_organization_name,
+        //   authorId:item.author_id
+        // }
+        if(item.c_yzt_permission){
+          count++;
+          let yztArr = JSON.parse(item.c_yzt_permission);
+          yztArr.forEach((element,index2) => {
+            let tabStr = {
+              pid:item.id,
+              title:item.title,
+              content:item.content,
+              job:item.c_job,
+              organizationName:item.c_organization_name,
+              authorId:item.author_id,
+              statusText:element.statusText,
+              name:element.name,
+              id:element.id,
+              bhly:element.bhly,
+              sqly:element.sqly,
+              status:element.status,
+            }
+            that.tableDatas.push(tabStr)
+          });
+        }
+        // else{
+        //   tabStr.statusText = "-";
+        //   tabStr.name = "-";
+        //   tabStr.id = "-";
+        //   tabStr.bhly = "-";
+        //   tabStr.sqly = "-";
+        //   tabStr.status = "-";
+        //   that.tableDatas.push(tabStr);
+        // }
+      })
+      that.itemTableDatas = that.tableDatas;
+      that.TopCardDatas[0].value= count;
+      that.TopCardDatas[1].value=that.tableDatas.filter(item => item.status === 2).length;
+      that.TopCardDatas[2].value=that.tableDatas.filter(item => item.status === '-1').length;
+      that.TopCardDatas[3].value=that.tableDatas.filter(item => item.status === 1).length;
+      that.total = that.tableDatas.length;
+      // 初始化分页,从第一页开始
+      that.currentPage = 1;
+      that.handleCurrentChange(1);
+    }
+  }
+};
+</script>
+
+<style lang="less" scoped>
+.mainBox {
+  width: calc(100% - 60px);
+  margin: 30px;
+  padding-bottom: 80px;
+  & > div {
+    margin: 20px 0;
+    display: flex;
+  }
+  .card {
+    width: calc(25% - 56px);
+    border-radius: 5px;
+    padding: 20px 18px;
+    // background: #00000032;
+    background: #eeeeee0b;
+    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
+  }
+
+  .card2 {
+    width: 100%;
+    border-radius: 5px;
+    padding: 20px 18px;
+    // background: rgba(255, 255, 255, 0.1);
+    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
+  }
+
+  .bigCard {
+    width: calc(100% - 36px);
+    border-radius: 5px;
+    padding: 20px 18px;
+    // background: #00000032;
+    position: relative;
+    flex-direction: column;
+    background: #eeeeee0b;
+    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
+    .tools {
+      position: absolute;
+      top: 20px;
+      right: 20px;
+      display: flex;
+      flex-direction: row;
+      justify-content: flex-end;
+    }
+    &_title {
+      font-size: 20px;
+      font-weight: bold;
+    }
+  }
+
+  .flex {
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+  }
+  .flex_column {
+    display: flex;
+    flex-direction: column;
+    justify-content: space-between;
+    align-items: flex-start;
+    box-sizing: border-box;
+  }
+
+  .searchBox {
+    width: 100%;
+    height: 50px;
+    line-height: 50px;
+    text-align: center;
+    font-size: 20px;
+    font-weight: bold;
+    flex-direction: row-reverse;
+    display: flex;
+  }
+}
+
+// 弹窗加载状态图标
+.loading-icon {
+  // 图标顺时针旋转动画
+  animation: loading-icon-spin 2s linear infinite;
+}
+@keyframes loading-icon-spin {
+  0% {
+    transform: rotate(0deg);
+  }
+  100% {
+    transform: rotate(360deg);
+  }
+}
+
+// 美化表格行悬停效果
+:deep(.el-table__body tr:hover > td) {
+  background-color: rgba(24, 144, 255, 0.1) !important;
+}
+
+// 美化表格边框
+:deep(.el-table__inner-wrapper) {
+  border-radius: 6px;
+  overflow: hidden;
+}
+
+:deep(.el-table__cell) {
+  border-right: 1px solid rgba(255, 255, 255, 0.05);
+}
+
+:deep(.el-table__row) {
+  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
+}
+
+// 调整奇偶行背景色,使其更明亮
+:deep(.el-table--striped .el-table__body tr.el-table__row--striped) {
+  background-color: rgba(255, 255, 255, 0.02) !important;
+}
+
+// 调整表格主体背景色
+:deep(.el-table__body) {
+  background-color: rgba(0, 0, 0, 0.05);
+}
+:deep(.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell) {
+  background-color: rgba(255, 255, 255, 0.02);
+}
+
+// 分页控件
+.pagination-section {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin: 10px 15px 0px 10px;
+  // padding-top: 15px;
+  // border-top: 1px solid rgba(255, 255, 255, 0.1);
+}
+
+.total-text {
+  font-size: 14px;
+  color: rgba(255, 255, 255, 0.8);
+}
+</style>

+ 2 - 2
src/views/yxgl/StatisticalAnalysis.vue

@@ -2,7 +2,7 @@
   <div class="mainBox" v-loading="getDataStatus">
     <!-- 搜索区域 -->
     <div class="searchBox">
-      <div style="font-size: large">
+      <div style="font-size: small">
         <!-- 对比时间:
         <el-date-picker
           v-model="lastTimes"
@@ -25,7 +25,7 @@
           start-placeholder="开始时间"
           end-placeholder="结束时间"
           :shortcuts="shortcutsFun"
-          size="large"
+          size="small"
         />
       </div>
     </div>

+ 1 - 1
src/views/yygl/monitor/index.vue

@@ -145,7 +145,7 @@
               <div class="app-stats">
                 <!-- <div class="stat-bar" :style="{ width: app.percentage + '%' }"></div> -->
                 <div style="width: 100%">
-                  <el-progress :percentage="app.percentage" :show-percentage="false" striped striped-flow>
+                  <el-progress :percentage="app.percentage" :show-percentage="false" striped striped-flow :duration="20">
                     <div slot="percentage" class="progress-custom">
                       <!-- <img src="/icon.png" /> -->
                        <el-icon style="display: contents;">