页面路径跳转
This commit is contained in:
parent
8deab5d92c
commit
5927f460d9
|
|
@ -332,7 +332,7 @@ export const dynamicRoutes = [
|
|||
]
|
||||
},
|
||||
{
|
||||
path: '/tool',
|
||||
path: '/tools',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['enterpriseLibrary:tool:list'],
|
||||
|
|
@ -340,7 +340,7 @@ export const dynamicRoutes = [
|
|||
{
|
||||
path: 'index',
|
||||
component: () => import('@/views/enterpriseLibrary/tool/index'),
|
||||
name: 'Tool',
|
||||
name: 'Tools',
|
||||
meta: { title: '工器具库', activeMenu: '/enterpriseLibrary/enterprise', noCache: true }
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -4,9 +4,15 @@
|
|||
:closeOnClickModal="false" @close="handleClose" :append-to-body="true">
|
||||
<div>
|
||||
<el-form :model="form" :rules="rules" ref="ruleForm" label-width="110px">
|
||||
<el-form-item label="项目名称" prop="toolName">
|
||||
<el-input class="form-item" v-model="form.toolName" clearable show-word-limit placeholder="请输入项目名称"
|
||||
maxlength="64"></el-input>
|
||||
<el-form-item label="选择模板" prop="templateId">
|
||||
<el-select v-model="form.templateId" placeholder="请选择模板" class="form-item">
|
||||
<el-option v-for="item in modelList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="文件上传" prop="fileList">
|
||||
<UploadMoreFile :fileList="form.fileList" @file-change="handleFileChange" @del-file="handleDelFile"
|
||||
type="analysis_database" :uploadType="uploadType" :maxFileTips="maxFileTips" :disabled="disabled"
|
||||
:fileUploadRule="fileUploadRule" :limitUploadNum="limitUploadNum" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
|
@ -19,21 +25,24 @@
|
|||
</template>
|
||||
<script>
|
||||
import _ from 'lodash'
|
||||
import UploadFile from '@/views/common/UploadFile.vue'
|
||||
import FileOrImageDisplay from '@/views/common/FileOrImageDisplay.vue';
|
||||
import UploadMoreFile from '@/views/common/UploadMoreFile.vue';
|
||||
// 默认参数
|
||||
const defaultParams = {
|
||||
fileUploadRule: {
|
||||
fileUploadType: 'tools',
|
||||
fileUploadType: 'analysis_database',
|
||||
fields_json: '',
|
||||
suffix: 'tools_database'
|
||||
suffix: 'analysis_database'
|
||||
},
|
||||
uploadType: 'pdf、doc、docx',
|
||||
maxFileTips: '500MB',
|
||||
limitUploadNum: 5,
|
||||
disabled: false,
|
||||
};
|
||||
|
||||
export default {
|
||||
name: "AnalysisForm",
|
||||
components: {
|
||||
UploadFile,
|
||||
FileOrImageDisplay
|
||||
UploadMoreFile,
|
||||
},
|
||||
props: ["width", "rowData", "title", "isAdd"],
|
||||
data() {
|
||||
|
|
@ -41,14 +50,18 @@ export default {
|
|||
lDialog: this.width > 500 ? "w700" : "w500",
|
||||
dialogVisible: true,
|
||||
defaultParams,
|
||||
modelList:[
|
||||
{id:1,name:'南网工程类模板'},
|
||||
{id:2,name:'南网服务类模板'},
|
||||
],
|
||||
form: {
|
||||
id: null,
|
||||
toolName: '',
|
||||
templateId: null,
|
||||
|
||||
},
|
||||
rules: {
|
||||
toolName: [
|
||||
{ required: true, message: '工器具名称不能为空', trigger: 'blur' }
|
||||
templateId: [
|
||||
{ required: true, message: '请选择模板', trigger: 'change' }
|
||||
],
|
||||
|
||||
},
|
||||
|
|
|
|||
|
|
@ -75,8 +75,8 @@ export default {
|
|||
title: '工器具库',
|
||||
description: '工器具库主要用于登记工器具资料信息, 统一管理工器具清单等',
|
||||
icon: enterpriseKnowledgeIcon,
|
||||
path: '/enterpriseLibrary/enterprise/tools',
|
||||
name: 'Tool'
|
||||
path: '/enterpriseLibrary/enterprise/tool',
|
||||
name: 'Tools'
|
||||
},
|
||||
{
|
||||
type: 'financial',
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<img src="@/assets/enterpriseLibrary/basic-info.png" alt="文件上传">
|
||||
<span>文件上传</span>
|
||||
</div>
|
||||
<el-form :model="form" :rules="rules" ref="basicInfoForm" label-width="110px" label-position="top">
|
||||
<el-form :model="form" :rules="rules" ref="fileInfoForm" label-width="110px" label-position="top">
|
||||
<!-- 文件上传 -->
|
||||
<el-form-item label="文件上传" prop="fileList">
|
||||
<UploadMoreFile :fileList="form.fileList" @file-change="handleFileChange" @del-file="handleDelFile"
|
||||
|
|
@ -78,7 +78,7 @@ export default {
|
|||
// 校验规则
|
||||
validate() {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$refs.basicInfoForm.validate((valid) => {
|
||||
this.$refs.fileInfoForm.validate((valid) => {
|
||||
if (valid) {
|
||||
resolve(this.form) // 校验成功返回表单数据
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ import { downloadFileWithLoading } from '@/utils/download'
|
|||
import ImportExcelDialog from '@/views/common/ImportExcelDialog'
|
||||
const IMPORT_URL = '/smartBid/mainDatabase/tool/importData';
|
||||
export default {
|
||||
name: 'Tool',
|
||||
name: 'Tools',
|
||||
components: {
|
||||
TableModel,
|
||||
ToolForm,
|
||||
|
|
|
|||
Loading…
Reference in New Issue