|  |  | 
 |  |  |       > | 
 |  |  |         <el-table-column type="selection" width="55"></el-table-column> | 
 |  |  |         <el-table-column prop="title" label="拜访事由" min-width="200px"></el-table-column> | 
 |  |  |         <el-table-column prop="constructionType" label="是否施工作业" min-width="200px"> | 
 |  |  |             <template slot-scope="{row}"> | 
 |  |  |               <el-switch @change="changeType($event, row)" v-model="row.constructionType" active-color="#13ce66" | 
 |  |  |                          inactive-color="#ff4949" :active-value="1" :inactive-value="0"> | 
 |  |  |               </el-switch> | 
 |  |  |             </template> | 
 |  |  |           </el-table-column> | 
 |  |  |         <el-table-column prop="sortnum" label="排序码"  min-width="100px"></el-table-column> | 
 |  |  |         <el-table-column prop="editDate" label="操作时间" min-width="200px"></el-table-column> | 
 |  |  |         <el-table-column | 
 |  |  | 
 |  |  | import TableLayout from '@/layouts/TableLayout' | 
 |  |  | import Pagination from '@/components/common/Pagination' | 
 |  |  | import OperaVisitreasonWindow from '@/components/business/OperaVisitreasonWindow' | 
 |  |  | import { updateWorkStatus } from '@/api/business/member' | 
 |  |  | export default { | 
 |  |  |   name: 'areaSet', | 
 |  |  |   extends: BaseTable, | 
 |  |  |   components: { TableLayout, Pagination, OperaVisitreasonWindow }, | 
 |  |  |   data () { | 
 |  |  |     return { | 
 |  |  |       working: false, | 
 |  |  |       // 搜索 | 
 |  |  |       searchForm: { | 
 |  |  |         title: '' | 
 |  |  | 
 |  |  |     this.search() | 
 |  |  |   }, | 
 |  |  |   methods: { | 
 |  |  |     changeType (e, row) { | 
 |  |  |       this.working = true | 
 |  |  |       this.api.updateById({ id: row.id, constructionType: e }) | 
 |  |  |         .then(res => { | 
 |  |  |           this.$tip.apiSuccess(res || '操作成功') | 
 |  |  |           this.search() | 
 |  |  |         }) | 
 |  |  |         .catch(e => { | 
 |  |  |           this.$tip.apiFailed(e) | 
 |  |  |         }) | 
 |  |  |         .finally(() => { | 
 |  |  |           this.working = false | 
 |  |  |         }) | 
 |  |  |         .catch(() => { }) | 
 |  |  |     } | 
 |  |  |   } | 
 |  |  | } | 
 |  |  | </script> |