| | |
| | | <!-- 表格和分页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:sites:create']"> |
| | | <li><el-button type="primary" @click="$refs.operaSitesWindow.open('新建站点')" icon="el-icon-plus" v-permissions="['business:sites:create']">新建</el-button></li> |
| | | <li><el-button type="primary" @click="$refs.operaSitesWindow.open('新建站点')" icon="el-icon-plus" |
| | | v-permissions="['business:sites:create']">新建</el-button></li> |
| | | </ul> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | stripe |
| | | border |
| | | > |
| | | <el-table-column prop="code" label="站点编号" :sort-method="(a,b)=>{ return a.code-b.code}" sortable min-width="100px" align="center"></el-table-column> |
| | | <el-table v-loading="isWorking.search" :data="tableData.list" stripe border> |
| | | <el-table-column prop="code" label="站点编号" :sort-method="(a, b) => { return a.code - b.code }" sortable |
| | | min-width="100px" align="center"></el-table-column> |
| | | <el-table-column prop="name" label="站点名称" sortable min-width="100px" align="center"></el-table-column> |
| | | |
| | | <el-table-column prop="createTime" label="创建时间" sortable min-width="100px" align="center"></el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['business:sites:update', 'business:sites:delete'])" |
| | | label="操作" |
| | | min-width="120" |
| | | align="center" |
| | | fixed="right" |
| | | > |
| | | <el-table-column v-if="containPermissions(['business:sites:update', 'business:sites:delete'])" label="操作" |
| | | min-width="120" align="center" fixed="right"> |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="handleDraw(row)">绘制地图区域</el-button> |
| | | <el-button type="text" @click="$refs.operaSitesWindow.open('编辑站点', row)" icon="el-icon-edit" v-permissions="['business:sites:update']">编辑</el-button> |
| | | <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:sites:delete']">删除</el-button> |
| | | <el-button type="text" @click="$refs.operaSitesWindow.open('编辑站点', row)" icon="el-icon-edit" |
| | | v-permissions="['business:sites:update']">编辑</el-button> |
| | | <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" |
| | | v-permissions="['business:sites:delete']">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | > |
| | | <pagination @size-change="handleSizeChange" @current-change="handlePageChange" :pagination="tableData.pagination"> |
| | | </pagination> |
| | | </template> |
| | | <!-- 新建/修改 --> |
| | | <OperaSitesWindow ref="operaSitesWindow" @success="handlePageChange" /> |
| | | <!-- 查看二维码 --> |
| | | <AMap v-if="isShowMap" ref="MapRef" /> |
| | | <AMap ref="MapRef" /> |
| | | <div id="aaa"></div> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | |
| | | }, |
| | | methods: { |
| | | handleDraw() { |
| | | this.isShowMap = true |
| | | this.$nextTick(() => { |
| | | this.$refs.MapRef.isShowModal = true |
| | | this.$nextTick(() => { |
| | | // this.$refs.MapRef.isShowModal = true |
| | | this.$refs.MapRef.initMap() |
| | | }) |
| | | } |
| | | } |