|
@@ -88,12 +88,12 @@
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
<a-form-model-item label="出厂日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productDate">
|
|
<a-form-model-item label="出厂日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productDate">
|
|
- <j-date placeholder="请选择出厂日期" v-model="model.productDate" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
|
|
|
|
|
|
+ <j-date placeholder="请选择出厂日期" v-model="model.productDate" :show-time="true" date-format="YYYY-MM-DD" style="width: 100%" />
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
<a-form-model-item label="启用日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="activeDate">
|
|
<a-form-model-item label="启用日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="activeDate">
|
|
- <j-date placeholder="请选择启用日期" v-model="model.activeDate" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
|
|
|
|
|
|
+ <j-date placeholder="请选择启用日期" v-model="model.activeDate" :show-time="true" date-format="YYYY-MM-DD" style="width: 100%" />
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
@@ -129,6 +129,7 @@
|
|
<script>
|
|
<script>
|
|
|
|
|
|
import { httpAction, getAction } from '@/api/manage'
|
|
import { httpAction, getAction } from '@/api/manage'
|
|
|
|
+ import { duplicateCheck } from '@/api/api'
|
|
import { validateDuplicateValue } from '@/utils/util'
|
|
import { validateDuplicateValue } from '@/utils/util'
|
|
import EquipmentTreeModal from '@/views/module_tpm/equipmentTree/modules/EquipmentTreeModal'
|
|
import EquipmentTreeModal from '@/views/module_tpm/equipmentTree/modules/EquipmentTreeModal'
|
|
|
|
|
|
@@ -167,6 +168,9 @@
|
|
equipmentname: [
|
|
equipmentname: [
|
|
{ required: true, message: '请输入设备名称!'},
|
|
{ required: true, message: '请输入设备名称!'},
|
|
],
|
|
],
|
|
|
|
+ equipmentcode: [
|
|
|
|
+ { validator: this.validateTemplateCode}
|
|
|
|
+ ],
|
|
equipmenttreeid: [
|
|
equipmenttreeid: [
|
|
{ required: true, message: '请选择设备分类!'},
|
|
{ required: true, message: '请选择设备分类!'},
|
|
],
|
|
],
|
|
@@ -201,36 +205,6 @@
|
|
this.getTpmTreeData()
|
|
this.getTpmTreeData()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- getTpmTreeData(){
|
|
|
|
- getAction(`/tpmEquipmentTree/tpmEquipmentTree/listtypetree`).then(res=>{
|
|
|
|
- // console.log(111,res)
|
|
|
|
- if (res.success) {
|
|
|
|
- // 防止res.result对tpmListData造成地址赋值的问题
|
|
|
|
- let treeDataZanCun = JSON.parse(JSON.stringify(res.result))
|
|
|
|
- let treeDatashuju = treeDataZanCun.map((res) => {
|
|
|
|
- return {
|
|
|
|
- id: res.id,
|
|
|
|
- parentid: res.parentid,
|
|
|
|
- value: res.id,
|
|
|
|
- title: res.name
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- this.treeData = this.handleTree(treeDatashuju, "id", "parentid")
|
|
|
|
- console.log(treeDatashuju)
|
|
|
|
- } else {
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- handleAdd: function () {
|
|
|
|
- this.$refs.modalForm.add();
|
|
|
|
- this.$refs.modalForm.title = "新增设备分类";
|
|
|
|
- this.$refs.modalForm.disableSubmit = false;
|
|
|
|
- },
|
|
|
|
- modalFormOk2(){
|
|
|
|
- console.log(7777)
|
|
|
|
- this.getTpmTreeData()
|
|
|
|
- },
|
|
|
|
add () {
|
|
add () {
|
|
this.edit(this.modelDefault);
|
|
this.edit(this.modelDefault);
|
|
},
|
|
},
|