| | |
| | | <TableLayout :permissions="['business:member:query']"> |
| | | <!-- 搜索表单 --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item label="名称" prop="name"> |
| | | <el-input v-model="searchForm.name" style="width: 150px" placeholder="请输入名称" @keypress.enter.native="search"></el-input> |
| | | <el-form-item label="姓名" prop="name"> |
| | | <el-input v-model="searchForm.name" style="width: 180px" placeholder="请输入姓名" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="工号" prop="code"> |
| | | <el-input v-model="searchForm.code" style="width: 150px" placeholder="请输入工号" @keypress.enter.native="search"></el-input> |
| | | <el-input v-model="searchForm.code" style="width: 180px" placeholder="请输入工号" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="战区" prop="zhanquIds"> |
| | | <el-select |
| | | v-model="searchForm.zhanquIds" |
| | | style="width: 150px" |
| | | style="width: 180px" |
| | | placeholder="战区" |
| | | clearable |
| | | @change="search" |
| | |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="商业化类型" prop="bustypeIds"> |
| | | <el-form-item label="商业化类型" prop="bustypeIdList"> |
| | | <el-select |
| | | v-model="searchForm.bustypeIds" |
| | | style="width: 150px" |
| | | v-model="searchForm.bustypeIdList" |
| | | style="width: 180px" |
| | | placeholder="商业化类型" |
| | | clearable |
| | | multiple |
| | | collapse-tags |
| | | @change="search" |
| | | > |
| | | <el-option |
| | |
| | | <el-form-item label="擅长领域" prop="fieldIdList"> |
| | | <el-select |
| | | v-model="searchForm.fieldIdList" |
| | | style="width: 150px" |
| | | style="width: 300px" |
| | | placeholder="擅长领域" |
| | | clearable |
| | | collapse-tags |
| | | multiple |
| | | @change="search" |
| | | > |
| | |
| | | <el-form-item label="老师等级" prop="levelId"> |
| | | <el-select |
| | | v-model="searchForm.levelId" |
| | | style="width: 150px" |
| | | style="width: 180px" |
| | | placeholder="老师等级" |
| | | clearable |
| | | @change="search" |
| | |
| | | v-model="searchForm.status" |
| | | placeholder="状态" |
| | | clearable |
| | | style="width: 150px" |
| | | style="width: 180px" |
| | | @change="search" |
| | | > |
| | | <el-option :key="0" :value="0" label="启用"></el-option> |
| | |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="imgurl" label="图片" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <el-image v-if="row.fullImgurl" style="width: 50px; height: 50px; margin-right: 10px" :src="row.fullImgurl" |
| | | :preview-src-list="[row.fullImgurl]"> |
| | | <el-image v-if="row.fullImgurl" style="width: 50px; margin-right: 10px" :src="row.fullImgurl" |
| | | :preview-src-list="[row.fullImgurl]"> |
| | | </el-image> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="positon" label="岗位" min-width="120px"></el-table-column> |
| | | <el-table-column prop="levelName" label="等级" min-width="100px"></el-table-column> |
| | | <el-table-column prop="jobYear" label="从业年份" min-width="100px"></el-table-column> |
| | | <el-table-column prop="workYears" label="从业年份" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | {{row.workYears}}年 |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="serveNum" label="服务商场" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.serveNum">{{row.serveNum}}个</span> |
| | |
| | | <el-table-column prop="fieldNames" label="擅长领域" min-width="200px"> |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.fieldList && row.fieldList.length"> |
| | | <div style="display:inline-block;" v-for="(item,index) in row.fieldList">{{item.name||''}} <span v-if="index < row.fieldList.length-1" style="display:inline-block;padding: 0px 3px;">/</span></div> |
| | | <div style="width: 190px; display: -webkit-box; -webkit-box-orient: vertical; line-clamp: 2; overflow: hidden;"> |
| | | <template v-for="(item,index) in row.fieldList">{{item.name||''}} <template v-if="index < row.fieldList.length-1">/</template></template> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="$refs.operaMemberWindow.open('编辑老师', row,searchForm.type)" icon="el-icon-edit" v-permissions="['business:member:update']">编辑</el-button> |
| | | <el-button type="text" @click="$refs.OperaCasesListWindow.open('查看老师案例【'+row.name+'】', row.id)" icon="el-icon-open">案例</el-button> |
| | | <el-button type="text" @click="$refs.OperaCasesListWindow.open('查看老师案例【'+row.name+'】', row.id)" icon="el-icon-picture-outline">案例</el-button> |
| | | <el-button type="text" style="color: red" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:member:delete']">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | levelId:null, |
| | | fieldIdList: [], |
| | | zhanquIds:null, |
| | | bustypeIds:null, |
| | | bustypeIdList:[], |
| | | type: 0 |
| | | }, |
| | | cateList:[] |
| | |
| | | |
| | | }, |
| | | 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 }) |