|
|
@@ -27,7 +27,7 @@
|
|
|
<div class="nav-btn" @click="handleSetting">
|
|
|
<div class="nav-text">
|
|
|
<SvgIcon class="icon-style1" size="12" name="gas-export"></SvgIcon>
|
|
|
- <span>设置</span>
|
|
|
+ <span @click="handlerClick('set', item)">设置</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -35,9 +35,15 @@
|
|
|
<!--密码操作弹窗 -->
|
|
|
<a-modal v-model:visible="visibleTip" width="450px" okText="确定" cancelText="" title="提示" centered destroyOnClose
|
|
|
@cancel="handleCancel" @ok="handleOk">
|
|
|
- <div class="pass-box" style="display: flex;align-items: center; margin:25px 15px;">
|
|
|
- <span style="width:100px">操作密码:</span>
|
|
|
- <a-input-password v-model:value="passWords" :disabled="false" />
|
|
|
+ <div class="pass-box" style="margin:25px 15px;">
|
|
|
+ <p style="display: flex;align-items: center;justify-content: center;">
|
|
|
+ <ExclamationCircleFilled style="color: #ffb700; font-size: 20px;margin-right: 10px;" />
|
|
|
+ 您是否要进行{{modalOpration }} ?
|
|
|
+ </p>
|
|
|
+ <div style="display: flex;align-items: center;">
|
|
|
+ <span style="width:100px">操作密码:</span>
|
|
|
+ <a-input-password v-model:value="passWords" :disabled="false" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</a-modal>
|
|
|
</div>
|
|
|
@@ -46,6 +52,8 @@
|
|
|
<script setup lang="ts">
|
|
|
import { reactive, ref, watch } from 'vue'
|
|
|
import { SvgIcon } from '/@/components/Icon';
|
|
|
+import { ExclamationCircleFilled } from '@ant-design/icons-vue';
|
|
|
+import { devicecontrol } from '../gasInject/gasInject.api'
|
|
|
|
|
|
let props = defineProps({
|
|
|
option: {
|
|
|
@@ -56,9 +64,10 @@ let props = defineProps({
|
|
|
}
|
|
|
})
|
|
|
|
|
|
-let statusDatas = reactive({})
|
|
|
+let statusDatas = reactive({}) as any
|
|
|
let presure = ref('')
|
|
|
let visibleTip = ref(false)//密码提示弹窗是否开启
|
|
|
+let modalOpration = ref('')
|
|
|
let passWords = ref('')//操作密码
|
|
|
|
|
|
//设置
|
|
|
@@ -67,8 +76,9 @@ function handleSetting() {
|
|
|
}
|
|
|
//按钮操作
|
|
|
function handlerClick(param, item) {
|
|
|
- passWords.value=''
|
|
|
+ passWords.value = ''
|
|
|
visibleTip.value = true
|
|
|
+ modalOpration.value=item.label
|
|
|
switch (param) {
|
|
|
case 'open':
|
|
|
statusDatas[item.value] = '1'
|
|
|
@@ -83,7 +93,9 @@ function handlerClick(param, item) {
|
|
|
}
|
|
|
}
|
|
|
//密码提示弹窗-确定
|
|
|
-function handleOk(){
|
|
|
+async function handleOk() {
|
|
|
+ let res= await devicecontrol({deviceid:statusDatas.deviceId,devicetype:statusDatas.devicetype,masterComputer: 0,paramcode:'',password:passWords.value})
|
|
|
+ console.log(res,'控制---')
|
|
|
visibleTip.value = false
|
|
|
}
|
|
|
//密码提示弹窗-关闭
|
|
|
@@ -95,7 +107,7 @@ function handleCancel() {
|
|
|
watch(() => props.statusData, (newV, oldV) => {
|
|
|
if (newV) {
|
|
|
statusDatas = newV
|
|
|
- presure.value=presure.value ? presure.value : newV.paramSetting
|
|
|
+ presure.value = presure.value ? presure.value : newV.paramSetting
|
|
|
}
|
|
|
})
|
|
|
|
|
|
@@ -194,7 +206,7 @@ watch(() => props.statusData, (newV, oldV) => {
|
|
|
.icon-style1 {
|
|
|
margin-right: 5px;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
::v-deep .zxm-input-sm {
|
|
|
@@ -205,5 +217,4 @@ watch(() => props.statusData, (newV, oldV) => {
|
|
|
border: 1px solid #2cb6ff;
|
|
|
color: #fff;
|
|
|
}
|
|
|
-
|
|
|
</style>
|