Commit 6e20bb44 authored by zhangyichen's avatar zhangyichen

代码提交

parent 94f1fb26
...@@ -315,7 +315,7 @@ ...@@ -315,7 +315,7 @@
> >
<el-form :inline="true" :model="searchForm" class="demo-form-inline"> <el-form :inline="true" :model="searchForm" class="demo-form-inline">
<el-form-item label="角色名称"> <el-form-item label="角色名称">
<el-input v-model.trim="searchForm.roleName" clearable placeholder="请输入角色名称" :maxlength="30" /> <el-input v-model.trim="searchForm.roleName" clearable placeholder="请输入角色名称" :maxlength="10" />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="getPeopleByuserName">查询</el-button> <el-button type="primary" @click="getPeopleByuserName">查询</el-button>
......
...@@ -927,19 +927,19 @@ export default { ...@@ -927,19 +927,19 @@ export default {
}, },
beforeUpdate(file) { beforeUpdate(file) {
const fileType = '.' + file.name.split('.')[file.name.split('.').length - 1] const fileType = '.' + file.name.split('.')[file.name.split('.').length - 1]
const accept = ['.txt', '.TXT'] const accept = ['.hex', '.HEX']
const isJPG = accept.includes(fileType) const isHex = accept.includes(fileType.toLowerCase())
const isLt2M = file.size / 1024 / 1024 < 2 const isLt2M = file.size / 1024 / 1024 < 1
const fileNameList = this.fileList.map(item => { return item.name.substring(0, item.name.lastIndexOf('.')) }) const fileNameList = this.fileList.map(item => { return item.name.substring(0, item.name.lastIndexOf('.')) })
if (fileNameList.indexOf(file.name.substring(0, file.name.lastIndexOf('.'))) !== -1) { if (fileNameList.indexOf(file.name.substring(0, file.name.lastIndexOf('.'))) !== -1) {
this.$message.error(`不能上传相同名称文件`) this.$message.error(`不能上传相同名称文件`)
return false return false
} }
if (!isLt2M) { if (!isLt2M) {
this.$message.error('仅支持上传:2MB以内的文件') this.$message.error('仅支持上传:1MB以内的文件')
return false return false
} }
return isLt2M && fileNameList.indexOf(file.name) === -1 return isLt2M && fileNameList.indexOf(file.name) && isHex === -1
}, },
/* 上传文件所需求 */ /* 上传文件所需求 */
handlePreview(file) { handlePreview(file) {
......
...@@ -647,8 +647,13 @@ export default { ...@@ -647,8 +647,13 @@ export default {
} else if (this.htmlType === '2') { } else if (this.htmlType === '2') {
nltordermodelDetail(params).then(res => { nltordermodelDetail(params).then(res => {
this.form.modelType = res.data.modelType this.form.modelType = res.data.modelType
this.form.modelCode = res.data.materCode this.form.modelCode = []
this.form.materId = res.data.materId this.form.materId = []
res.data.materList.forEach(item => {
this.form.modelCode.push(item.materCode)
this.form.materId.push(item.businessId)
})
this.form.modelCodeList = this.form.modelCode.join(',')
this.positionList = this.initTableData(res.data.stationList) this.positionList = this.initTableData(res.data.stationList)
}) })
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment