| | |
| | | <div style="display: flex;align-items: center;"> |
| | | <span style="margin-right: 8px;">{{ row.name }}</span> |
| | | <el-icon v-if="row.fileType === 'other'"> |
| | | <el-tooltip class="box-item" effect="light" content="其他文件" placement="right"> |
| | | <FolderOpened /> |
| | | </el-tooltip> |
| | | </el-icon> |
| | | <img v-else src="./app.jpg" alt="" width="16" height="16"> |
| | | <el-icon v-if="row.fileType === 'program'"> |
| | | <el-tooltip class="box-item" effect="light" content="程序文件" placement="right"> |
| | | <Tickets/> |
| | | </el-tooltip> |
| | | </el-icon> |
| | | |
| | | <!--<img v-else src="./app.jpg" alt="" width="16" height="16">--> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | this.$message.error('获取已选程序失败'); |
| | | return; |
| | | } else { |
| | | this.tableData = res.data.data || []; |
| | | this.tableData = this.sortTable(res.data.data || []); |
| | | } |
| | | // this.$emit('selection-change',this.tableData) |
| | | }) |
| | | }, |
| | | sortTable(data) { |
| | | data.sort(function(a,b){ |
| | | if(a.program === b.program){//如果program相同,按照name的降序 |
| | | //return a.name - b.name |
| | | return a.name.localeCompare(b.name) |
| | | }else{ |
| | | return b.program - a.program |
| | | } |
| | | }); |
| | | return data; |
| | | }, |
| | | addApp() { |
| | | this.appDialog = true; |
| | | }, |