dedsudiyu 8 місяців тому
батько
коміт
0b005bdef6

+ 285 - 0
src/views/safetyCheck/collegeInspect/selfInspectionManage/index.vue

@@ -0,0 +1,285 @@
+<!-- 自查管理 -->
+<template>
+  <div class="app-container selfInspectionManage">
+    <div class="page-container selfInspectionManagePage" v-if="pageType === 1">
+      <div class="page-form-title-box">
+        <el-form :model="queryParams" class="form-box" ref="queryForm"
+                 :inline="true" style="width:100%;">
+          <el-form-item label="" prop="queryParamsData1">
+            <el-input
+              maxLength="30"
+              v-model="queryParams.queryParamsData1"
+              placeholder="请输入"
+              style="width: 200px"
+            />
+          </el-form-item>
+          <el-form-item label="" prop="queryParamsData2">
+            <el-select v-model="queryParams.queryParamsData2" placeholder="请选择" style="width: 200px">
+              <el-option
+                v-for="dict in optionList"
+                :key="dict.value"
+                :label="dict.label"
+                :value="dict.value"
+              />
+            </el-select>
+          </el-form-item>
+          <el-form-item label="" prop="state">
+            <el-date-picker
+              :clearable="false"
+              v-model="dateRange"
+              size="small"
+              style="width: 240px"
+              value-format="yyyy-MM-dd"
+              type="daterange"
+              range-separator="-"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+            ></el-date-picker>
+          </el-form-item>
+          <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
+          <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
+          <p class="page-submit-common-style-button"
+             style="float: right;"
+             @click="tableButton(1)"
+             v-hasPermiRouter="['demo:demo:add']"
+          >新增</p>
+        </el-form>
+      </div>
+      <div class="page-conten-box">
+        <div class="page-content-left-box">
+
+        </div>
+        <div class="page-content-center-box"></div>
+        <div class="page-content-right-box">
+          <el-table class="table-box" v-loading="loading" border :data="dataList">
+            <el-table-column label="名称" prop="name"  show-overflow-tooltip/>
+            <el-table-column label="内容" prop="content" width="200" show-overflow-tooltip/>
+            <el-table-column label="状态" prop="state" width="100" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <el-switch
+                  @click.native="tableButton(5,scope.row)"
+                  class="switch captcha-img"
+                  :active-value="true"
+                  :inactive-value="false"
+                  active-color="#0183FA"
+                  inactive-color="#999"
+                  v-model="scope.row.state"
+                  active-text="启用"
+                  inactive-text="停用"
+                  disabled
+                ></el-switch>
+              </template>
+            </el-table-column>
+            <el-table-column label="创建时间" prop="createTime" width="200" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span>{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="操作" width="200" show-overflow-tooltip v-if="tableButtonType">
+              <template slot-scope="scope">
+                <div class="table-button-box">
+                  <p class="table-button-null"></p>
+                  <p class="table-button-p"
+                     @click="tableButton(2,scope.row)"
+                     v-hasPermiRouter="['demo:demo:detail']"
+                  >详情</p>
+                  <p class="table-button-p"
+                     @click="tableButton(3,scope.row)"
+                     v-hasPermiRouter="['demo:demo:edit']"
+                  >编辑</p>
+                  <p class="table-button-p"
+                     @click="tableButton(4,scope.row)"
+                     v-hasPermiRouter="['demo:demo:del']"
+                  >删除</p>
+                  <p class="table-button-null"></p>
+                </div>
+              </template>
+            </el-table-column>
+          </el-table>
+          <pagination :page-sizes="[20, 30, 40, 50]"
+                      v-show="total>0"
+                      :total="total"
+                      :page.sync="queryParams.page"
+                      :limit.sync="queryParams.pageSize"
+                      @pagination="getList"
+          />
+        </div>
+      </div>
+    </div>
+    <!--<add-page :propsData="propsData" v-if="pageType === 2"></add-page>-->
+  </div>
+</template>
+<script>
+  //import { getDicts } from "@/api/commonality/noPermission";
+  //import { systemUserSelect } from "@/api/commonality/permission";
+  //import { getInfo } from "@/api/basicsModules/index";
+  //import addPage from "./addPage.vue";
+  export default {
+    name: 'index',
+    //components: {
+    //  addPage
+    //},
+    data () {
+      return {
+        tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
+        //页面状态
+        pageType:1,
+        //页面遮罩
+        loading:false,
+        //下拉列表数据
+        optionList:[{value:true,label:'启用'},{value:false,label:'停用'}],
+        //查询条件
+        queryParams:{
+          page:1,
+          pageSize:20,
+          queryParamsData1:"",
+          queryParamsData2 :null,
+        },
+        //时间数据
+        dateRange:[],
+        //列表数据
+        dataList:[],
+        //数据数量
+        total:0,
+        //组件传参
+        propsData:{},
+        leftListData:[
+          {
+            leftData1:'计划名称计划名称计划名称计划名称',
+            leftData2:'检查类型',
+            leftData3:'1',
+            leftDataList:[
+              {
+                leftDataListData1:'第一次检查',
+                leftDataListData2:'时间',
+                leftDataListData3:50,
+                leftDataListData4:'11',
+
+              }
+            ],
+          }
+        ],
+      }
+    },
+    created () {
+
+    },
+    mounted () {
+      //this.getList();
+    },
+    methods: {
+      //查询按钮
+      handleQuery(){
+        this.$set(this.queryParams,'page',1);
+        this.getList();
+      },
+      //重置按钮
+      resetQuery(){
+        this.$set(this,'dateRange',[])
+        this.$set(this,'queryParams',{
+          page:1,
+          pageSize:20,
+          queryParamsData1:"",
+          queryParamsData2 :null,
+        });
+        this.getList();
+      },
+      //获取数据列表
+      getList(){
+        this.$set(this,'loading',true);
+        let obj = JSON.parse(JSON.stringify(this.queryParams))
+        if(this.dateRange[0]){
+          obj.startTime = this.dateRange[0]+'T00:00:00'
+          obj.endTime = this.dateRange[1]+'T23:59:59'
+        }else{
+          obj.startTime = "";
+          obj.endTime = "";
+        }
+        getListFunction(obj).then(response => {
+          this.$set(this,'loading',false);
+          this.$set(this,'dataList',response.data.records);
+          this.$set(this,'total',response.data.total);
+        });
+      },
+      //操作按钮
+      tableButton(type,row){
+        let self = this;
+        if(type == 1){
+          //新增
+          this.$set(this,'pageType',2);
+          this.$set(this,'propsData',{});
+        }else if(type == 2){
+          //详情
+          this.$set(this,'pageType',2);
+          let obj = JSON.parse(JSON.stringify(row))
+          obj.showType = true;
+          this.$set(this,'propsData',obj);
+        }else if(type == 3){
+          //编辑
+          this.$set(this,'pageType',2);
+          let obj = JSON.parse(JSON.stringify(row))
+          obj.showType = false;
+          this.$set(this,'propsData',obj);
+        }else if(type == 4){
+          //删除
+          this.$confirm('是否确认删除?', "警告", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(function() {
+          }).then(() => {
+            deleteFunction({id:row.id}).then(response => {
+              self.msgSuccess(response.message)
+              self.getList();
+            });
+          }).catch(() => {});
+        }else if(type == 5){
+          //启用&停用
+          let text = row.state  ? "停用" : "启用";
+          this.$confirm('是否确认' + text + '?', "警告", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(function() {
+          }).then(() => {
+            stateFunction({id:row.id,state:!row.state,}).then(response => {
+              self.msgSuccess(response.message)
+              self.getList();
+            });
+          }).catch(() => {});
+        }else if(type == 6){
+          //返回并刷新
+          this.$set(this,'pageType',1);
+          this.getList();
+        }
+      },
+    },
+  }
+</script>
+<style scoped lang="scss">
+  .selfInspectionManage{
+    .selfInspectionManagePage{
+      .page-conten-box{
+        overflow: hidden;
+        display: flex;
+        flex-direction: row;
+        flex:1;
+        .page-content-left-box{
+          width: 480px;
+          margin:20px;
+        }
+        .page-content-center-box{
+          margin:20px 0;
+          border-right:1px dashed #dedede;
+        }
+        .page-content-right-box{
+          display: flex;
+          overflow: hidden;
+          flex:1;
+          margin:20px;
+
+        }
+      }
+    }
+  }
+</style>

+ 2 - 2
src/views/safetyCheck/safetyHazard/inspectHazard/index.vue

@@ -67,7 +67,7 @@
               />
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData2">
+          <el-form-item label="" prop="queryParamsData2" v-if="advancedType">
             <el-select v-model="queryParams.queryParamsData2" placeholder="安全分类" style="width: 160px">
               <el-option
                 v-for="dict in optionList"
@@ -77,7 +77,7 @@
               />
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData2">
+          <el-form-item label="" prop="queryParamsData2" v-if="advancedType">
             <el-select v-model="queryParams.queryParamsData2" placeholder="安全分级" style="width: 160px">
               <el-option
                 v-for="dict in optionList"

+ 21 - 1
src/views/safetyCheck/safetyHazard/selfInspectionHazard/index.vue

@@ -28,6 +28,26 @@
         <el-form :model="queryParams" class="form-box" ref="queryForm"
                  :inline="true" style="width:100%;">
           <el-form-item label="" prop="queryParamsData2">
+            <el-form-item label="" prop="queryParamsData2">
+              <el-select v-model="queryParams.queryParamsData2" placeholder="检查类型" style="width: 160px">
+                <el-option
+                  v-for="dict in optionList"
+                  :key="dict.value"
+                  :label="dict.label"
+                  :value="dict.value"
+                />
+              </el-select>
+            </el-form-item>
+            <el-form-item label="" prop="queryParamsData2">
+              <el-select v-model="queryParams.queryParamsData2" placeholder="一级指标" style="width: 170px">
+                <el-option
+                  v-for="dict in optionList"
+                  :key="dict.value"
+                  :label="dict.label"
+                  :value="dict.value"
+                />
+              </el-select>
+            </el-form-item>
             <el-select v-model="queryParams.queryParamsData2" placeholder="学院单位" style="width: 170px">
               <el-option
                 v-for="dict in optionList"
@@ -88,7 +108,7 @@
               maxLength="30"
               v-model="queryParams.queryParamsData1"
               placeholder="整改人"
-              style="width: 160px"
+              style="width: 150px"
             />
           </el-form-item>
           <el-form-item label="" prop="state" v-if="advancedType">

+ 243 - 0
src/views/safetyCheck/schoolInspect/inspectManage/index.vue

@@ -0,0 +1,243 @@
+<!-- 检查管理 -->
+<template>
+  <div class="app-container inspectManage">
+    <div class="page-container inspectManagePage" v-if="pageType === 1">
+      <div class="page-form-title-box">
+        <el-form :model="queryParams" class="form-box" ref="queryForm"
+                 :inline="true" style="width:100%;">
+          <el-form-item label="" prop="queryParamsData1">
+            <el-input
+              maxLength="30"
+              v-model="queryParams.queryParamsData1"
+              placeholder="请输入"
+              style="width: 200px"
+            />
+          </el-form-item>
+          <el-form-item label="" prop="queryParamsData2">
+            <el-select v-model="queryParams.queryParamsData2" placeholder="请选择" style="width: 200px">
+              <el-option
+                v-for="dict in optionList"
+                :key="dict.value"
+                :label="dict.label"
+                :value="dict.value"
+              />
+            </el-select>
+          </el-form-item>
+          <el-form-item label="" prop="state">
+            <el-date-picker
+              :clearable="false"
+              v-model="dateRange"
+              size="small"
+              style="width: 240px"
+              value-format="yyyy-MM-dd"
+              type="daterange"
+              range-separator="-"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+            ></el-date-picker>
+          </el-form-item>
+          <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
+          <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
+          <p class="page-submit-common-style-button"
+             style="float: right;"
+             @click="tableButton(1)"
+             v-hasPermiRouter="['demo:demo:add']"
+          >新增</p>
+        </el-form>
+      </div>
+      <div class="page-content-box">
+        <el-table class="table-box" v-loading="loading" border :data="dataList">
+          <el-table-column label="名称" prop="name"  show-overflow-tooltip/>
+          <el-table-column label="内容" prop="content" width="200" show-overflow-tooltip/>
+          <el-table-column label="状态" prop="state" width="100" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <el-switch
+                @click.native="tableButton(5,scope.row)"
+                class="switch captcha-img"
+                :active-value="true"
+                :inactive-value="false"
+                active-color="#0183FA"
+                inactive-color="#999"
+                v-model="scope.row.state"
+                active-text="启用"
+                inactive-text="停用"
+                disabled
+              ></el-switch>
+            </template>
+          </el-table-column>
+          <el-table-column label="创建时间" prop="createTime" width="200" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="操作" width="200" show-overflow-tooltip v-if="tableButtonType">
+            <template slot-scope="scope">
+              <div class="table-button-box">
+                <p class="table-button-null"></p>
+                <p class="table-button-p"
+                   @click="tableButton(2,scope.row)"
+                   v-hasPermiRouter="['demo:demo:detail']"
+                >详情</p>
+                <p class="table-button-p"
+                   @click="tableButton(3,scope.row)"
+                   v-hasPermiRouter="['demo:demo:edit']"
+                >编辑</p>
+                <p class="table-button-p"
+                   @click="tableButton(4,scope.row)"
+                   v-hasPermiRouter="['demo:demo:del']"
+                >删除</p>
+                <p class="table-button-null"></p>
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+        <pagination :page-sizes="[20, 30, 40, 50]"
+                    v-show="total>0"
+                    :total="total"
+                    :page.sync="queryParams.page"
+                    :limit.sync="queryParams.pageSize"
+                    @pagination="getList"
+        />
+      </div>
+    </div>
+    <!--<add-page :propsData="propsData" v-if="pageType === 2"></add-page>-->
+  </div>
+</template>
+<script>
+  //import { getDicts } from "@/api/commonality/noPermission";
+  //import { systemUserSelect } from "@/api/commonality/permission";
+  //import { getInfo } from "@/api/basicsModules/index";
+  //import addPage from "./addPage.vue";
+  export default {
+    name: 'index',
+    //components: {
+    //  addPage
+    //},
+    data () {
+      return {
+        tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
+        //页面状态
+        pageType:1,
+        //页面遮罩
+        loading:false,
+        //下拉列表数据
+        optionList:[{value:true,label:'启用'},{value:false,label:'停用'}],
+        //查询条件
+        queryParams:{
+          page:1,
+          pageSize:20,
+          queryParamsData1:"",
+          queryParamsData2 :null,
+        },
+        //时间数据
+        dateRange:[],
+        //列表数据
+        dataList:[],
+        //数据数量
+        total:0,
+        //组件传参
+        propsData:{},
+      }
+    },
+    created () {
+
+    },
+    mounted () {
+      //this.getList();
+    },
+    methods: {
+      //查询按钮
+      handleQuery(){
+        this.$set(this.queryParams,'page',1);
+        this.getList();
+      },
+      //重置按钮
+      resetQuery(){
+        this.$set(this,'dateRange',[])
+        this.$set(this,'queryParams',{
+          page:1,
+          pageSize:20,
+          queryParamsData1:"",
+          queryParamsData2 :null,
+        });
+        this.getList();
+      },
+      //获取数据列表
+      getList(){
+        this.$set(this,'loading',true);
+        let obj = JSON.parse(JSON.stringify(this.queryParams))
+        if(this.dateRange[0]){
+          obj.startTime = this.dateRange[0]+'T00:00:00'
+          obj.endTime = this.dateRange[1]+'T23:59:59'
+        }else{
+          obj.startTime = "";
+          obj.endTime = "";
+        }
+        getListFunction(obj).then(response => {
+          this.$set(this,'loading',false);
+          this.$set(this,'dataList',response.data.records);
+          this.$set(this,'total',response.data.total);
+        });
+      },
+      //操作按钮
+      tableButton(type,row){
+        let self = this;
+        if(type == 1){
+          //新增
+          this.$set(this,'pageType',2);
+          this.$set(this,'propsData',{});
+        }else if(type == 2){
+          //详情
+          this.$set(this,'pageType',2);
+          let obj = JSON.parse(JSON.stringify(row))
+          obj.showType = true;
+          this.$set(this,'propsData',obj);
+        }else if(type == 3){
+          //编辑
+          this.$set(this,'pageType',2);
+          let obj = JSON.parse(JSON.stringify(row))
+          obj.showType = false;
+          this.$set(this,'propsData',obj);
+        }else if(type == 4){
+          //删除
+          this.$confirm('是否确认删除?', "警告", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(function() {
+          }).then(() => {
+            deleteFunction({id:row.id}).then(response => {
+              self.msgSuccess(response.message)
+              self.getList();
+            });
+          }).catch(() => {});
+        }else if(type == 5){
+          //启用&停用
+          let text = row.state  ? "停用" : "启用";
+          this.$confirm('是否确认' + text + '?', "警告", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(function() {
+          }).then(() => {
+            stateFunction({id:row.id,state:!row.state,}).then(response => {
+              self.msgSuccess(response.message)
+              self.getList();
+            });
+          }).catch(() => {});
+        }else if(type == 6){
+          //返回并刷新
+          this.$set(this,'pageType',1);
+          this.getList();
+        }
+      },
+    },
+  }
+</script>
+<style scoped lang="scss">
+  .inspectManage{
+    .inspectManagePage{
+
+    }
+  }
+</style>