<template>
|
<Dialog width="60%" v-model="dialogVisible" :title="dialogTitle">
|
<el-tabs>
|
<el-tab-pane label="生产运行煤样快速检查">
|
<el-form :model="formData" :rules="dataRule" ref="formData"
|
v-loading="formLoading"
|
label-width="120px">
|
<el-row>
|
<el-col :span="12">
|
<el-form-item prop="datetime" label="采样时间">
|
<el-date-picker
|
style="width: 100%"
|
type="datetime"
|
format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
size="mini"
|
v-model="formData.datetime"
|
placeholder="采样时间"
|
/>
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item prop="mz" label="混煤煤种及比例">
|
<el-input
|
style="width: 100%"
|
size="mini"
|
v-model="formData.mz"
|
placeholder="例: 五虎山#9:五虎山#12 = 1:2"
|
clearable
|
/>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
</el-form>
|
</el-tab-pane>
|
<el-tab-pane label="生产运行煤样快速检查详情">
|
<el-form :inline="true">
|
<el-form-item>
|
<el-upload
|
class="upload-demo"
|
:action="action"
|
:on-success="handleExcel"
|
:multiple="false"
|
:show-file-list="false"
|
:on-change="changeFile"
|
:file-list="fileList"
|
>
|
<el-button size="mini" type="primary">点击上传</el-button>
|
</el-upload>
|
</el-form-item>
|
<el-form-item>
|
<el-button size="mini" type="success" @click="downloadExcel"
|
>下载模板</el-button
|
>
|
</el-form-item>
|
</el-form>
|
<el-form
|
:model="formData"
|
:rules="dataRule"
|
ref="formDataDet"
|
label-width="120px"
|
>
|
<el-table
|
:data="formData.itemList"
|
border
|
height="400"
|
style="width: 100%"
|
>
|
<el-table-column
|
prop="xm"
|
label="项目"
|
header-align="center"
|
align="center"
|
min-width="150"
|
>
|
<template #default="scope">
|
<dict-select-tag
|
style="width: 100%"
|
size="mini"
|
v-model="scope.row.xm"
|
placeholder="项目"
|
dictCode="sckjxm"
|
clearable
|
/>
|
</template>
|
</el-table-column>
|
<el-table-column
|
prop="yl"
|
label="压力"
|
header-align="center"
|
align="center"
|
min-width="100"
|
>
|
<template #default="scope">
|
<el-input-number
|
v-model="scope.row.yl"
|
size="mini"
|
placeholder="压力"
|
:precision="2"
|
:controls="false"
|
:min="0"
|
:max="100"
|
class="curves-det-input"
|
/>
|
</template>
|
</el-table-column>
|
<el-table-column
|
prop="md"
|
label="密度"
|
header-align="center"
|
align="center"
|
min-width="100"
|
>
|
<template #default="scope">
|
<el-input-number
|
v-model="scope.row.md"
|
size="mini"
|
placeholder="密度"
|
:precision="2"
|
:controls="false"
|
:min="0"
|
:max="100"
|
class="curves-det-input"
|
/>
|
</template>
|
</el-table-column>
|
<el-table-column
|
prop="hf"
|
label="灰分"
|
header-align="center"
|
align="center"
|
min-width="100"
|
>
|
<template #default="scope">
|
<el-input-number
|
v-model="scope.row.hf"
|
size="mini"
|
placeholder="灰分"
|
:precision="2"
|
:controls="false"
|
:min="0"
|
:max="100"
|
class="curves-det-input"
|
/>
|
</template>
|
</el-table-column>
|
<el-table-column
|
prop="lf"
|
label="硫分"
|
header-align="center"
|
align="center"
|
min-width="100"
|
>
|
<template #default="scope">
|
<el-input-number
|
v-model="scope.row.lf"
|
size="mini"
|
:placeholder="$t('washCurves.lf')"
|
:precision="2"
|
:controls="false"
|
:min="0"
|
:max="100"
|
class="curves-det-input"
|
/>
|
</template>
|
</el-table-column>
|
<el-table-column label="-1.4浮沉" header-align="center">
|
<el-table-column
|
prop="cl1"
|
:label="$t('washCurves.cl')"
|
header-align="center"
|
align="center"
|
min-width="100"
|
>
|
<template #default="scope">
|
<el-input-number
|
v-model="scope.row.cl1"
|
size="mini"
|
:placeholder="$t('washCurves.cl')"
|
:precision="2"
|
:controls="false"
|
:min="0"
|
:max="100"
|
class="curves-det-input"
|
/>
|
= </template>
|
</el-table-column>
|
<el-table-column
|
prop="hf1"
|
:label="$t('washCurves.hf')"
|
header-align="center"
|
align="center"
|
min-width="100"
|
>
|
<template #default="scope">
|
<el-input-number
|
v-model="scope.row.hf1"
|
size="mini"
|
:placeholder="$t('washCurves.hf')"
|
:precision="2"
|
:controls="false"
|
:min="0"
|
:max="100"
|
class="curves-det-input"
|
/>
|
</template>
|
</el-table-column>
|
</el-table-column>
|
<el-table-column label="1.4-1.8浮沉" header-align="center">
|
<el-table-column
|
prop="cl2"
|
:label="$t('washCurves.cl')"
|
header-align="center"
|
align="center"
|
min-width="100"
|
>
|
<template #default="scope">
|
<el-input-number
|
v-model="scope.row.cl2"
|
size="mini"
|
:placeholder="$t('washCurves.cl')"
|
:precision="2"
|
:controls="false"
|
:min="0"
|
:max="100"
|
class="curves-det-input"
|
/>
|
</template>
|
</el-table-column>
|
<el-table-column
|
prop="hf2"
|
:label="$t('washCurves.hf')"
|
header-align="center"
|
align="center"
|
min-width="100"
|
>
|
<template #default="scope">
|
<el-input-number
|
v-model="scope.row.hf2"
|
size="mini"
|
:placeholder="$t('washCurves.hf')"
|
:precision="2"
|
:controls="false"
|
:min="0"
|
:max="100"
|
class="curves-det-input"
|
/>
|
</template>
|
</el-table-column>
|
</el-table-column>
|
<el-table-column label="+1.8浮沉" header-align="center">
|
<el-table-column
|
prop="cl3"
|
:label="$t('washCurves.cl')"
|
header-align="center"
|
align="center"
|
min-width="100"
|
>
|
<template #default="scope">
|
<el-input-number
|
v-model="scope.row.cl3"
|
size="mini"
|
:placeholder="$t('washCurves.cl')"
|
:precision="2"
|
:controls="false"
|
:min="0"
|
:max="100"
|
class="curves-det-input"
|
/>
|
</template>
|
</el-table-column>
|
<el-table-column
|
prop="hf3"
|
:label="$t('washCurves.hf')"
|
header-align="center"
|
align="center"
|
min-width="100"
|
>
|
<template #default="scope">
|
<el-input-number
|
v-model="scope.row.hf3"
|
size="mini"
|
:placeholder="$t('washCurves.hf')"
|
:precision="2"
|
:controls="false"
|
:min="0"
|
:max="100"
|
class="curves-det-input"
|
/>
|
</template>
|
</el-table-column>
|
</el-table-column>
|
<el-table-column
|
prop=""
|
label="操作"
|
min-width="100"
|
align="center"
|
>
|
<template #default="scope">
|
<el-button
|
@click="addExpressionRow(scope.$index, formData.itemList)"
|
type="text"
|
size="small"
|
>
|
添加
|
</el-button>
|
<el-button
|
@click="deleteExpressionRow(scope.$index, formData.itemList)"
|
type="text"
|
size="small"
|
>
|
删除
|
</el-button>
|
</template>
|
</el-table-column>
|
</el-table>
|
</el-form>
|
</el-tab-pane>
|
</el-tabs>
|
<template #footer>
|
<el-button size="mini" :disabled="formLoading" type="primary" @click="formDataSubmitHandle()">确定</el-button>
|
<el-button size="mini" @click="dialogVisible = false">取消</el-button>
|
</template>
|
</Dialog>
|
</template>
|
|
<script lang="ts" setup>
|
import * as AnalysisApi from '@/api/xmcpms/coal-quality/analysis/full/index'
|
|
defineOptions({name: 'FullForm'})
|
|
const {t} = useI18n() // 国际化
|
const message = useMessage() // 消息弹窗
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
const dialogTitle = ref('') // 弹窗的标题
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
const formData = ref({
|
lsh:"",
|
datetime: "",
|
mz: "",
|
})
|
|
const open = async (type: string, id?: string) => {
|
dialogVisible.value = true
|
dialogTitle.value = t('action.' + type)
|
//修改时,设置数据
|
if (id) {
|
formLoading.value = true
|
try {
|
formData.value = await AnalysisApi.getAnalysis(id)
|
} finally {
|
formLoading.value = false
|
}
|
}
|
}
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
</script>
|
<style>
|
.curves-det-input {
|
width: 100%;
|
}
|
</style>
|