|
@@ -89,12 +89,25 @@
|
|
|
</a-col>
|
|
|
<a-col :lg="12" :md="24" :sm="24">
|
|
|
<a-form-item label="设备价格(原值)" :labelCol="BaseTool.Constant.labelCol" :wrapperCol="BaseTool.Constant.wrapperCol">
|
|
|
- <a-input-number style="width: 100%" :min="0" :step="0.01" :formatter="BaseTool.Amount.formatter" :parser="BaseTool.Amount.parser" v-decorator="['initialValue']" />
|
|
|
+ <a-input-number
|
|
|
+ style="width: 100%"
|
|
|
+ :min="0"
|
|
|
+ :step="0.01"
|
|
|
+ :formatter="BaseTool.Amount.formatter"
|
|
|
+ :parser="BaseTool.Amount.parser"
|
|
|
+ v-decorator="['initialValue']" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :lg="12" :md="24" :sm="24">
|
|
|
<a-form-item label="设备类型" :labelCol="BaseTool.Constant.labelCol" :wrapperCol="BaseTool.Constant.wrapperCol">
|
|
|
- <a-tree-select style="width: 100%" :dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }" :treeData="sbTypeTreeData" :treeNodeFilterProp="'title'" :showSearch="true" v-decorator="['typeId', {rules: [{required: true, message: '设备类型不能为空'}]}]" placeholder="请选择">
|
|
|
+ <a-tree-select
|
|
|
+ style="width: 100%"
|
|
|
+ :dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }"
|
|
|
+ :treeData="sbTypeTreeData"
|
|
|
+ :treeNodeFilterProp="'title'"
|
|
|
+ :showSearch="true"
|
|
|
+ v-decorator="['typeId', {rules: [{required: true, message: '设备类型不能为空'}]}]"
|
|
|
+ placeholder="请选择">
|
|
|
</a-tree-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
@@ -153,11 +166,166 @@
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
+ <title-divider title="检定周期信息" width="120px"></title-divider>
|
|
|
+ <div>
|
|
|
+
|
|
|
+ <!-- <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
|
|
|
+ <a-col :lg="12" :md="24" :sm="24">
|
|
|
+ <a-form-item
|
|
|
+ label="计量设备编号"
|
|
|
+ :labelCol="BaseTool.Constant.labelCol"
|
|
|
+ :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
+ >
|
|
|
+ <a-input
|
|
|
+ v-decorator="['cardNo']" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :lg="12" :md="24" :sm="24">
|
|
|
+ <a-form-item
|
|
|
+ label="准确度等级"
|
|
|
+ :labelCol="BaseTool.Constant.labelCol"
|
|
|
+ :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
+ >
|
|
|
+ <a-input
|
|
|
+ v-decorator="['fdjxh']" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
|
|
|
+ <a-col :lg="12" :md="24" :sm="24">
|
|
|
+ <a-form-item
|
|
|
+ label="检定单位"
|
|
|
+ :labelCol="BaseTool.Constant.labelCol"
|
|
|
+ :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
+ >
|
|
|
+ <a-input
|
|
|
+ v-decorator="['dph']" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :lg="12" :md="24" :sm="24">
|
|
|
+ <a-form-item
|
|
|
+ label="检定人"
|
|
|
+ :labelCol="BaseTool.Constant.labelCol"
|
|
|
+ :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
+ >
|
|
|
+ <a-input
|
|
|
+ v-decorator="['zaiz']" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
|
|
|
+ <a-col :lg="12" :md="24" :sm="24">
|
|
|
+ <a-form-item
|
|
|
+ label="检定结论"
|
|
|
+ :labelCol="BaseTool.Constant.labelCol"
|
|
|
+ :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
+ >
|
|
|
+ <a-select v-decorator="['rlType']" placeholder="请选择">
|
|
|
+ <a-select-option
|
|
|
+ v-for="(label,value) in rlTypeMap"
|
|
|
+ :key="value"
|
|
|
+ :label="label"
|
|
|
+ :value="parseInt(value)">{{ label }}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :lg="12" :md="24" :sm="24">
|
|
|
+ <a-form-item
|
|
|
+ label="是否周检查"
|
|
|
+ :labelCol="BaseTool.Constant.labelCol"
|
|
|
+ :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
+ >
|
|
|
+ <a-select v-decorator="['color']" placeholder="请选择">
|
|
|
+ <a-select-option
|
|
|
+ v-for="(label,value) in colorMap"
|
|
|
+ :key="value"
|
|
|
+ :label="label"
|
|
|
+ :value="parseInt(value)">{{ label }}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
|
|
|
+ <a-col :lg="12" :md="24" :sm="24">
|
|
|
+ <a-form-item
|
|
|
+ label="检定证书编号"
|
|
|
+ :labelCol="BaseTool.Constant.labelCol"
|
|
|
+ :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
+ >
|
|
|
+ <a-input
|
|
|
+ v-decorator="['sbdh']" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+
|
|
|
+ </a-row>-->
|
|
|
+
|
|
|
+ <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
|
|
|
+ <a-col :lg="12" :md="24" :sm="24">
|
|
|
+ <a-form-item label="是否需要检定" :labelCol="BaseTool.Constant.labelCol" :wrapperCol="BaseTool.Constant.wrapperCol">
|
|
|
+ <a-select @change="isMeasureChange" v-decorator="['isMeasure', { rules: [{required: true, message: '是否需要检定不能为空'}]}]" placeholder="请选择">
|
|
|
+ <a-select-option v-for="(label,value) in yesNoMap" :key="value" :label="label" :value="parseInt(value)">{{ label }}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <template v-if="isSelfRequired">
|
|
|
+ <a-col :lg="12" :md="24" :sm="24">
|
|
|
+ <a-form-item label="上次检定日期" :labelCol="BaseTool.Constant.labelCol" :wrapperCol="BaseTool.Constant.wrapperCol">
|
|
|
+ <a-date-picker style="width: 100%" :format="BaseTool.Date.PICKER_NORM_DATE_PATTERN" v-decorator="['checkDate', {rules: [{required: useType == 4, message: '上次检定日期不能为空'}]}]" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :lg="12" :md="24" :sm="24">
|
|
|
+ <a-form-item label="检定周期" :labelCol="BaseTool.Constant.labelCol" :wrapperCol="BaseTool.Constant.wrapperCol">
|
|
|
+ <a-input style="width: 100%" suffix="月" :formatter="BaseTool.Amount.formatter" :parser="BaseTool.Amount.parser" v-decorator="['checkPeriod']" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :lg="12" :md="24" :sm="24">
|
|
|
+ <a-form-item label="检定有效期至" :labelCol="BaseTool.Constant.labelCol" :wrapperCol="BaseTool.Constant.wrapperCol">
|
|
|
+ <a-date-picker style="width: 100%" :format="BaseTool.Date.PICKER_NORM_DATE_PATTERN" v-decorator="['nextCheckDate']" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :lg="12" :md="24" :sm="24">
|
|
|
+ <a-form-item label="预警天数" :labelCol="BaseTool.Constant.labelCol" :wrapperCol="BaseTool.Constant.wrapperCol">
|
|
|
+ <a-input-number
|
|
|
+ style="width: 100%"
|
|
|
+ :min="30"
|
|
|
+ :step="1"
|
|
|
+ :formatter="BaseTool.Amount.formatter"
|
|
|
+ :parser="BaseTool.Amount.parser"
|
|
|
+ v-decorator="['seatNumber']" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :lg="12" :md="24" :sm="24">
|
|
|
+ <a-form-item label="检定单位" :labelCol="BaseTool.Constant.labelCol" :wrapperCol="BaseTool.Constant.wrapperCol">
|
|
|
+ <a-input v-decorator="['dph']" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+
|
|
|
+ <a-col :lg="12" :md="24" :sm="24">
|
|
|
+ <a-form-item label="是否自检" :labelCol="BaseTool.Constant.labelCol" :wrapperCol="BaseTool.Constant.wrapperCol">
|
|
|
+ <a-select v-decorator="['isSelf', { rules: [{required: isSelfRequired, message: '是否需要检定不能为空'}]}]" placeholder="请选择">
|
|
|
+ <a-select-option v-for="(label,value) in yesNoMap" :key="value" :label="label" :value="parseInt(value)">{{ label }}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </template>
|
|
|
+ </a-row>
|
|
|
+ </div>
|
|
|
<title-divider title="数字地图配置" width="150px"></title-divider>
|
|
|
<a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
|
|
|
<a-col :lg="12" :md="24" :sm="24">
|
|
|
<a-form-item label="设备位置" :labelCol="BaseTool.Constant.labelCol" :wrapperCol="BaseTool.Constant.wrapperCol">
|
|
|
- <a-tree-select style="width: 100%" :dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }" :treeData="treeData" :treeNodeFilterProp="'title'" :showSearch="true" v-decorator="['positionId', {rules: [{required: true, message: '上层位置不能为空'}]}]" placeholder="请选择">
|
|
|
+ <a-tree-select
|
|
|
+ style="width: 100%"
|
|
|
+ :dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }"
|
|
|
+ :treeData="treeData"
|
|
|
+ :treeNodeFilterProp="'title'"
|
|
|
+ :showSearch="true"
|
|
|
+ v-decorator="['positionId', {rules: [{required: true, message: '上层位置不能为空'}]}]"
|
|
|
+ placeholder="请选择">
|
|
|
</a-tree-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
@@ -452,147 +620,7 @@
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</div>
|
|
|
- <title-divider title="检定周期信息" width="90px"></title-divider>
|
|
|
- <div>
|
|
|
- <!-- <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
|
|
|
- <a-col :lg="12" :md="24" :sm="24">
|
|
|
- <a-form-item
|
|
|
- label="计量设备编号"
|
|
|
- :labelCol="BaseTool.Constant.labelCol"
|
|
|
- :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
- >
|
|
|
- <a-input
|
|
|
- v-decorator="['cardNo']" />
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :lg="12" :md="24" :sm="24">
|
|
|
- <a-form-item
|
|
|
- label="准确度等级"
|
|
|
- :labelCol="BaseTool.Constant.labelCol"
|
|
|
- :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
- >
|
|
|
- <a-input
|
|
|
- v-decorator="['fdjxh']" />
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
|
|
|
- <a-col :lg="12" :md="24" :sm="24">
|
|
|
- <a-form-item
|
|
|
- label="检定单位"
|
|
|
- :labelCol="BaseTool.Constant.labelCol"
|
|
|
- :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
- >
|
|
|
- <a-input
|
|
|
- v-decorator="['dph']" />
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :lg="12" :md="24" :sm="24">
|
|
|
- <a-form-item
|
|
|
- label="检定人"
|
|
|
- :labelCol="BaseTool.Constant.labelCol"
|
|
|
- :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
- >
|
|
|
- <a-input
|
|
|
- v-decorator="['zaiz']" />
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
|
|
|
- <a-col :lg="12" :md="24" :sm="24">
|
|
|
- <a-form-item
|
|
|
- label="检定结论"
|
|
|
- :labelCol="BaseTool.Constant.labelCol"
|
|
|
- :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
- >
|
|
|
- <a-select v-decorator="['rlType']" placeholder="请选择">
|
|
|
- <a-select-option
|
|
|
- v-for="(label,value) in rlTypeMap"
|
|
|
- :key="value"
|
|
|
- :label="label"
|
|
|
- :value="parseInt(value)">{{ label }}
|
|
|
- </a-select-option>
|
|
|
- </a-select>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :lg="12" :md="24" :sm="24">
|
|
|
- <a-form-item
|
|
|
- label="是否周检查"
|
|
|
- :labelCol="BaseTool.Constant.labelCol"
|
|
|
- :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
- >
|
|
|
- <a-select v-decorator="['color']" placeholder="请选择">
|
|
|
- <a-select-option
|
|
|
- v-for="(label,value) in colorMap"
|
|
|
- :key="value"
|
|
|
- :label="label"
|
|
|
- :value="parseInt(value)">{{ label }}
|
|
|
- </a-select-option>
|
|
|
- </a-select>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
|
|
|
- <a-col :lg="12" :md="24" :sm="24">
|
|
|
- <a-form-item
|
|
|
- label="检定证书编号"
|
|
|
- :labelCol="BaseTool.Constant.labelCol"
|
|
|
- :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
- >
|
|
|
- <a-input
|
|
|
- v-decorator="['sbdh']" />
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
|
|
|
- </a-row>-->
|
|
|
- <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
|
|
|
- <a-col :lg="12" :md="24" :sm="24">
|
|
|
- <a-form-item label="上次检定日期" :labelCol="BaseTool.Constant.labelCol" :wrapperCol="BaseTool.Constant.wrapperCol">
|
|
|
- <a-date-picker style="width: 100%" :format="BaseTool.Date.PICKER_NORM_DATE_PATTERN" v-decorator="['checkDate', {rules: [{required: useType == 4, message: '上次检定日期不能为空'}]}]" />
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :lg="12" :md="24" :sm="24">
|
|
|
- <a-form-item label="检定周期" :labelCol="BaseTool.Constant.labelCol" :wrapperCol="BaseTool.Constant.wrapperCol">
|
|
|
- <a-input style="width: 100%" suffix="月" :formatter="BaseTool.Amount.formatter" :parser="BaseTool.Amount.parser" v-decorator="['checkPeriod']" />
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
|
|
|
- <a-col :lg="12" :md="24" :sm="24">
|
|
|
- <a-form-item label="检定有效期至" :labelCol="BaseTool.Constant.labelCol" :wrapperCol="BaseTool.Constant.wrapperCol">
|
|
|
- <a-date-picker style="width: 100%" :format="BaseTool.Date.PICKER_NORM_DATE_PATTERN" v-decorator="['nextCheckDate']" />
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :lg="12" :md="24" :sm="24">
|
|
|
- <a-form-item label="预警天数" :labelCol="BaseTool.Constant.labelCol" :wrapperCol="BaseTool.Constant.wrapperCol">
|
|
|
- <a-input-number style="width: 100%" :min="30" :step="1" :formatter="BaseTool.Amount.formatter" :parser="BaseTool.Amount.parser" v-decorator="['seatNumber']" />
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-row>
|
|
|
- <a-col :lg="12" :md="24" :sm="24">
|
|
|
- <a-form-item label="检定单位" :labelCol="BaseTool.Constant.labelCol" :wrapperCol="BaseTool.Constant.wrapperCol">
|
|
|
- <a-input v-decorator="['dph']" />
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :lg="12" :md="24" :sm="24">
|
|
|
- <a-form-item label="是否需要检定" :labelCol="BaseTool.Constant.labelCol" :wrapperCol="BaseTool.Constant.wrapperCol">
|
|
|
- <a-select @change="isMeasureChange" v-decorator="['isMeasure', { rules: [{required: true, message: '是否需要检定不能为空'}]}]" placeholder="请选择">
|
|
|
- <a-select-option v-for="(label,value) in yesNoMap" :key="value" :label="label" :value="parseInt(value)">{{ label }}
|
|
|
- </a-select-option>
|
|
|
- </a-select>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :lg="12" :md="24" :sm="24">
|
|
|
- <a-form-item label="是否自检" :labelCol="BaseTool.Constant.labelCol" :wrapperCol="BaseTool.Constant.wrapperCol">
|
|
|
- <a-select v-decorator="['isSelf', { rules: [{required: isSelfRequired, message: '是否需要检定不能为空'}]}]" placeholder="请选择">
|
|
|
- <a-select-option v-for="(label,value) in yesNoMap" :key="value" :label="label" :value="parseInt(value)">{{ label }}
|
|
|
- </a-select-option>
|
|
|
- </a-select>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- </div>
|
|
|
<title-divider title="文件信息" width="90px"></title-divider>
|
|
|
<a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
|
|
|
<a-col :lg="12" :md="24" :sm="24">
|
|
@@ -620,7 +648,14 @@
|
|
|
</a-col>
|
|
|
<a-col :lg="12" :md="24" :sm="24">
|
|
|
<a-form-item label="设备图片" :labelCol="BaseTool.Constant.labelCol" :wrapperCol="BaseTool.Constant.wrapperCol">
|
|
|
- <a-upload :action="uploadUrl" :multiple="false" list-type="picture" :file-list="this.defaultSbFileList" @change="handleSbFileChange" accept="image/*" :headers="headers">
|
|
|
+ <a-upload
|
|
|
+ :action="uploadUrl"
|
|
|
+ :multiple="false"
|
|
|
+ list-type="picture"
|
|
|
+ :file-list="this.defaultSbFileList"
|
|
|
+ @change="handleSbFileChange"
|
|
|
+ accept="image/*"
|
|
|
+ :headers="headers">
|
|
|
<a-button> <a-icon type="upload" /> 选择上传文件 </a-button>
|
|
|
</a-upload>
|
|
|
</a-form-item>
|
|
@@ -631,7 +666,7 @@
|
|
|
<sb-info-select-modal ref="sbInfoSelectModal" @selected="handleSbSelectd" />
|
|
|
<firm-producer-select-modal ref="producerSelectModal" @selected="handleProducerSelected" />
|
|
|
<param-form ref="paramForm" @ok="handleParamList" />
|
|
|
- <PointModal ref='pointModal' @ok="handlePointSelect" />
|
|
|
+ <PointModal ref="pointModal" @ok="handlePointSelect" />
|
|
|
</a-card>
|
|
|
</template>
|
|
|
|
|
@@ -667,9 +702,9 @@ export default {
|
|
|
ParamForm,
|
|
|
DetailList,
|
|
|
PointModal,
|
|
|
- DetailListItem,
|
|
|
+ DetailListItem
|
|
|
},
|
|
|
- data() {
|
|
|
+ data () {
|
|
|
return {
|
|
|
confirmLoading: false,
|
|
|
modalTitle: null,
|
|
@@ -720,25 +755,25 @@ export default {
|
|
|
fileList: [],
|
|
|
type: null,
|
|
|
headers: {
|
|
|
- Authorization: 'Bearer ' + Vue.ls.get(ACCESS_TOKEN),
|
|
|
- },
|
|
|
+ Authorization: 'Bearer ' + Vue.ls.get(ACCESS_TOKEN)
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
props: {
|
|
|
useType: {
|
|
|
type: Number,
|
|
|
- default: 3,
|
|
|
+ default: 3
|
|
|
},
|
|
|
parentId: {
|
|
|
type: String,
|
|
|
- default: null,
|
|
|
+ default: null
|
|
|
},
|
|
|
parentName: {
|
|
|
type: String,
|
|
|
- default: null,
|
|
|
- },
|
|
|
+ default: null
|
|
|
+ }
|
|
|
},
|
|
|
- created() {
|
|
|
+ created () {
|
|
|
this.depreciationTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_DEPRECIATIONTYPE)
|
|
|
this.levelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_LEVEL)
|
|
|
this.colorMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_COLOR)
|
|
@@ -762,10 +797,10 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
- base(record, type) {
|
|
|
+ base (record, type) {
|
|
|
if (this.parentId) {
|
|
|
const {
|
|
|
- form: { setFieldsValue },
|
|
|
+ form: { setFieldsValue }
|
|
|
} = this
|
|
|
// 日期处理
|
|
|
this.$nextTick(() => {
|
|
@@ -773,7 +808,7 @@ export default {
|
|
|
Object.assign({
|
|
|
parentId: this.parentId,
|
|
|
parentSbName: this.parentName,
|
|
|
- isChild: this.BaseTool.Object.getField(this.isChildMap, this.DictCache.VALUE.SB_IS_CHILD.IS_CHILD),
|
|
|
+ isChild: this.BaseTool.Object.getField(this.isChildMap, this.DictCache.VALUE.SB_IS_CHILD.IS_CHILD)
|
|
|
})
|
|
|
)
|
|
|
})
|
|
@@ -811,7 +846,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
const {
|
|
|
- form: { setFieldsValue },
|
|
|
+ form: { setFieldsValue }
|
|
|
} = this
|
|
|
// 日期处理
|
|
|
// record.buyDate = this.BaseTool.Moment(record.buyDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
|
|
@@ -942,15 +977,15 @@ export default {
|
|
|
'installUnit',
|
|
|
'examResult',
|
|
|
'usePosition',
|
|
|
- 'sbRegisterNo',
|
|
|
+ 'sbRegisterNo'
|
|
|
])
|
|
|
)
|
|
|
)
|
|
|
})
|
|
|
},
|
|
|
- save() {
|
|
|
+ save () {
|
|
|
const {
|
|
|
- form: { validateFieldsAndScroll },
|
|
|
+ form: { validateFieldsAndScroll }
|
|
|
} = this
|
|
|
this.confirmLoading = true
|
|
|
validateFieldsAndScroll((errors, values) => {
|
|
@@ -1023,19 +1058,19 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- getQrcodeSrc() {
|
|
|
+ getQrcodeSrc () {
|
|
|
// console.log(111, 22)
|
|
|
},
|
|
|
- handleCancel() {
|
|
|
+ handleCancel () {
|
|
|
this.visible = false
|
|
|
this.confirmLoading = false
|
|
|
this.form.resetFields()
|
|
|
this.$emit('ok')
|
|
|
},
|
|
|
- handleFresh() {
|
|
|
+ handleFresh () {
|
|
|
fetchSbInfo({ id: this.id }).then((res) => {
|
|
|
const {
|
|
|
- form: { setFieldsValue },
|
|
|
+ form: { setFieldsValue }
|
|
|
} = this
|
|
|
const record = res.data
|
|
|
this.$nextTick(() => {
|
|
@@ -1043,7 +1078,7 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
- setTree(record = {}) {
|
|
|
+ setTree (record = {}) {
|
|
|
fetchSbTypeTree().then((res) => {
|
|
|
this.sbTypeTreeData = res.data
|
|
|
})
|
|
@@ -1064,13 +1099,13 @@ export default {
|
|
|
if (record.useArea != null) {
|
|
|
getDeptsAllByParentId({
|
|
|
deptId: record.useArea,
|
|
|
- nature: this.DictCache.VALUE.SYS_DEPT_NATURE.FEN_GONG_SI,
|
|
|
+ nature: this.DictCache.VALUE.SYS_DEPT_NATURE.FEN_GONG_SI
|
|
|
}).then((res) => {
|
|
|
this.companyList = res.data
|
|
|
})
|
|
|
getDeptsAllByParentId({
|
|
|
deptId: record.useCompany,
|
|
|
- nature: this.DictCache.VALUE.SYS_DEPT_NATURE.XIANG_MU_BU,
|
|
|
+ nature: this.DictCache.VALUE.SYS_DEPT_NATURE.XIANG_MU_BU
|
|
|
}).then((res) => {
|
|
|
this.projectList = res.data
|
|
|
})
|
|
@@ -1092,15 +1127,15 @@ export default {
|
|
|
this.userList = res.data
|
|
|
})
|
|
|
},
|
|
|
- handleSbModelSelect() {
|
|
|
+ handleSbModelSelect () {
|
|
|
const modal = this.$refs.sbModelSelectModal
|
|
|
modal.base()
|
|
|
},
|
|
|
- handleSbModelSelected(keys, rows) {
|
|
|
+ handleSbModelSelected (keys, rows) {
|
|
|
const [key] = keys
|
|
|
const [row] = rows
|
|
|
const {
|
|
|
- form: { setFieldsValue },
|
|
|
+ form: { setFieldsValue }
|
|
|
} = this
|
|
|
|
|
|
this.$nextTick(() => {
|
|
@@ -1118,12 +1153,12 @@ export default {
|
|
|
producerId: row.producerId,
|
|
|
producerName: row.producerName,
|
|
|
unit: row.unit,
|
|
|
- unitName: this.BaseTool.Object.getField(this.unitMap, row.unit),
|
|
|
+ unitName: this.BaseTool.Object.getField(this.unitMap, row.unit)
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- beforeRecheckFileListUpload(file) {
|
|
|
+ beforeRecheckFileListUpload (file) {
|
|
|
const reg = /\.(xls|xlsx)(\?.*)?$/
|
|
|
return new Promise((resolve, reject) => {
|
|
|
if (reg.test(file.name)) {
|
|
@@ -1136,7 +1171,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- beforeUploadPic(file) {
|
|
|
+ beforeUploadPic (file) {
|
|
|
const reg = /\.(jpg|jpeg|png)(\?.*)?$/
|
|
|
return new Promise((resolve, reject) => {
|
|
|
if (reg.test(file.name)) {
|
|
@@ -1149,113 +1184,113 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- clearFileList() {
|
|
|
+ clearFileList () {
|
|
|
this.repairFileList = []
|
|
|
this.useFileList = []
|
|
|
this.recheckFileList = []
|
|
|
this.sbFileList = []
|
|
|
},
|
|
|
- handleRepairFileChange(info) {
|
|
|
+ handleRepairFileChange (info) {
|
|
|
this.defaultRepairFileList = info.fileList
|
|
|
this.repairFileList = this.setFileList(info, 1)
|
|
|
},
|
|
|
- handleUseFileChange(info) {
|
|
|
+ handleUseFileChange (info) {
|
|
|
this.defaultUseFileList = info.fileList
|
|
|
this.useFileList = this.setFileList(info, 2)
|
|
|
},
|
|
|
- handleAreaChange(value) {
|
|
|
+ handleAreaChange (value) {
|
|
|
getDeptsAllByParentId({ deptId: value, nature: this.DictCache.VALUE.SYS_DEPT_NATURE.FEN_GONG_SI }).then((res) => {
|
|
|
this.companyList = res.data
|
|
|
})
|
|
|
},
|
|
|
- handleCompanyChange(value) {
|
|
|
+ handleCompanyChange (value) {
|
|
|
getDeptsAllByParentId({ deptId: value, nature: this.DictCache.VALUE.SYS_DEPT_NATURE.XIANG_MU_BU }).then((res) => {
|
|
|
this.projectList = res.data
|
|
|
})
|
|
|
},
|
|
|
- handleProjectChange(value) {
|
|
|
+ handleProjectChange (value) {
|
|
|
getDeptsAllByParentId({ deptId: value, nature: this.DictCache.VALUE.SYS_DEPT_NATURE.BU_MEN }).then((res) => {
|
|
|
this.deptList = res.data
|
|
|
})
|
|
|
},
|
|
|
- handleDeptChange(value) {
|
|
|
+ handleDeptChange (value) {
|
|
|
getDeptsAllByParentId({ deptId: value, nature: this.DictCache.VALUE.SYS_DEPT_NATURE.BAN_ZU }).then((res) => {
|
|
|
this.groupList = res.data
|
|
|
})
|
|
|
},
|
|
|
- handleGroupChange(value) {
|
|
|
+ handleGroupChange (value) {
|
|
|
queryUserDeptByUserDeptId({ deptId: value }).then((res) => {
|
|
|
this.userList = res.data
|
|
|
})
|
|
|
},
|
|
|
- handlePointSelect(value) {
|
|
|
+ handlePointSelect (value) {
|
|
|
if (!value) return
|
|
|
console.log(value)
|
|
|
const {
|
|
|
- form: { setFieldsValue },
|
|
|
+ form: { setFieldsValue }
|
|
|
} = this
|
|
|
this.$nextTick(() => {
|
|
|
setFieldsValue(Object.assign(pick(value, ['zjm', 'jbdh'])))
|
|
|
})
|
|
|
},
|
|
|
- handleRecheckFileChange(info) {
|
|
|
+ handleRecheckFileChange (info) {
|
|
|
this.defaultRecheckFileList = info.fileList
|
|
|
this.recheckFileList = this.setFileList(info, 3)
|
|
|
},
|
|
|
- handleSbFileChange(info) {
|
|
|
+ handleSbFileChange (info) {
|
|
|
this.defaultSbFileList = info.fileList
|
|
|
this.sbFileList = this.setFileList(info, 4)
|
|
|
},
|
|
|
- clearParent() {
|
|
|
+ clearParent () {
|
|
|
const {
|
|
|
- form: { setFieldsValue },
|
|
|
+ form: { setFieldsValue }
|
|
|
} = this
|
|
|
// 日期处理
|
|
|
this.$nextTick(() => {
|
|
|
setFieldsValue(
|
|
|
Object.assign({
|
|
|
parentId: null,
|
|
|
- parentSbName: null,
|
|
|
+ parentSbName: null
|
|
|
})
|
|
|
)
|
|
|
})
|
|
|
},
|
|
|
// 主子设备切换
|
|
|
- childChange(value) {
|
|
|
+ childChange (value) {
|
|
|
if (
|
|
|
value === this.DictCache.VALUE.SB_IS_CHILD.IS_PARENT ||
|
|
|
value === this.DictCache.VALUE.SB_IS_CHILD.IS_NORMAL
|
|
|
) {
|
|
|
const {
|
|
|
- form: { setFieldsValue },
|
|
|
+ form: { setFieldsValue }
|
|
|
} = this
|
|
|
// 日期处理
|
|
|
this.$nextTick(() => {
|
|
|
setFieldsValue(
|
|
|
Object.assign({
|
|
|
parentId: null,
|
|
|
- parentSbName: null,
|
|
|
+ parentSbName: null
|
|
|
})
|
|
|
)
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
// 设置为需要检定的,是否自检也要设置
|
|
|
- isMeasureChange(value) {
|
|
|
+ isMeasureChange (value) {
|
|
|
if (value === this.DictCache.VALUE.YES_NO.YES) {
|
|
|
this.isSelfRequired = true
|
|
|
} else {
|
|
|
this.isSelfRequired = false
|
|
|
}
|
|
|
},
|
|
|
- handleSbSelect() {
|
|
|
+ handleSbSelect () {
|
|
|
this.$refs.sbInfoSelectModal.base({}, { isChild: this.DictCache.VALUE.SB_IS_CHILD.IS_PARENT })
|
|
|
},
|
|
|
- handleSbSelectd(keys, rows) {
|
|
|
+ handleSbSelectd (keys, rows) {
|
|
|
const [key] = keys
|
|
|
const [row] = rows
|
|
|
const {
|
|
|
- form: { setFieldsValue },
|
|
|
+ form: { setFieldsValue }
|
|
|
} = this
|
|
|
// 日期处理
|
|
|
this.$nextTick(() => {
|
|
@@ -1263,33 +1298,33 @@ export default {
|
|
|
Object.assign({
|
|
|
parentId: key,
|
|
|
parentSbName: row.name,
|
|
|
- ppNo: row.positionNo,
|
|
|
+ ppNo: row.positionNo
|
|
|
})
|
|
|
)
|
|
|
})
|
|
|
},
|
|
|
- handleChange(value) {
|
|
|
+ handleChange (value) {
|
|
|
this.useType = value
|
|
|
},
|
|
|
- handleProducerSelect() {
|
|
|
+ handleProducerSelect () {
|
|
|
const modal = this.$refs.producerSelectModal
|
|
|
modal.base({}, { type: 1 })
|
|
|
},
|
|
|
- handleProducerSelected(record, selectedRowKeys, selectedRow) {
|
|
|
+ handleProducerSelected (record, selectedRowKeys, selectedRow) {
|
|
|
const {
|
|
|
- form: { setFieldsValue },
|
|
|
+ form: { setFieldsValue }
|
|
|
} = this
|
|
|
const [key] = selectedRowKeys
|
|
|
const [row] = selectedRow
|
|
|
setFieldsValue({
|
|
|
producerId: key,
|
|
|
- producerName: row.name,
|
|
|
+ producerName: row.name
|
|
|
})
|
|
|
},
|
|
|
- filterOptionProducer(input, option) {
|
|
|
+ filterOptionProducer (input, option) {
|
|
|
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
},
|
|
|
- setFileList(info, type) {
|
|
|
+ setFileList (info, type) {
|
|
|
// { file, fileList }
|
|
|
|
|
|
const file = info.file
|
|
@@ -1307,9 +1342,9 @@ export default {
|
|
|
return null
|
|
|
}
|
|
|
},
|
|
|
- handlePoint() {
|
|
|
+ handlePoint () {
|
|
|
const {
|
|
|
- form: { getFieldValue },
|
|
|
+ form: { getFieldValue }
|
|
|
} = this
|
|
|
const zjm = getFieldValue('zjm')
|
|
|
const jbdh = getFieldValue('jbdh')
|
|
@@ -1321,7 +1356,7 @@ export default {
|
|
|
id: this.id,
|
|
|
positionId: positionId,
|
|
|
zjm: zjm,
|
|
|
- jbdh: jbdh,
|
|
|
+ jbdh: jbdh
|
|
|
})
|
|
|
|
|
|
// const a = document.createElement('a')
|
|
@@ -1329,21 +1364,21 @@ export default {
|
|
|
// a.target = '_blank'
|
|
|
// a.click()
|
|
|
},
|
|
|
- handleParam() {
|
|
|
+ handleParam () {
|
|
|
const modal = this.$refs.paramForm
|
|
|
modal.base(this.model)
|
|
|
},
|
|
|
- handleParamList(values) {
|
|
|
+ handleParamList (values) {
|
|
|
// console.log(values)
|
|
|
if (this.paramList == null) {
|
|
|
this.paramList = []
|
|
|
}
|
|
|
this.paramList.push(values)
|
|
|
},
|
|
|
- handleDelParam(index) {
|
|
|
+ handleDelParam (index) {
|
|
|
// console.log(index)
|
|
|
this.paramList.splice(index, 1)
|
|
|
- },
|
|
|
- },
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|