| | |
| | | |
| | | <section> |
| | | <el-button type="primary" @click="search">搜索</el-button> |
| | | <el-button type="primary" :loading="isWorking.export" v-permissions="['business:ywpatrolscheme:exportExcel']" |
| | | @click="exportExcel">导出</el-button> |
| | | <el-button @click="reset">重置</el-button> |
| | | </section> |
| | | </el-form> |
| | |
| | | <ul class="toolbar" v-permissions="['business:ywpatrolscheme:create', 'business:ywpatrolscheme:delete']"> |
| | | <li><el-button type="primary" @click="editClick()" icon="el-icon-plus" |
| | | v-permissions="['business:ywpatrolscheme:create']">新建</el-button></li> |
| | | <el-button type="primary" plain :loading="isWorking.export" v-permissions="['business:ywpatrolscheme:exportExcel']" |
| | | @click="exportExcel">导出</el-button> |
| | | <!-- <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" |
| | | v-permissions="['business:ywpatrolscheme:delete']">删除</el-button></li> --> |
| | | </ul> |
| | |
| | | </el-table-column> |
| | | <el-table-column label="状态" min-width="100px"> |
| | | <template v-slot="scope"> |
| | | <el-switch v-model="scope.row.status" @change="e => changeStatus(scope.row)" :active-value="0" :inactive-value="1"> |
| | | <el-switch v-model="scope.row.status" @change="e => changeStatus(scope.row)" :active-value="0" |
| | | :inactive-value="1"> |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | return { |
| | | // 搜索 |
| | | searchForm: { |
| | | title: '' |
| | | title: '' |
| | | } |
| | | } |
| | | }, |
| | |
| | | }, |
| | | methods: { |
| | | changeStatus(e) { |
| | | console.log(e); |
| | | console.log(e) |
| | | updateStatusById(e).then(res => { |
| | | this.search() |
| | | Message.success('状态修改成功') |
| | |
| | | }) |
| | | }, |
| | | changeDate(e) { |
| | | if(e && e.length > 0){ |
| | | if (e && e.length > 0) { |
| | | this.$set(this.searchForm, 'startDate', e[0]) |
| | | this.$set(this.searchForm, 'endDate', e[1]) |
| | | }else{ |
| | | } else { |
| | | this.$set(this.searchForm, 'startDate', '') |
| | | this.$set(this.searchForm, 'endDate', '') |
| | | } |
| | | |
| | | |
| | | }, |
| | | reset() { |
| | | this.searchForm = {} |
| | |
| | | this.$refs.operaYwPatrolSchemeWindow.open('新建巡检计划') |
| | | } |
| | | this.$refs.operaYwPatrolSchemeWindow.initData() |
| | | |
| | | |
| | | }, |
| | | } |
| | | } |