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