| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :title="title" :visible.sync="open" width="1200px" append-to-body> |
| | | <el-dialog :title="title" :visible.sync="open" width="1200px" append-to-body @close="quxiao"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px"> |
| | | |
| | | <el-form-item label="内容" prop="xmg"> |
| | | <el-input v-model="queryParams.xmgz" placeholder="请输入内容" clearable @keyup.enter.native="handleQuery" |
| | | style="width: 130px;" /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-table :data="dataList" ref="elTable" v-loading="loading" border @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="40" align="center" /> |
| | | <el-table-column label="标号" prop="aid" align="center" /> |
| | |
| | | <el-table-column label="简码" prop="jm" align="center" /> |
| | | </el-table> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="open = false">取 消</el-button> |
| | | <el-button @click="quxiao">取 消</el-button> |
| | | <el-button type="primary" @click="handleOk">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | |
| | | }, |
| | | list: [], |
| | | fList: {}, |
| | | queryParams: { xmgz: '' } |
| | | }; |
| | | }, |
| | | mounted() { |
| | | }, |
| | | methods: { |
| | | quxiao(){ |
| | | this.open = false |
| | | this.queryParams = { |
| | | xmgz: '' |
| | | } |
| | | }, |
| | | handleOk() { |
| | | if(this.list.length == 0) { |
| | | if (this.list.length == 0) { |
| | | this.$modal.msgError("请选择至少一项!"); |
| | | return |
| | | } else{ |
| | | } else { |
| | | this.open = false |
| | | this.$emit('add', this.list); |
| | | this.$emit('add', this.list); |
| | | } |
| | | |
| | | |
| | | }, |
| | | handleQuery() { |
| | | this.getList(); |
| | |
| | | getList() { |
| | | this.loading = true; |
| | | selectZT({ |
| | | proId: this.proId |
| | | proId: this.proId, |
| | | xmgz: this.queryParams.xmgz |
| | | }).then((res) => { |
| | | if (res.data.length>0) { |
| | | if (res.data.length > 0) { |
| | | this.open = true |
| | | this.dataList = res.data; |
| | | this.loading = false; |
| | | } else { |
| | | this.open = false |
| | | this.dataList = res.data; |
| | | this.loading = false; |
| | | } |
| | | }); |
| | | }, |