Commit ccf3444c authored by baiyanhao's avatar baiyanhao
parents 0de815e1 45423423
const Mock = require('mockjs')
const List = []
const count = 100
const baseContent = '<p>I am testing data, I am testing data.</p><p><img src="https://wpimg.wallstcn.com/4c69009c-0fd4-4153-b112-6cb53d1cf943"></p>'
const image_uri = 'https://wpimg.wallstcn.com/e4558086-631c-425c-9430-56ffb46e70b3'
for (let i = 0; i < count; i++) {
List.push(Mock.mock({
id: '@increment',
timestamp: +Mock.Random.date('T'),
author: '@first',
reviewer: '@first',
title: '@title(5, 10)',
content_short: 'mock data',
content: baseContent,
forecast: '@float(0, 100, 2, 2)',
importance: '@integer(1, 3)',
'type|1': ['CN', 'US', 'JP', 'EU'],
'status|1': ['published', 'draft'],
display_time: '@datetime',
comment_disabled: true,
pageviews: '@integer(300, 5000)',
image_uri,
platforms: ['a-platform']
}))
}
module.exports = [
{
url: '/article/list',
type: 'get',
response: config => {
const { importance, type, title, page = 1, limit = 20, sort } = config.query
let mockList = List.filter(item => {
if (importance && item.importance !== +importance) return false
if (type && item.type !== type) return false
if (title && item.title.indexOf(title) < 0) return false
return true
})
if (sort === '-id') {
mockList = mockList.reverse()
}
const pageList = mockList.filter((item, index) => index < limit * page && index >= limit * (page - 1))
return {
code: 20000,
data: {
total: mockList.length,
items: pageList
}
}
}
},
{
url: '/article/detail',
type: 'get',
response: config => {
const { id } = config.query
for (const article of List) {
if (article.id === +id) {
return {
code: 20000,
data: article
}
}
}
}
},
{
url: '/article/pv',
type: 'get',
response: _ => {
return {
code: 20000,
data: {
pvData: [
{ key: 'PC', pv: 1024 },
{ key: 'mobile', pv: 1024 },
{ key: 'ios', pv: 1024 },
{ key: 'android', pv: 1024 }
]
}
}
}
},
{
url: '/article/create',
type: 'post',
response: _ => {
return {
code: 20000,
data: 'success'
}
}
},
{
url: '/article/update',
type: 'post',
response: _ => {
return {
code: 20000,
data: 'success'
}
}
}
]
const Mock = require('mockjs')
const { param2Obj } = require('./utils')
const task = require('./task')
const user = require('./user')
const role = require('./role')
const article = require('./article')
const search = require('./remote-search')
const setting = require('./setting')
const review = require('./review')
const mocks = [...task, ...setting, ...review]
// for front mock
// please use it cautiously, it will redefine XMLHttpRequest,
// which will cause many of your third-party libraries to be invalidated(like progress event).
function mockXHR() {
// mock patch
// https://github.com/nuysoft/Mock/issues/300
Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send
Mock.XHR.prototype.send = function () {
if (this.custom.xhr) {
this.custom.xhr.withCredentials = this.withCredentials || false
if (this.responseType) {
this.custom.xhr.responseType = this.responseType
}
}
this.proxy_send(...arguments)
}
function XHR2ExpressReqWrap(respond) {
return function (options) {
let result = null
if (respond instanceof Function) {
const { body, type, url } = options
// https://expressjs.com/en/4x/api.html#req
result = respond({
method: type,
body: JSON.parse(body),
query: param2Obj(url)
})
} else {
result = respond
}
return Mock.mock(result)
}
}
for (const i of mocks) {
Mock.mock(
new RegExp(i.url),
i.type || 'get',
XHR2ExpressReqWrap(i.response)
)
}
}
module.exports = {
mocks,
mockXHR
}
const chokidar = require('chokidar')
const bodyParser = require('body-parser')
const chalk = require('chalk')
const path = require('path')
const Mock = require('mockjs')
const mockDir = path.join(process.cwd(), 'mock')
function registerRoutes(app) {
let mockLastIndex
const { mocks } = require('./index.js')
const mocksForServer = mocks.map(route => {
return responseFake(route.url, route.type, route.response)
})
for (const mock of mocksForServer) {
app[mock.type](mock.url, mock.response)
mockLastIndex = app._router.stack.length
}
const mockRoutesLength = Object.keys(mocksForServer).length
return {
mockRoutesLength: mockRoutesLength,
mockStartIndex: mockLastIndex - mockRoutesLength
}
}
function unregisterRoutes() {
Object.keys(require.cache).forEach(i => {
if (i.includes(mockDir)) {
delete require.cache[require.resolve(i)]
}
})
}
// for mock server
const responseFake = (url, type, respond) => {
console.log(process.env.VUE_APP_BASE_API);
console.log(url);
return {
url: new RegExp(`${process.env.VUE_APP_BASE_API}${url}`),
type: type || 'get',
response(req, res) {
console.log('request invoke:' + req.path)
res.json(Mock.mock(respond instanceof Function ? respond(req, res) : respond))
}
}
}
module.exports = app => {
// parse app.body
// https://expressjs.com/en/4x/api.html#req.body
app.use(bodyParser.json())
app.use(bodyParser.urlencoded({
extended: true
}))
const mockRoutes = registerRoutes(app)
var mockRoutesLength = mockRoutes.mockRoutesLength
var mockStartIndex = mockRoutes.mockStartIndex
// watch files, hot reload mock server
chokidar.watch(mockDir, {
ignored: /mock-server/,
ignoreInitial: true
}).on('all', (event, path) => {
if (event === 'change' || event === 'add') {
try {
// remove mock routes stack
app._router.stack.splice(mockStartIndex, mockRoutesLength)
// clear routes cache
unregisterRoutes()
const mockRoutes = registerRoutes(app)
mockRoutesLength = mockRoutes.mockRoutesLength
mockStartIndex = mockRoutes.mockStartIndex
console.log(chalk.magentaBright(`\n > Mock Server hot reload success! changed ${path}`))
} catch (error) {
console.log(chalk.redBright(error))
}
}
})
}
const Mock = require('mockjs')
const NameList = []
const count = 100
for (let i = 0; i < count; i++) {
NameList.push(Mock.mock({
name: '@first'
}))
}
NameList.push({ name: 'mock-Pan' })
module.exports = [
// username search
{
url: '/search/user',
type: 'get',
response: config => {
const { name } = config.query
const mockNameList = NameList.filter(item => {
const lowerCaseName = item.name.toLowerCase()
return !(name && lowerCaseName.indexOf(name.toLowerCase()) < 0)
})
return {
code: 20000,
data: { items: mockNameList }
}
}
},
// transaction list
{
url: '/transaction/list',
type: 'get',
response: _ => {
return {
code: 20000,
data: {
total: 20,
'items|20': [{
order_no: '@guid()',
timestamp: +Mock.Random.date('T'),
username: '@name()',
price: '@float(1000, 15000, 0, 2)',
'status|1': ['success', 'pending']
}]
}
}
}
}
]
module.exports = [
{
url: '/wait-list',
type: 'get',
response: config => {
temp = [
{
reviewNo: '20231209001',
reviewType: '新增场景',
type: 1,
sceneCategory: '车型审查',
sceneContent: '制度发布会音频文件',
reviewer: '赵晓东,盖献康,刘佳',
waitingTime: '1天12小时',
createTime: '2023-11-24 10:14:08'
},
{
reviewNo: '20231209002',
reviewType: '修改场景',
type: 2,
sceneCategory: '体系审查',
sceneContent: 'TBOX-蜂窝以太网接口',
reviewer: '赵晓东,尚志伟,闫嘉旭',
waitingTime: '1天13小时',
createTime: '2023-11-22 13:56:34'
},
{
reviewNo: '20231209003',
reviewType: '删除场景',
type: 3,
sceneCategory: '体系审查',
sceneContent: 'TBOX-车辆定位系统',
reviewer: '周朋,李宇涵,李亚涛',
waitingTime: '2天1小时',
createTime: '2023-11-13 17:26:54'
},
{
reviewNo: '20231209004',
reviewType: '修改场景',
type: 2,
sceneCategory: '车型审查',
sceneContent: '发布会车辆制动相关样品',
reviewer: '张鹏伟,李旭,张鑫',
waitingTime: '2天1小时',
createTime: '2023-11-12 14:43:22'
},
{
reviewNo: '20231209005',
reviewType: '删除场景',
type: 3,
sceneCategory: '车型审查',
sceneContent: '保障智能网联汽车时空数据存储文件',
reviewer: '孟同伟,孙钊涵,邵亮',
waitingTime: '3天3小时',
createTime: '2023-11-06 12:45:23'
},
{
reviewNo: '20231209001',
reviewType: '删除场景',
sceneCategory: '车型审查',
sceneContent: '智能网联汽车的访问控制-加密操作硬件',
reviewer: '李旭,孟同伟,张鑫',
waitingTime: '5天5小时',
createTime: '2023-11-02 08:12:56'
}
]
return {
rows: temp,
code: 200,
total: 10
}
}
}
]
const Mock = require('mockjs')
const { deepClone } = require('../utils')
const { asyncRoutes, constantRoutes } = require('./routes.js')
const routes = deepClone([...constantRoutes, ...asyncRoutes])
const roles = [
{
key: 'admin',
name: 'admin',
description: 'Super Administrator. Have access to view all pages.',
routes: routes
},
{
key: 'editor',
name: 'editor',
description: 'Normal Editor. Can see all pages except permission page',
routes: routes.filter(i => i.path !== '/permission')// just a mock
},
{
key: 'visitor',
name: 'visitor',
description: 'Just a visitor. Can only see the home page and the document page',
routes: [{
path: '',
redirect: 'dashboard',
children: [
{
path: 'dashboard',
name: 'Dashboard',
meta: { title: 'dashboard', icon: 'dashboard' }
}
]
}]
}
]
module.exports = [
// mock get all routes form server
{
url: '/routes',
type: 'get',
response: _ => {
return {
code: 20000,
data: routes
}
}
},
// mock get all roles form server
{
url: '/roles',
type: 'get',
response: _ => {
return {
code: 20000,
data: roles
}
}
},
// add role
{
url: '/role',
type: 'post',
response: {
code: 20000,
data: {
key: Mock.mock('@integer(300, 5000)')
}
}
},
// update role
{
url: '/role/[A-Za-z0-9]',
type: 'put',
response: {
code: 20000,
data: {
status: 'success'
}
}
},
// delete role
{
url: '/role/[A-Za-z0-9]',
type: 'delete',
response: {
code: 20000,
data: {
status: 'success'
}
}
}
]
This diff is collapsed.
/**
* 参考https://github.com/nuysoft/Mock/wiki/Syntax-Specification
* */
module.exports = [
// get tasklist
{
url: '/tasklist',
type: 'get',
response: config => {
const temp = [
{
startTime: '--',
missionNo: 'xxxxxxxxx',
tit: '一汽丰田体系审查',
owener: '@cname',
'costTime': 0,
'progress': 0
},
{
startTime: '2020-12-01 10:30 ',
missionNo: 'xxxxxxxxx',
tit: '一汽丰田体系审查',
owener: '@cname',
'costTime': 3,
'progress': 80
},
{
startTime: '2020-12-01 10:30',
missionNo: 'xxxxxxxxx',
tit: '一汽丰田体系审查',
owener: '@cname',
'costTime': 12,
'progress': 90
}
]
return {
rows: temp,
code: 200,
total: 10
}
}
},
{
url: '/finishTasklist',
type: 'get',
response: config => {
const temp = [
{
startTime: '2020-12-01 10:30 ',
missionNo: 'xxxxxxxxx',
tit: '一汽丰田体系审查',
owener: '@cname',
'costTime': 3,
'progress': 80
},
{
startTime: '2020-12-01 10:30',
missionNo: 'xxxxxxxxx',
tit: '一汽丰田体系审查',
owener: '@cname',
'costTime': 12,
'progress': 90
}
]
return {
rows: temp,
code: 200,
total: 10
}
}
},
// get taskCarType
{
url: '/taskCarType',
type: 'get',
response: config => {
const temp = [
{
startTime: '----',
missionNo: 'xxxx',
tit: '广汽丰田车型测评1210',
owener: '@cname',
'costTimeOne': 0,
'costTimeTwo': 0,
'progressOne': 0,
'progressTwo': 0,
docTypeOne:1,
docTypeTwo:2,
},
{
startTime: ' 2020-12-01 10:30',
missionNo: 'xxxx',
tit: '广汽丰田车型测评1210',
owener: '@cname',
'costTimeOne': 12,
'costTimeTwo': 0,
'progressOne': 80,
'progressTwo': 0,
docTypeOne:3,
docTypeTwo:2,
},
{
startTime: ' 2020-12-01 10:30',
missionNo: 'xxxx',
tit: '广汽丰田车型测评1210',
owener: '@cname',
'costTimeOne': 24,
'costTimeTwo': 3,
'progressOne': 90,
'progressTwo': 30,
docTypeOne:4,
docTypeTwo:2,
},
{
startTime: ' 2020-12-01 10:30',
missionNo: 'xxxx',
tit: '广汽丰田车型测评1210',
owener: '@cname',
'costTimeOne': 25,
'costTimeTwo': 1,
'progressOne': 100,
'progressTwo': 30,
docTypeOne:5,
docTypeTwo:6,
},
{
startTime: ' 2020-12-01 10:30',
missionNo: 'xxxx',
tit: '广汽丰田车型测评1210',
owener: '@cname',
'costTimeOne': 49,
'costTimeTwo': 25,
'progressOne': 100,
'progressTwo': 90,
docTypeOne:5,
docTypeTwo:7,
},
{
startTime: ' 2020-12-01 10:30',
missionNo: 'xxxx',
tit: '广汽丰田车型测评1210',
owener: '@cname',
'costTimeOne': 49,
// 'costTimeTwo': 25,
'progressOne': 100,
// 'progressTwo': 90,
docTypeOne:1,
// docTypeTwo:1,
}
]
return {
rows: temp,
code: 200,
total: 10
}
}
},
{
url: '/company/list',
type: 'get',
response: config => {
const temp = []
for (let i = 0; i < 10; i++) {
temp.push({
companyName: 'xxxxx',
address: 'xxxxx',
mailCode: 'xxxxx',
companyPeople: 'xxxxx',
phoneNum: 'xxxxx',
createTime: '2020-11-25 23:26:08'
})
}
return {
rows: temp,
code: 200,
total: 10
}
}
}
]
const tokens = {
admin: 'admin-token',
editor: 'editor-token'
}
const users = {
'admin-token': {
user: {
avatar:''
},
roles: ['editor'],
},
'editor-token': {
roles: ['editor'],
introduction: 'I am an editor',
avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif',
name: 'Normal Editor'
}
}
module.exports = [
// user login
{
url: '/login',
type: 'post',
response: config => {
const { username } = config.body
const token = tokens[username]
// mock error
if (!token) {
return {
code: 60204,
message: 'Account and password are incorrect.'
}
}
return {
code: 200,
token:tokens[username]
}
}
},
// get user info
{
url: '/getInfo\.*',
type: 'get',
response: config => {
const { token } = config.query
const info = users[token]
// mock error
if (!info) {
return {
code: 50008,
message: 'Login failed, unable to get user details.'
}
}
return {
code: 200,
data: info
}
}
},
// user logout
{
url: '/logout',
type: 'post',
response: _ => {
return {
code: 200,
data: 'success'
}
}
},
{
url: '/captchaImage',
type: 'get',
response: _ => {
return {
code: 200,
message: 'Login failed, unable to get user details.'
}
}
}
]
/**
* @param {string} url
* @returns {Object}
*/
function param2Obj(url) {
const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ')
if (!search) {
return {}
}
const obj = {}
const searchArr = search.split('&')
searchArr.forEach(v => {
const index = v.indexOf('=')
if (index !== -1) {
const name = v.substring(0, index)
const val = v.substring(index + 1, v.length)
obj[name] = val
}
})
return obj
}
/**
* This is just a simple version of deep copy
* Has a lot of edge cases bug
* If you want to use a perfect deep copy, use lodash's _.cloneDeep
* @param {Object} source
* @returns {Object}
*/
function deepClone(source) {
if (!source && typeof source !== 'object') {
throw new Error('error arguments', 'deepClone')
}
const targetObj = source.constructor === Array ? [] : {}
Object.keys(source).forEach(keys => {
if (source[keys] && typeof source[keys] === 'object') {
targetObj[keys] = deepClone(source[keys])
} else {
targetObj[keys] = source[keys]
}
})
return targetObj
}
module.exports = {
param2Obj,
deepClone
}
import request from '@/utils/request' import request from '@/utils/request'
import { method } from 'lodash'
//获取标准库分页 //获取标准库分页
export function getStandardList(data) { export function getStandardList(data) {
...@@ -16,3 +17,10 @@ export function getReviewStandardList(data){ ...@@ -16,3 +17,10 @@ export function getReviewStandardList(data){
data data
}) })
} }
export function getStandardListNew(){
return request({
url:'/standard/getStandardListNew',
method: 'post'
})
}
\ No newline at end of file
...@@ -313,7 +313,7 @@ ...@@ -313,7 +313,7 @@
align-items: center; align-items: center;
justify-content: flex-start; justify-content: flex-start;
height: 8rem; height: 8rem;
// margin-bottom: 2em;
&-img { &-img {
width: 100px; width: 100px;
height: 100px; height: 100px;
......
...@@ -27,11 +27,12 @@ ...@@ -27,11 +27,12 @@
</div> </div>
<el-upload <el-upload
class="upload-demo" class="upload-demo"
ref="fileUpload" ref="fileUpload"
:action="uploadImgUrl" :action="uploadImgUrl"
:on-preview="handlePreview" :on-preview="handlePreview"
v-model="model.file" v-model="model.file"
:on-remove="handleRemove" :on-remove="handleRemove"
accept=".pdf"
:before-remove="beforeRemove" :before-remove="beforeRemove"
:show-file-list="false" :show-file-list="false"
:limit="1" :limit="1"
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
:limit="1" :limit="1"
ref="fileUpload" ref="fileUpload"
:on-success="handleSuccess" :on-success="handleSuccess"
accept=".pdf"
:on-exceed="handleExceed" :on-exceed="handleExceed"
:headers="headers" :headers="headers"
> >
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
:before-remove="beforeRemove" :before-remove="beforeRemove"
:show-file-list="false" :show-file-list="false"
:limit="1" :limit="1"
accept=".pdf"
:on-success="handleSuccess" :on-success="handleSuccess"
:on-exceed="handleExceed" :on-exceed="handleExceed"
:headers="headers" :headers="headers"
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
</el-radio-group> </el-radio-group>
<el-upload <el-upload
class="upload-demo" class="upload-demo"
ref="fileUpload" ref="fileUpload"
:action="uploadImgUrl" :action="uploadImgUrl"
:on-preview="handlePreview" :on-preview="handlePreview"
v-model="model.file" v-model="model.file"
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
:before-remove="beforeRemove" :before-remove="beforeRemove"
:show-file-list="false" :show-file-list="false"
:limit="1" :limit="1"
accept=".pdf"
:on-success="handleSuccess" :on-success="handleSuccess"
:on-exceed="handleExceed" :on-exceed="handleExceed"
:headers="headers" :headers="headers"
...@@ -22,7 +23,7 @@ ...@@ -22,7 +23,7 @@
<el-button size="small" :disabled="status" type="primary" <el-button size="small" :disabled="status" type="primary"
>上传文件</el-button >上传文件</el-button
> >
<div slot="tip" class="el-upload__tip"> <div slot="tip" class="el-upload__tip">
<div v-if="model.path"> <div v-if="model.path">
<el-link :href="model.path">{{ model.name }}</el-link> <el-link :href="model.path">{{ model.name }}</el-link>
</div> </div>
...@@ -98,7 +99,7 @@ export default { ...@@ -98,7 +99,7 @@ export default {
value: '', value: '',
file: '', file: '',
path: '', path: '',
name:'' name: ''
} }
}, },
setDefaultValue(val) { setDefaultValue(val) {
......
This diff is collapsed.
import standard from "./modules/standard"
const getters = { const getters = {
sidebar: state => state.app.sidebar, sidebar: state => state.app.sidebar,
size: state => state.app.size, size: state => state.app.size,
...@@ -21,6 +23,8 @@ const getters = { ...@@ -21,6 +23,8 @@ const getters = {
standard_type: state => state.standard.standard_type, standard_type: state => state.standard.standard_type,
standard_chapter: state => state.standard.standard_chapter, standard_chapter: state => state.standard.standard_chapter,
standard_name: state => state.standard.standard_name, standard_name: state => state.standard.standard_name,
standardObj: state=>state.standard.standardObj,
initStandard: state=>state.standard.initStandard,
standardList: state => state.standard.standardList, standardList: state => state.standard.standardList,
testScenarioList: state => state.testScenario.testScenarioList, testScenarioList: state => state.testScenario.testScenarioList,
dept: state => state.user.dept dept: state => state.user.dept
......
...@@ -6,6 +6,18 @@ const standard = { ...@@ -6,6 +6,18 @@ const standard = {
standard_name: '', standard_name: '',
standard_type:'', standard_type:'',
standard_chapter:'', standard_chapter:'',
standardObj:{
id:'',
name: '',
type:'',
chapter:'',
standardNo: '',
text:''
},
initStandard:{
id:'',
type:'',
},
standardList: [] standardList: []
}, },
...@@ -24,6 +36,12 @@ const standard = { ...@@ -24,6 +36,12 @@ const standard = {
}, },
SET_STANDARDCHAPTER: (state,chapter) => { SET_STANDARDCHAPTER: (state,chapter) => {
state.standard_chapter = chapter state.standard_chapter = chapter
},
SET_STANDARD_OBJ: (state,standardObj)=>{
state.standardObj = standardObj
},
SET_INITSTANDARD: (state,initStandard)=>{
state.initStandard = initStandard
} }
}, },
...@@ -34,6 +52,12 @@ const standard = { ...@@ -34,6 +52,12 @@ const standard = {
commit('SET_STANDARDTYPE', standard.type) commit('SET_STANDARDTYPE', standard.type)
commit('SET_STANDARDCHAPTER', standard.chapter) commit('SET_STANDARDCHAPTER', standard.chapter)
}, },
setStandardObj({commit},standardObj){
commit('SET_STANDARD_OBJ',standardObj)
},
setInitStandard({commit},initStandard){
commit('SET_INITSTANDARD',initStandard)
},
setStandardList({ commit }, name) { setStandardList({ commit }, name) {
getStandardList({ getStandardList({
keyWord: name ? name : '', keyWord: name ? name : '',
...@@ -46,7 +70,7 @@ const standard = { ...@@ -46,7 +70,7 @@ const standard = {
} }
commit( commit(
'SET_STANDARD_LIST', 'SET_STANDARD_LIST',
res.rows.filter(i => i.standardStatus === 'INFORCE') res.rows.filter(i => (i.standardStatus === 'INFORCE'||i.standardStatus === 'SOON'))
) )
} }
}) })
......
...@@ -205,7 +205,7 @@ export default { ...@@ -205,7 +205,7 @@ export default {
this.bottom = this.bottom.concat( this.bottom = this.bottom.concat(
{ {
title: '检测方案', title: '检测方案',
link: '/plan/customized', link: '/plan/list',
img: require('@/assets/images/home/bottom5.png') img: require('@/assets/images/home/bottom5.png')
}, },
{ {
...@@ -245,7 +245,7 @@ export default { ...@@ -245,7 +245,7 @@ export default {
}, },
{ {
title: '权限管理', title: '权限管理',
link: '/system/role', link: '/system/dept',
img: require('@/assets/images/home/bottom6.png') img: require('@/assets/images/home/bottom6.png')
} }
) )
......
...@@ -179,7 +179,7 @@ export default { ...@@ -179,7 +179,7 @@ export default {
this.$store this.$store
.dispatch('Login', this.loginForm) .dispatch('Login', this.loginForm)
.then(() => { .then(() => {
this.$router.push({ path: this.redirect || '/' }).catch(() => {}) this.$router.push({ path: '/' }).catch(() => {})
}) })
.catch(() => { .catch(() => {
this.loading = false this.loading = false
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
v-for="item in standardList" v-for="item in standardList"
:key="item.id" :key="item.id"
:label="item.name" :label="item.name"
:value="Number(item.id)" :value="item.id"
> >
</el-option> </el-option>
</el-select> </el-select>
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
v-for="item in componentSelect" v-for="item in componentSelect"
:key="item.id" :key="item.id"
:label="item.enterpriseName" :label="item.enterpriseName"
:value="Number(item.id)" :value="item.id"
> >
</el-option> </el-option>
</el-select> </el-select>
...@@ -162,7 +162,7 @@ export default { ...@@ -162,7 +162,7 @@ export default {
} else { } else {
this.handleLoad() this.handleLoad()
this.form = { this.form = {
inspectionStandardId: 1, inspectionStandardId:"1",
inspectionItem: ['trfis'] inspectionItem: ['trfis']
} }
} }
...@@ -185,17 +185,15 @@ export default { ...@@ -185,17 +185,15 @@ export default {
}) })
}, },
async handleConfirm() { async handleConfirm() {
this.$refs.form.validate(async valid => { this.$refs.form.validate(async valid => {
if (valid) { if (valid) {
let form = JSON.parse(JSON.stringify(this.form)) let form = JSON.parse(JSON.stringify(this.form))
if (form.inspectionItem.indexOf('trfis') !== -1) {
if(form.inspectionItem.indexOf('trfis') !== -1){ const res = await this.$refs.check.getValidateVaule()
const res = await this.$refs.check.getValidateVaule() form.specifyPlan = JSON.stringify(res.record)
form.specifyPlan = JSON.stringify(res.record) form.useCaseNo = res.codes
form.useCaseNo = res.codes }
}
form.inspectionItem = form.inspectionItem.join(',') form.inspectionItem = form.inspectionItem.join(',')
add(form).then(res => { add(form).then(res => {
if (res.code == 200) { if (res.code == 200) {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
v-for="item in componentSelect" v-for="item in componentSelect"
:key="item.id" :key="item.id"
:label="item.enterpriseName" :label="item.enterpriseName"
:value="item.id" :value="String(item.id)"
> >
</el-option> </el-option>
</el-select> </el-select>
...@@ -30,10 +30,15 @@ ...@@ -30,10 +30,15 @@
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
size="mini" size="mini"
:disabled="buttonDisabled"
@click="handleQuery" @click="handleQuery"
>查询</el-button >查询</el-button
> >
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery" <el-button
icon="el-icon-refresh"
size="mini"
:disabled="buttonDisabled"
@click="resetQuery"
>重置</el-button >重置</el-button
> >
</el-form-item> </el-form-item>
...@@ -90,7 +95,7 @@ ...@@ -90,7 +95,7 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="检测机构" label="检测机构"
prop="testOrganizationName" prop="deptName"
min-width="200" min-width="200"
align="left" align="left"
sortable sortable
...@@ -103,7 +108,7 @@ ...@@ -103,7 +108,7 @@
v-if="scope.row.fileUrl" v-if="scope.row.fileUrl"
>{{ scope.row.testResult }}</el-link >{{ scope.row.testResult }}</el-link
> >
<div v-else>___</div> <div v-else>--</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -115,33 +120,40 @@ ...@@ -115,33 +120,40 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<div class="button-bar"> <div class="button-bar">
<el-button type="text" @click="goDetail(scope.row.id)"> <page-button
查看方案</el-button icon="preview-open"
> title="查看"
<el-button type="text" @click="handleUpdate(scope.row.id)"> @click="goDetail(scope.row.id)"
修改</el-button ></page-button>
> <page-button
<el-button type="text" @click="handleDelete(scope.row.id)"> icon="edit"
删除</el-button title="修改"
> @click="handleUpdate(scope.row.id)"
<el-upload ></page-button>
ref="fileUpload" <page-button
:action="uploadFileUrl" icon="delete"
:limit="1" title="删除"
:on-success=" @click="handleDelete(scope.row.id)"
res => { ></page-button>
handleUploadSuccess(res, scope.row.id) <el-upload
} ref="fileUpload"
" :action="uploadFileUrl"
:show-file-list="false" :limit="1"
:headers="headers" :on-success="
class="upload-file-uploader" res => {
> handleUploadSuccess(res, scope.row.id)
<el-button type="text" v-if="!scope.row.fileUrl" }
>上传结果 "
</el-button> :show-file-list="false"
<el-button type="text" v-else> 重新上传 </el-button> :headers="headers"
</el-upload> class="upload-file-uploader"
>
<page-button
icon="upload-logs"
title="上传结果"
></page-button>
</el-upload>
</div>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -193,7 +205,8 @@ export default { ...@@ -193,7 +205,8 @@ export default {
attributes: { attributes: {
id: '' id: ''
} }
}) }),
buttonDisabled:false
} }
}, },
watch: { watch: {
...@@ -208,6 +221,9 @@ export default { ...@@ -208,6 +221,9 @@ export default {
this.queryParams.isAsc = 'desc' this.queryParams.isAsc = 'desc'
this.queryParams.orderByColumn = 'createTime' this.queryParams.orderByColumn = 'createTime'
this.view = this.$route.query.view this.view = this.$route.query.view
setTimeout(()=>{
this.buttonDisabled = false
},2000)
}, },
methods: { methods: {
download(url) { download(url) {
...@@ -232,7 +248,18 @@ export default { ...@@ -232,7 +248,18 @@ export default {
} }
}) })
}, },
handleQuery(){
this.buttonDisabled = true
setTimeout(()=>{
this.buttonDisabled = false
},2000)
this.loadData()
},
resetQuery() { resetQuery() {
this.buttonDisabled = true
setTimeout(()=>{
this.buttonDisabled = false
},2000)
this.queryParams = { this.queryParams = {
pageNum: this.queryParams.pageNum, pageNum: this.queryParams.pageNum,
pageSize: this.queryParams.pageSize, pageSize: this.queryParams.pageSize,
......
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
size="mini" size="mini"
:disabled="buttonDisabled"
@click="handleQuery" @click="handleQuery"
>查询 >查询
</el-button> </el-button>
...@@ -61,10 +62,12 @@ ...@@ -61,10 +62,12 @@
type="default" type="default"
icon="el-icon-refresh" icon="el-icon-refresh"
size="mini" size="mini"
:disabled="buttonDisabled"
@click="resetQuery" @click="resetQuery"
>重置 >重置
</el-button> </el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table <el-table
v-loading="loading" v-loading="loading"
...@@ -249,7 +252,8 @@ export default { ...@@ -249,7 +252,8 @@ export default {
}, },
reviewTypeList:[], reviewTypeList:[],
typeList:[], typeList:[],
reviewStatusList:[] reviewStatusList:[],
buttonDisabled:false
} }
}, },
watch: { watch: {
...@@ -365,9 +369,20 @@ export default { ...@@ -365,9 +369,20 @@ export default {
}, },
/* 搜索按钮*/ /* 搜索按钮*/
handleQuery() { handleQuery() {
this.buttonDisabled = true
setTimeout(()=>{
this.buttonDisabled = false
},2000)
this.queryParams.page = 1 this.queryParams.page = 1
this.getList() this.getList()
}, },
resetQuery(){
this.buttonDisabled = true
setTimeout(()=>{
this.buttonDisabled = false
},2000)
this.getList()
},
getList(){ getList(){
//打印参数 //打印参数
// console.log(this.queryParams) // console.log(this.queryParams)
......
...@@ -90,6 +90,7 @@ ...@@ -90,6 +90,7 @@
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
size="mini" size="mini"
:disabled="buttonDisabled"
@click="handleQuery" @click="handleQuery"
>查询</el-button >查询</el-button
> >
...@@ -97,6 +98,7 @@ ...@@ -97,6 +98,7 @@
type="default" type="default"
icon="el-icon-refresh" icon="el-icon-refresh"
size="mini" size="mini"
:disabled="buttonDisabled"
@click="resetQuery" @click="resetQuery"
>重置</el-button >重置</el-button
> >
...@@ -265,6 +267,7 @@ export default { ...@@ -265,6 +267,7 @@ export default {
reviewTypeList: [], reviewTypeList: [],
//显示 //显示
typeDisplay: '', typeDisplay: '',
buttonDisabled:false
} }
}, },
created() { created() {
...@@ -362,8 +365,20 @@ export default { ...@@ -362,8 +365,20 @@ export default {
console.error('Error fetching data:', error) console.error('Error fetching data:', error)
}) })
}, },
handleQuery(){
this.buttonDisabled = true
setTimeout(()=>{
this.buttonDisabled = false
},2000)
this.loadData()
},
// 列表-重置 // 列表-重置
resetQuery() { resetQuery() {
this.buttonDisabled = true
setTimeout(()=>{
this.buttonDisabled = false
},2000)
this.queryParams = { this.queryParams = {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
......
...@@ -148,7 +148,7 @@ export default { ...@@ -148,7 +148,7 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" >
.view-review { .view-review {
.view-review-header { .view-review-header {
display: flex; display: flex;
......
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
size="mini" size="mini"
:disabled="buttonDisabled"
@click="handleQuery" @click="handleQuery"
>查询 >查询
</el-button> </el-button>
...@@ -61,6 +62,7 @@ ...@@ -61,6 +62,7 @@
type="default" type="default"
icon="el-icon-refresh" icon="el-icon-refresh"
size="mini" size="mini"
:disabled="buttonDisabled"
@click="resetQuery" @click="resetQuery"
>重置 >重置
</el-button> </el-button>
...@@ -247,7 +249,8 @@ export default { ...@@ -247,7 +249,8 @@ export default {
}, },
// request:'', // request:'',
reviewTypeList: [], reviewTypeList: [],
typeList: [] typeList: [],
buttonDisabled:false
} }
}, },
watch: { watch: {
...@@ -382,8 +385,19 @@ export default { ...@@ -382,8 +385,19 @@ export default {
console.error('Error fetching data:', error) console.error('Error fetching data:', error)
}) })
}, },
handleQuery(){
this.buttonDisabled = true
setTimeout(()=>{
this.buttonDisabled = false
},2000)
this.loadData()
},
/* 重置*/ /* 重置*/
resetQuery() { resetQuery() {
this.buttonDisabled = true
setTimeout(()=>{
this.buttonDisabled = false
},2000)
this.queryParams = { this.queryParams = {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
...@@ -392,7 +406,7 @@ export default { ...@@ -392,7 +406,7 @@ export default {
keyword: '' keyword: ''
} }
this.handleQuery() this.loadData()
} }
/* 数据字典转换*/ /* 数据字典转换*/
} }
......
<template>
<page-standard>
<div class="form-signature-confirmation">
<div class="title-display">
<span class="title-i"></span>
<span class="title-content">车企基本信息</span>
</div>
</div>
<div class="task-box">
<div class="task-header">
<div class="task-item">
<span class="task-label">企业名称:</span>
<span class="task-content">
{{ model.enterpriseName }}
</span>
</div>
<div class="task-item">
<span class="task-label">企业地址:</span>
<span class="task-content">
{{ model.address }}
</span>
</div>
<div class="task-item">
<span class="task-label">企业邮编:</span>
<span class="task-content">
{{ model.postcode }}
</span>
</div>
<div class="task-item">
<span class="task-label">企业联系人:</span>
<span class="task-content"> {{ model.enterpriseContact }} </span>
</div>
</div>
</div>
<div class="form-signature-confirmation">
<div class="title-display">
<span class="title-i"></span>
<span class="title-content">车型检测方案</span>
</div>
</div>
<el-table border :scroll-x="'1500px'" :data="tableData">
<el-table-column type="index" width="55" label="序号" align="center">
</el-table-column>
<el-table-column
label="车辆VIN号"
show-overflow-tooltip
prop="carModel"
min-width="200"
align="left"
>
</el-table-column>
<el-table-column
label="检测机构"
show-overflow-tooltip
prop="deptName"
min-width="200"
align="left"
>
</el-table-column>
<el-table-column
label="检测方案生成时间"
show-overflow-tooltip
prop="createTime"
min-width="200"
align="left"
>
</el-table-column>
<el-table-column
label="操作"
align="center"
min-width="160"
fixed="right"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<div class="button-bar">
<el-button type="text" @click="goDetail(scope.row.id)">
查看方案详情</el-button
>
<el-button type="text" @click="goFile(scope.row.fileUrl)">
查看结果</el-button
>
</div>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:background="false"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="loadData"
>
</pagination>
<!--返回按钮-->
<div class="bottom-btn">
<footer-button type="default" icon="arrow-left" @click="$router.go(-1)">
返回
</footer-button>
</div>
</page-standard>
</template>
<script>
import page from '@/mixins/page'
export default {
mixins: [page],
data() {
return {
model: this.$modelDataSource({
url: '/system/enterprise',
dataKey: 'model',
attributes: {
address: '',
contactNumber: '',
enterpriseContact: '',
enterpriseName: '',
id: 0,
// params: '',
postcode: ''
// remark: ''
}
}),
listUrl: '/Plan/Record/page',
queryParams: {
inspectCarCompanyId: 1
},
showSearch: true,
tableData: []
}
},
methods: {
goDetail(id) {
this.$router.push({
path: '/plan/detail?id=' + id
})
},
goFile(url) {
if (url) {
location.href = process.env.VUE_APP_IMAGE_API + url
} else {
this.$message.error('暂无检测结果')
}
},
handleReturn() {
this.$router.back()
}
},
created() {
this.queryParams.inspectCarCompanyId = this.$route.query.id
this.model.fetch(this.$route.query.id)
}
}
</script>
<style lang="scss" scoped>
.right-content {
width: 100%;
display: flex;
justify-content: flex-end;
.go-back {
margin-left: 100px;
color: #00afff;
display: inline-block;
text-decoration: underline;
cursor: pointer;
}
}
</style>
...@@ -39,10 +39,15 @@ ...@@ -39,10 +39,15 @@
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
size="mini" size="mini"
:disabled="buttonDisabled"
@click="handleQuery" @click="handleQuery"
>查询</el-button >查询</el-button
> >
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery" <el-button
icon="el-icon-refresh"
size="mini"
:disabled="buttonDisabled"
@click="resetQuery"
>重置</el-button >重置</el-button
> >
</el-form-item> </el-form-item>
...@@ -86,6 +91,15 @@ ...@@ -86,6 +91,15 @@
min-width="200" min-width="200"
align="left" align="left"
> >
<template slot-scope="scope">
<el-link
@click="
$router.push({ path: '/basic/company-view?id=' + scope.row.id })
"
>{{ scope.row.enterpriseName }}</el-link
>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="企业地址" label="企业地址"
...@@ -204,7 +218,8 @@ export default { ...@@ -204,7 +218,8 @@ export default {
attributes: { attributes: {
id: '' id: ''
} }
}) }),
buttonDisabled:false
} }
}, },
watch: { watch: {
...@@ -221,7 +236,18 @@ export default { ...@@ -221,7 +236,18 @@ export default {
this.view = this.$route.query.view this.view = this.$route.query.view
}, },
methods: { methods: {
handleQuery(){
this.buttonDisabled = true
setTimeout(()=>{
this.buttonDisabled = false
},2000)
this.loadData()
},
resetQuery() { resetQuery() {
this.buttonDisabled = true
setTimeout(()=>{
this.buttonDisabled = false
},2000)
this.queryParams = { this.queryParams = {
pageNum: this.queryParams.pageNum, pageNum: this.queryParams.pageNum,
pageSize: this.queryParams.pageSize, pageSize: this.queryParams.pageSize,
......
...@@ -60,10 +60,15 @@ ...@@ -60,10 +60,15 @@
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
size="mini" size="mini"
:disabled="buttonDisibled"
@click="handleQuery" @click="handleQuery"
>查询</el-button >查询</el-button
> >
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"> <el-button
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
:disabled="buttonDisibled">
重置</el-button 重置</el-button
> >
</el-form-item> </el-form-item>
...@@ -224,7 +229,8 @@ export default { ...@@ -224,7 +229,8 @@ export default {
dialogEditId: null dialogEditId: null
}, },
classFicationList: [], classFicationList: [],
standardFicationList: [] standardFicationList: [],
buttonDisibled:false
} }
}, },
...@@ -250,6 +256,7 @@ export default { ...@@ -250,6 +256,7 @@ export default {
}, },
methods: { methods: {
resetQuery() { resetQuery() {
this.buttonDisibled = true
this.queryParams = { this.queryParams = {
pageNum: this.queryParams.pageNum, pageNum: this.queryParams.pageNum,
pageSize: this.queryParams.pageSize, pageSize: this.queryParams.pageSize,
...@@ -257,6 +264,17 @@ export default { ...@@ -257,6 +264,17 @@ export default {
orderByColumn: this.queryParams.orderByColumn orderByColumn: this.queryParams.orderByColumn
} }
this.loadData() this.loadData()
setTimeout(() => {
this.buttonDisibled = false
}, 2000)
},
handleQuery(){
this.buttonDisibled = true
this.loadData()
setTimeout(() => {
this.buttonDisibled = false
}, 2000)
}, },
sort_change(column, prop, order) { sort_change(column, prop, order) {
this.queryParams.pageNum = 1 // 排序后返回第一页 this.queryParams.pageNum = 1 // 排序后返回第一页
...@@ -268,7 +286,7 @@ export default { ...@@ -268,7 +286,7 @@ export default {
}, },
downPdf(row, name) { downPdf(row, name) {
if (name == 'name') { if (name == 'name') {
window.open(process.env.VUE_APP_IMAGE_API + row.file) window.open("https:\\"+row.file);
} else if (name == 'keypointname') { } else if (name == 'keypointname') {
window.open(process.env.VUE_APP_IMAGE_API + row.keypointFile) window.open(process.env.VUE_APP_IMAGE_API + row.keypointFile)
} }
......
...@@ -275,7 +275,6 @@ ...@@ -275,7 +275,6 @@
downPdf(row,name) { downPdf(row,name) {
console.log('row', row) console.log('row', row)
if(name=='name'){ if(name=='name'){
console.log(process.env.VUE_APP_IMAGE_API + row.file)
window.open(process.env.VUE_APP_IMAGE_API + row.file) window.open(process.env.VUE_APP_IMAGE_API + row.file)
}else if(name=='keypointname'){ }else if(name=='keypointname'){
window.open(process.env.VUE_APP_IMAGE_API + row.keypointFile) window.open(process.env.VUE_APP_IMAGE_API + row.keypointFile)
......
<template> <template>
<el-dialog
title="检验内容"
:visible.sync="dialogManger.dialogVisible"
width="60%"
>
<el-form class="form" :model="dialogManger" :inline="true">
<el-form-item class="title">
<span style="width: 500px">标准信息</span>
</el-form-item>
<el-form-item label="标准号" :label-width="formLabelWidth">
<el-input
class="input"
disabled
v-model="dialogManger.source.standard.standardNo"
autocomplete="off"
></el-input>
</el-form-item>
<el-form-item label="标准名称" :label-width="formLabelWidth">
<el-input
class="input"
disabled
v-model="dialogManger.source.standard.name"
autocomplete="off"
></el-input>
</el-form-item>
<el-form-item label="标准章节" :label-width="formLabelWidth">
<el-input
class="input"
disabled
v-model="dialogManger.source.standard.chapter"
autocomplete="off"
></el-input>
</el-form-item>
<el-form-item label="审查类型" :label-width="formLabelWidth">
<el-input
class="input"
disabled
v-model="dialogManger.source.standard.type"
autocomplete="off"
></el-input>
</el-form-item>
<el-form-item label="标准要求" :label-width="formLabelWidth">
<el-input
class="textarea"
disabled
resize="none"
:autosize="{ minRows: 4, maxRows: 6 }"
type="textarea"
v-model="dialogManger.source.standard.text"
autocomplete="off"
></el-input>
</el-form-item>
</el-form>
<el-dialog title="检验内容" :visible.sync="dialogManger.dialogVisible" width="60%"> <el-form
<el-form class="form" :model="dialogManger" :inline="true"> class="form"
<el-form-item class="title"> :model="dialogManger"
<span style="width: 500px;">标准信息</span> title="'审查信息'"
</el-form-item> style="margin-top: 10px"
<el-form-item label="标准号" :label-width="formLabelWidth"> >
<el-input class="input" disabled v-model="dialogManger.source.standard.standard.standardNo" autocomplete="off" :title="dialogManger.source.standard.standard.standardNo"></el-input> <el-form-item class="title">
</el-form-item> <span style="width: 500px">审查信息</span>
<el-form-item label="标准名称" :label-width="formLabelWidth"> </el-form-item>
<el-input class="input" disabled v-model="dialogManger.source.standard.standard.name" autocomplete="off" :title="dialogManger.source.standard.standard.name"></el-input> <el-form-item label="审查要点" :label-width="formLabelWidth">
</el-form-item> <el-input
<el-form-item label="标准章节" :label-width="formLabelWidth"> class="textarea"
<el-input class="input" disabled v-model="dialogManger.source.standard.chapter" autocomplete="off" :title="dialogManger.source.standard.chapter"></el-input> disabled
</el-form-item> resize="none"
<el-form-item label="审查类型" :label-width="formLabelWidth"> :autosize="{ minRows: 1, maxRows: 6 }"
<el-input class="input" disabled v-model="dialogManger.source.standard.type" autocomplete="off" :title="dialogManger.source.standard.type"></el-input> type="textarea"
</el-form-item> v-model="dialogManger.source.judge.content"
<el-form-item label="标准要求" :label-width="formLabelWidth"> autocomplete="off"
<el-input >
class="textarea" </el-input>
disabled </el-form-item>
resize="none" <div v-for="(item, index) in dialogManger.source.judge.reviewDetailsList">
:autosize="{minRows:4,maxRows:6}" <el-form-item label="审查细则" :label-width="formLabelWidth">
type="textarea" <el-input
v-model="dialogManger.source.standard.text" class="textarea"
:title="dialogManger.source.standard.text" disabled
autocomplete="off"></el-input> resize="none"
</el-form-item> :autosize="{ minRows: 1, maxRows: 6 }"
</el-form> type="textarea"
v-model="item.text"
<el-form class="form" :model="dialogManger" title="'审查信息'" style="margin-top: 10px;"> autocomplete="off"
<el-form-item class="title"> >
<span style="width: 500px;">审查信息</span> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="审查要点" :label-width="formLabelWidth"> <el-form-item label="关联场景" :label-width="formLabelWidth">
<el-input class="textarea" <el-input
disabled class="textarea"
resize="none" disabled
:autosize="{minRows:1,maxRows:6}" resize="none"
type="textarea" :autosize="{ minRows: 4, maxRows: 6 }"
v-model="dialogManger.source.judge.content" type="textarea"
autocomplete="off" v-model="item.reviewSceneList"
:title="dialogManger.source.judge.content"> autocomplete="off"
</el-input> ></el-input>
</el-form-item> </el-form-item>
<div v-for="(item,index) in dialogManger.source.judge.reviewDetailsList" > </div>
<el-form-item label="审查细则" :label-width="formLabelWidth"> </el-form>
<el-input <div slot="footer" class="dialog-footer">
class="textarea" <el-button type="primary" @click="dialogManger.dialogVisible = false"
disabled >确 定</el-button
resize="none" >
:autosize="{minRows:1,maxRows:6}"
type="textarea"
v-model="item.text"
autocomplete="off"
:title="item.text">
</el-input>
</el-form-item>
<el-form-item label="关联场景" :label-width="formLabelWidth">
<el-input
class="textarea"
disabled
resize="none"
:autosize="{minRows:4,maxRows:6}"
type="textarea"
v-model="item.reviewSceneList"
:title="item.reviewSceneList"
autocomplete="off"></el-input>
</el-form-item>
</div> </div>
</el-form> </el-dialog>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="dialogManger.dialogVisible = false">确 定</el-button>
</div>
</el-dialog>
</template> </template>
<script> <script>
export default { export default {
name:'', name: '',
data(){ data() {
return { return {
titleWidth:'500px', titleWidth: '500px',
formLabelWidth: '120px' formLabelWidth: '120px'
} }
}, },
props: { props: {
dialogManger: { dialogManger: {
type: Object, type: Object,
default: () => { default: () => {
return { return {
dialogVisible: false, dialogVisible: false,
refreshList: false, refreshList: false,
source: {}, source: {
standard: {
name: '',
standardNo:'',
chapter: '',
type:'',
text:'',
},
judge:{
content:'',
reviewDetailsList:[]
}
},
dialogEditId: undefined dialogEditId: undefined
} }
} }
} }
}, },
methods:{ methods: {
cancel(){ cancel() {
this.dialogManger.dialogVisible = false this.dialogManger.dialogVisible = false
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.form .title{ .form .title {
width: 600px; width: 600px;
margin-right: 50px; margin-right: 50px;
color: blue; color: blue;
...@@ -118,21 +158,21 @@ data(){ ...@@ -118,21 +158,21 @@ data(){
border-left: blue solid 6px; border-left: blue solid 6px;
padding-left: 10px; padding-left: 10px;
} }
.form .input{ .form .input {
width: 250px; width: 250px;
} }
.form .textarea{ .form .textarea {
width: 630px; width: 630px;
} }
::v-deep .el-dialog__body{ ::v-deep .el-dialog__body {
height: 70vh; height: 70vh;
overflow: auto; overflow: auto;
} }
.input ::v-deep .el-input__inner { .input ::v-deep .el-input__inner {
color: black; color: black;
} }
.textarea ::v-deep .el-textarea__inner { .textarea ::v-deep .el-textarea__inner {
color: black; color: black;
} }
</style> </style>
\ No newline at end of file
This diff is collapsed.
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