|
@@ -22,17 +22,36 @@
|
|
|
<ip-input :ip="formData.ProtocolInfo.Ip" :port="formData.ProtocolInfo.Port"
|
|
|
:ProtocolType="formData.ProtocolType" @change="changeItem" @deletePort="deletePort"></ip-input>
|
|
|
</el-form-item>
|
|
|
- <template v-if="formData.ProtocolType == 'opc'">
|
|
|
+ <template v-if="formData.ProtocolType =='ems-collect'">
|
|
|
+ <el-form-item label="TCP/UDP">
|
|
|
+ <el-select placeholder="请选择" v-model="tcpOptions">
|
|
|
+ <el-option v-for="item in tcpList" :key="item.value" :label="item.label" :value="item.value"/>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="线程数">
|
|
|
+ <el-select placeholder="请选择" v-model="threadOptions">
|
|
|
+ <el-option v-for="item in threadList" :key="item.value" :label="item.label" :value="item.value"/>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="HBase库名">
|
|
|
+ <el-input/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="zookeeper">
|
|
|
+ <el-input/>
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ <template
|
|
|
+ v-if="formData.ProtocolType == 'opc' ||formData.ProtocolType == 'mqtt' || formData.ProtocolType == 'amqp' ">
|
|
|
<el-form-item label="用户名">
|
|
|
<el-input v-model="formData.ProtocolInfo.User"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="密码">
|
|
|
<el-input v-model="formData.ProtocolInfo.Password"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="ProgId">
|
|
|
- <el-input v-model="formData.ProtocolInfo.ProgId"></el-input>
|
|
|
- </el-form-item>
|
|
|
</template>
|
|
|
+ <el-form-item label="ProgId" v-if="formData.ProtocolType == 'opc'">
|
|
|
+ <el-input v-model="formData.ProtocolInfo.ProgId"></el-input>
|
|
|
+ </el-form-item>
|
|
|
|
|
|
<el-form-item label="采集间隔(s)" v-if="formData.ProtocolType != 'ems-collect'">
|
|
|
<el-input-number v-model="formData.CollectInterval" controls-position="right" :min="10"></el-input-number>
|
|
@@ -61,14 +80,6 @@
|
|
|
<el-input type="textarea" v-model="formData.ceshi" :autosize="{ minRows: 4, maxRows: 4}"
|
|
|
disabled></el-input>
|
|
|
</el-form-item>
|
|
|
- <!-- <el-form-item label="用户名/密码" v-if="(passWordArr.indexOf(formData.ProtocolType) > -1)">-->
|
|
|
- <!-- <el-input v-model="formData.ProtocolInfo.User" style="display:inline-block;width:100px;"></el-input>-->
|
|
|
- <!-- -->
|
|
|
- <!-- <el-input v-model="formData.ProtocolInfo.Password" style="display:inline-block;width:100px;"></el-input>-->
|
|
|
- <!-- </el-form-item>-->
|
|
|
- <!-- <el-form-item label="ProgId" v-if="formData.ProtocolType == 'opc'">-->
|
|
|
- <!-- <el-input v-model="formData.ProtocolInfo.ProgId" style="display:inline-block;width:100px;"></el-input>-->
|
|
|
- <!-- </el-form-item>-->
|
|
|
<el-form-item label="属性详情" v-if="formData.ProtocolType == 'common'">
|
|
|
<el-input type="textarea" :autosize="{ minRows: 8, maxRows: 8}" v-model="ProtocolInfo"
|
|
|
placeholder="请输入json格式数据" style="display:inline-block;width:400px;"></el-input>
|
|
@@ -96,7 +107,6 @@
|
|
|
return {
|
|
|
dialogVisible: false,
|
|
|
title: '',
|
|
|
- passWordArr: ['mqtt', 'amqp', 'opc'],
|
|
|
formData: {
|
|
|
ProtocolType: "", //协议类型
|
|
|
ProtocolStandarded: true,
|
|
@@ -149,30 +159,24 @@
|
|
|
label: '间接'
|
|
|
},
|
|
|
],
|
|
|
- // id: this.$route.query.key
|
|
|
+ tcpList: [
|
|
|
+ {value: 1, label: 'TCP'},
|
|
|
+ {value: 0, label: 'UDP'}
|
|
|
+ ],
|
|
|
+ threadList: [
|
|
|
+ {value: 1, label: 1},
|
|
|
+ {value: 2, label: 2},
|
|
|
+ {value: 4, label: 4},
|
|
|
+ {value: 8, label: 8}
|
|
|
+ ],
|
|
|
+ threadOptions: '', //临时存储
|
|
|
+ tcpOptions: '',//临时存储
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
|
ipInput,
|
|
|
- // bread
|
|
|
},
|
|
|
- // created() {
|
|
|
- // this.$store.dispatch('setBreadcrumb', [{
|
|
|
- // label: '系统集成',
|
|
|
- // path: '/point/pointsetting'
|
|
|
- // }, {
|
|
|
- // label: '子系统点位接入',
|
|
|
- // path: '/point/pointsetting'
|
|
|
- // }, {
|
|
|
- // label: this.id ? '编辑数据源' : '添加数据源'
|
|
|
- // }])
|
|
|
- // },
|
|
|
- // mounted() {
|
|
|
- // console.log(this.id)
|
|
|
- // if (!!this.id) {
|
|
|
- // this.getDataSouse()
|
|
|
- // }
|
|
|
- // },
|
|
|
+
|
|
|
methods: {
|
|
|
openDialog(obj) {
|
|
|
this.dialogVisible = true
|
|
@@ -203,11 +207,7 @@
|
|
|
break
|
|
|
|
|
|
}
|
|
|
- // if (val == 'common') {
|
|
|
- // this.formData.ProtocolStandarded = false
|
|
|
- // } else {
|
|
|
- // this.formData.ProtocolStandarded = true
|
|
|
- // }
|
|
|
+
|
|
|
},
|
|
|
handleChangeNetType(val) { //网络类型
|
|
|
console.log(val)
|
|
@@ -230,7 +230,6 @@
|
|
|
this.formData = data
|
|
|
if (!this.formData.ProtocolInfo) {
|
|
|
//信息点为空时
|
|
|
-
|
|
|
this.formData.ProtocolInfo = {
|
|
|
"Ip": "", //ip
|
|
|
"Port": "",
|