| | |
| | | <template> |
| | | <div class="law-enforcement"> |
| | | <MyTable :tableData="list" :tableOption="tableOption" @openDialog="changeDialog"> |
| | | <!-- table表格展示 --> |
| | | <MyTable :tableData="list" :tableOption="tableOption" :totalNum="totalNum" @getCurrentPage="getCurrentPage" |
| | | @openDialog="changeDialog"> |
| | | <template #operation="{info}"> |
| | | <div class="btn"> |
| | | <!-- 操作区域 --> |
| | | <!-- {{getData(info)}} --> |
| | | <span @click="dataView(info)">查看</span> |
| | | </div> |
| | | </template> |
| | | </MyTable> |
| | | <!-- 组件区 --> |
| | | <!-- 弹窗 --> |
| | | <div class="dialog"> |
| | | <el-dialog v-if="visible" :visible.async="visible" title="问题登记" width="60%" :before-close="handleClose"> |
| | | <MyView :viewData=showData /> |
| | | <MyView :viewData=showData /> |
| | | </el-dialog> |
| | | </div> |
| | | </div> |
| | |
| | | import MyView from './components/dataView' |
| | | export default { |
| | | components: { |
| | | MyTable,MyView |
| | | MyTable, MyView |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | children: [ |
| | | { |
| | | operationName: '查看', |
| | | mykey : 'look', |
| | | mykey: 'look', |
| | | }, |
| | | { |
| | | operationName: '修改', |
| | | mykey:'update', |
| | | mykey: 'update', |
| | | } |
| | | ] |
| | | }, |
| | | ] |
| | | }, |
| | | visible:false, |
| | | showData:{}, |
| | | visible: false, |
| | | totalNum: '', |
| | | showData: {}, |
| | | } |
| | | }, |
| | | methods:{ |
| | | created() { |
| | | this.totalNum = this.list.length; |
| | | }, |
| | | methods: { |
| | | // 关闭对话框 |
| | | handleClose(done) { |
| | | this.$confirm('确认关闭?') |
| | |
| | | .catch(_ => { }); |
| | | }, |
| | | // 获取操作结果 |
| | | changeDialog({index,mykey}){ |
| | | console.log(index,mykey); |
| | | changeDialog({ index, mykey }) { |
| | | console.log(index, mykey); |
| | | this.showData = this.list[index]; |
| | | this.visible = true; |
| | | }, |
| | | // 数据展示 |
| | | dataView(data) { |
| | | console.log(data); |
| | | }, |
| | | // 获取当前页数据 |
| | | getCurrentPage(current) { |
| | | console.log(current); |
| | | } |
| | | } |
| | | } |