|
@@ -601,14 +601,17 @@
|
|
|
label-position="left"
|
|
|
>
|
|
|
<el-form-item label="数据类型" prop="nodeType">
|
|
|
- <el-select v-model="autoModal.type" block>
|
|
|
+ <el-select v-model="autoModal.type" block @change="autoChangeType">
|
|
|
<el-option
|
|
|
v-for="item in dataType"
|
|
|
:key="item.dictKey"
|
|
|
:label="item.dictValue"
|
|
|
:value="item.dictKey"
|
|
|
- />
|
|
|
+ />
|
|
|
</el-select>
|
|
|
+ <template v-if="isShowNum">
|
|
|
+ <el-input v-model="autoModal.customValue" block placeholder="高程偏差/顶面高差" class="mt-1" />
|
|
|
+ </template>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</hc-dialog>
|
|
@@ -651,6 +654,7 @@ import {
|
|
|
import { getStoreValue, setStoreValue } from '~src/utils/storage'
|
|
|
import { HcDelMsg, HcUploadFileApi } from 'hc-vue3-ui'
|
|
|
import { toPdfPage } from '~uti/btn-auth'
|
|
|
+import nodeBaseApi from '~api/data-fill/nodebaseinfo'
|
|
|
//参数
|
|
|
const props = defineProps({
|
|
|
datas: {
|
|
@@ -1038,6 +1042,8 @@ const handleMenuSelect = async ({ key }) => {
|
|
|
refs?.setFormData(curFormData)
|
|
|
} else if (key === 'auto') {
|
|
|
console.log('自动获取数据')
|
|
|
+
|
|
|
+
|
|
|
autoModalDialog.value = true
|
|
|
getMajorDataTypeOptions()
|
|
|
}
|
|
@@ -2061,8 +2067,53 @@ const getMajorDataTypeOptions = async () => {
|
|
|
dataType.value = data
|
|
|
|
|
|
}
|
|
|
-const autoSaveClick = ()=>{
|
|
|
+const isShowNum = ref(false)
|
|
|
+const autoChangeType = (val)=>{
|
|
|
+ if (val === '8') {
|
|
|
+ isShowNum.value = true
|
|
|
+
|
|
|
+ } else {
|
|
|
+ isShowNum.value = false
|
|
|
+ }
|
|
|
+}
|
|
|
+const autoSaveClick = async ()=>{
|
|
|
+ const { KeyName, pkeyId } = tableFormItemNode.value
|
|
|
+ const refs = await getFormRef(pkeyId)
|
|
|
+ const itemFormData = refs?.getFormData()
|
|
|
+ let max
|
|
|
+ let min
|
|
|
+
|
|
|
+ if (autoModal.value.type === '8' && !autoModal.value.customValue ) {
|
|
|
+ window.$message?.error('高程偏差/顶面偏差')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (autoModal.value.type === '8' && autoModal.value?.customValue.length > 0) {
|
|
|
+ min = autoModal.value.customValue.split('/')[0]
|
|
|
+ max = autoModal.value.customValue.split('/')[1]
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ const { error, code, msg, data } = await nodeBaseApi.getNodeBaseInfoByPkeyId(
|
|
|
+
|
|
|
+ {
|
|
|
+ nodeId: treeId.value,
|
|
|
+ pkeyId: pkeyId,
|
|
|
+ autoType:autoModal.value.type,
|
|
|
+ max:max,
|
|
|
+ min:min,
|
|
|
+ },
|
|
|
+ )
|
|
|
+
|
|
|
+
|
|
|
+ if (!error && code === 200) {
|
|
|
+ console.log(data, 'data')
|
|
|
+ itemFormData[KeyName] = data
|
|
|
+ refs?.setFormData(itemFormData)
|
|
|
+ window.$message?.success(msg || '操作成功')
|
|
|
+ autoModalDialog.value = false
|
|
|
+
|
|
|
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// 暴露出去
|