| | |
| | | v-for="item in memberList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.name" |
| | | :label="item.name+' 【'+item.code+'】'" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="name" label="案例标题" min-width="100px"></el-table-column> |
| | | <el-table-column prop="name" label="案例标题" min-width="200px"></el-table-column> |
| | | <el-table-column prop="icon" label="排行榜图集" min-width="220px"> |
| | | <template slot-scope="{row}"> |
| | | <div style="display: flex; flex-wrap: wrap;width: 200px;" v-if="row.fileList && row.fileList.length"> |
| | |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="memberName" label="老师" min-width="120px"></el-table-column> |
| | | <el-table-column prop="memberName" label="老师" min-width="220px"> |
| | | <template slot-scope="{row}"> |
| | | <span class="orange" style="margin-right: 10px"> {{row.memberCode}}</span> <span>{{row.memberName||''}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="startDate" label="开始日期" min-width="140px"></el-table-column> |
| | | <el-table-column prop="endDate" label="结束日期" min-width="140px"></el-table-column> |
| | | <el-table-column prop="detail" label="案例描述" min-width="230px" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="detail" label="案例描述" min-width="230px" ></el-table-column> |
| | | <el-table-column prop="updateUserName" label="操作人" min-width="100px"></el-table-column> |
| | | <el-table-column prop="updateTime" label="最近操作时间" min-width="150px"></el-table-column> |
| | | <el-table-column label="状态" fixed="right"> |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | deleteById (row, childConfirm = true, call) { |
| | | this.__checkApi() |
| | | let message = `确认删除案例数据吗?` |
| | | if (childConfirm && row.children != null && row.children.length > 0) { |
| | | message = `确认删除案例数据吗?` |
| | | } |
| | | this.$dialog.deleteConfirm(message) |
| | | .then(() => { |
| | | this.isWorking.delete = true |
| | | this.api.deleteById(row[this.configData['field.id']]) |
| | | .then(() => { |
| | | this.__afterDelete() |
| | | if (call) { |
| | | call() |
| | | } |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking.delete = false |
| | | }) |
| | | }) |
| | | .catch(() => {}) |
| | | }, |
| | | deleteByIdInBatch (childConfirm = true, call) { |
| | | this.__checkApi() |
| | | if (this.tableData.selectedRows.length === 0) { |
| | | this.$tip.warning('请至少选择一条数据') |
| | | return |
| | | } |
| | | let message = `确认删除案例数据吗?` |
| | | if (childConfirm) { |
| | | const containChildrenRows = [] |
| | | for (const row of this.tableData.selectedRows) { |
| | | if (row.children != null && row.children.length > 0) { |
| | | containChildrenRows.push(row[this.configData['field.main']]) |
| | | } |
| | | } |
| | | if (containChildrenRows.length > 0) { |
| | | message = `确认删除案例数据吗?` |
| | | } |
| | | } |
| | | this.$dialog.deleteConfirm(message) |
| | | .then(() => { |
| | | this.isWorking.delete = true |
| | | this.api.deleteByIdInBatch(this.tableData.selectedRows.map(row => row[this.configData['field.id']]).join(',')) |
| | | .then(() => { |
| | | this.__afterDelete(this.tableData.selectedRows.length) |
| | | if (call) { |
| | | call() |
| | | } |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking.delete = false |
| | | }) |
| | | }) |
| | | .catch(() => {}) |
| | | }, |
| | | changeStatus (e, row) { |
| | | this.working = true |
| | | this.api.updateStatus({ id: row.id, status: e }) |