|
@@ -33,7 +33,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { ref, onMounted, toRefs, reactive } from 'vue';
|
|
|
+import { ref, onMounted, toRefs, reactive,watch } from 'vue';
|
|
|
import { ElMessage } from 'element-plus';
|
|
|
import systemRow from '@/api/systemRow';
|
|
|
import litLine from "@/api/litLine"
|
|
@@ -44,15 +44,20 @@ export default {
|
|
|
type: Boolean,
|
|
|
required: true
|
|
|
},
|
|
|
- sunSearch: {
|
|
|
+ checkFlash: {
|
|
|
type: Function,
|
|
|
required: true
|
|
|
- }
|
|
|
+ },//litline传过来的方法
|
|
|
+ flashId:{
|
|
|
+ type:String,
|
|
|
+ required:true,
|
|
|
+ },//litline传过来的电压等级
|
|
|
},
|
|
|
setup(props, { emit }) {
|
|
|
let dialogVisible = ref(false)
|
|
|
let result = props.alModal
|
|
|
let { cancels, sureClick } = toRefs(props)
|
|
|
+ let flashIds = ref("")//本组件的电压id
|
|
|
let ruleForm = ref({
|
|
|
name: "",
|
|
|
volId: "",
|
|
@@ -72,8 +77,12 @@ export default {
|
|
|
],
|
|
|
})
|
|
|
let ruleFormRef = ref(null)
|
|
|
+ watch(()=>props.flashId,(newVal)=>{
|
|
|
+ flashIds.value = newVal
|
|
|
+ })
|
|
|
function lineList() {
|
|
|
dialogVisible.value = result
|
|
|
+ flashIds.value = props.flashId
|
|
|
}
|
|
|
function searchFlashLel() {
|
|
|
systemRow.getChildren({ code: "voltage_level" }).then(res => {
|
|
@@ -110,7 +119,7 @@ export default {
|
|
|
type: "success",
|
|
|
duration: 1500
|
|
|
})
|
|
|
- props.sunSearch()
|
|
|
+ props.checkFlash(flashIds.value)
|
|
|
}else{
|
|
|
ElMessage({
|
|
|
message:res.msg,
|
|
@@ -143,6 +152,7 @@ export default {
|
|
|
rules,
|
|
|
closes: cancelBack,
|
|
|
ruleFormRef,
|
|
|
+ flashIds,
|
|
|
}
|
|
|
}
|
|
|
}
|