| | |
| | | <!-- 搜索表单 --> |
| | | <div slot="search-form"> |
| | | <el-form ref="searchForm" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item label="风险类型" prop="typeId"> |
| | | <el-cascader v-model="searchForm.categoryList" :options="categorys" @change="handleChangeCategory" :show-all-levels="false" |
| | | <el-form-item label="风险类型" prop="typeIdPath"> |
| | | <!-- <el-cascader v-model="searchForm.categoryList" :options="categorys" @change="handleChangeCategory" :show-all-levels="false" |
| | | clearable filterable :props="categoryprops" > |
| | | <template slot-scope="{ node, data }"> |
| | | <span>{{ data.name }}</span> <!-- 自定义显示内容 --> |
| | | <span>{{ data.name }}</span> <!– 自定义显示内容 –> |
| | | </template> |
| | | </el-cascader> |
| | | </el-cascader>--> |
| | | <treeselect |
| | | style="width: 150px" |
| | | v-model="searchForm.typeIdPath" |
| | | placeholder="伤害类型" |
| | | clearable |
| | | :options="categorys" |
| | | :normalizer="normalizeOptions" |
| | | :default-expand-level="1" |
| | | @input="search" |
| | | noChildrenText="没有子选项" |
| | | noOptionsText="没有可选项" |
| | | noResultsText="没有匹配的结果" /> |
| | | </el-form-item> |
| | | <el-form-item label="上报人员" prop="memberName"> |
| | | <el-input v-model="searchForm.memberName" clearable placeholder="人员姓名或手机号" @keypress.enter.native="search"></el-input> |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="submitDate" label="上报时间" min-width="150px"></el-table-column> |
| | | <el-table-column prop="happenTime" label="发现时间" min-width="150px"></el-table-column> |
| | | <el-table-column prop="locationName" label="发生地点" min-width="100px"></el-table-column> |
| | | <el-table-column prop="riskInfo" label="风险描述" min-width="100px"></el-table-column> |
| | | <el-table-column prop="memberName" label="上报人员" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | |
| | | memberName: '', |
| | | memberCompanyId: '', |
| | | localtionId: '', |
| | | typeId: '', |
| | | typeId: null, |
| | | typeIdPath: null, |
| | | code: '', |
| | | categoryList: [] |
| | | }, |
| | |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | normalizeOptions(node) { |
| | | if (node.childList && !node.childList.length) { |
| | | // 去掉children=[]的children属性 |
| | | delete node.childList; |
| | | } |
| | | return { |
| | | id: node.idPath, |
| | | label: node.name, |
| | | children: node.childList, |
| | | }; |
| | | }, |
| | | handleChangeCategory (value) { |
| | | if (this.searchForm.categoryList && this.searchForm.categoryList.length >= 1) { |
| | | this.searchForm.typeId = this.searchForm.categoryList[this.searchForm.categoryList.length - 1] |