zhouwx
2025-11-28 97a84b500fb1d5418d8a72a7fc8af2829c83ece5
src/views/build/conpanyFunctionConsult/standardSysTemp/recordStandardModule/index.vue
@@ -20,16 +20,19 @@
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="文件名称:" >
          <el-input v-model.trim="data.queryParams.templateName"  placeholder="文件名称"></el-input>
        </el-form-item>
        <el-form-item >
          <el-button v-if="isAdmin" type="primary" @click="getList">查询</el-button>
          <el-button v-if="isAdmin" type="primary" plain @click="reset">重置</el-button>
          <el-button type="primary" @click="getList">查询</el-button>
          <el-button type="primary" plain @click="reset">重置</el-button>
        </el-form-item>
      </el-form>
    </div>
    <!-- 表格数据 -->
    <el-table v-loading="loading" :data="dataList" :border="true">
    <el-table v-loading="loading" :data="dataList" :border="true"  @sort-change="handleSortChange">
      <el-table-column label="序号" type="index" align="center" width="80"/>
      <el-table-column label="文件名称" prop="templateName" header-align="center" align="left"/>
      <el-table-column label="文件名称" prop="templateName" header-align="center" align="left" sortable="custom"/>
<!--      <el-table-column label="分类" prop="classify" align="center">-->
<!--        <template #default="scope">-->
<!--          <span>{{scope.row.classify == 1 ? '体系标准' :scope.row.classify == 2 ?'安全标准': scope.row.classify == 3 ? '其他' : ''}}</span>-->
@@ -80,6 +83,8 @@
    pageNum: 1,
    pageSize: 10,
    companyId: null,
    templateName:'',
    sort:null,
    templateType: 11
  },
  total: 0,
@@ -185,13 +190,27 @@
/** 重置新增的表单以及其他数据  */
const reset= async()=> {
  data.queryParams = {
    pageNum: 1,
    pageSize: 10,
    companyId: null,
    templateType: 11
  if(data.isAdmin){
    data.queryParams = {
      pageNum: 1,
      pageSize: 10,
      companyId: null,
      templateName:'',
      sort:data.queryParams.sort,
      templateType: 11
    }
    await getCompanyList()
  }else {
    data.queryParams = {
      pageNum: 1,
      pageSize: 10,
      companyId: data.queryParams.companyId,
      templateName:'',
      sort:data.queryParams.sort,
      templateType: 11
    }
  }
  await getCompanyList()
  await getList()
}
const handleDelete = (val) => {
@@ -213,5 +232,14 @@
        }
      })
}
const handleSortChange = (val) => {
  console.log('bal',val)
  if(val.order === 'ascending' ){
    data.queryParams.sort = 1
  }else if(val.order === "descending" ){
    data.queryParams.sort = 2
  }
  getList()
}
</script>