1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
| <template>
| <zt-dialog ref="dialog" column="2" title="选择通用模型" append-to-body :editAble="false" :hasConfirm="true"
| @confirm="formSubmit">
| <el-card shadow="never" class="aui-card--fill">
| <div class="mod-tyProductModel-tyProductModel}">
| <zt-table-wraper query-url="/basicInfo/TyProductModel/page"
| v-slot="{ table }">
| <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()">
| </el-form>
| <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:70}"
| border
| @selection-change="table.selectionChangeHandle"
| @selected="onSelected">
| <el-table-column type="selection" width="40" align="center"/>
| <el-table-column prop="name" label="名称"/>
| </el-table>
| </zt-table-wraper>
| </div>
| </el-card>
| </zt-dialog>
| </template>
|
| <script>
| export default {
| name: 'SelectTyModel',
| data() {
| return {
| dataForm: {
| type:'noTree',
| nodeType: '',
| pid: '',
| name: '',
| operationalStatus: '',
| standbyState: '',
| faultState: '',
| }
| }
| },
| components: {},
| methods: {
| init(type) {
| this.dataForm.nodeType = type
| console.log(this.dataForm.nodeType, 'init()')
| },
| async onSelected() {
| let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/basicInfo/XhProductModel/', this.dataForm)
| if (res.success) {
| await this.$tip.success()
| this.$refs.dialog.close()
| this.$emit('refreshDataList')
| this.map.clear()
| }
| }
| }
| }
| </script>
|
|