Commit 577b56fd authored by zhang's avatar zhang
parents c97dd43d 0a649eb4
......@@ -11,7 +11,7 @@ VUE_APP_BASE_API = '/dev-api'
VUE_CLI_BABEL_TRANSPILE_MODULES = true
# 图片服务器地址
# VUE_APP_IMAGE_API ='http://106.3.99.64:22013'
VUE_APP_IMAGE_API ='https://10.12.48.78'
VUE_APP_IMAGE_API ='https://10.11.77.251:22008'
VUE_APP_CLIENT_API = 'https://10.12.48.78/vvmpapi'
import request from '@/utils/request'
// 获取项目
export const getObjectList = () => {
return request({
url: '/Object/Data/getList',
method: 'post'
})
}
export const add = data => {
return request({
url: '/Plan/Record/add',
method: 'post',
data
})
}
// 获取路由
export const getObjectList = () => {
return request({
url: '/Object/Data/getList',
method: 'post'
})
}
\ No newline at end of file
export const details = data => {
return request({
url: '/Plan/Record/details',
method: 'post',
data
})
}
export const standard = data => {
return request({
url: '/Plan/Record/standard',
method: 'post',
data
})
}
export const getList = () => {
return request({
url: '/Plan/Record/page',
method: 'post'
})
}
export const standardDetail = data => {
return request({
url: '/Plan/Record/standard',
method: 'post',
data
})
}
export const useCase = data => {
return request({
url: '/Plan/Record/useCase',
method: 'post',
data
})
}
export const update = (data) => {
return request({
url: '/Plan/Record/update',
method: 'post',
data
})
}
export const del = (data) => {
return request({
url: '/Plan/Record/del',
method: 'post',
data
})
}
......@@ -3,8 +3,7 @@
<div v-for="(i, k) in items.options" class="checkbox-item" :key="k">
<el-checkbox
:disabled="status"
v-model="value"
:value="i.check"
:model="i.check"
@change="input"
label=""
>
......@@ -46,12 +45,13 @@ export default {
},
data() {
return {
value: '',
list: []
model: {
value: '',
list: []
}
}
},
created() {
this.value = this.defaultValue
this.reset()
},
watch: {
......@@ -61,23 +61,33 @@ export default {
status(newVal) {
this.reset()
this.$emit('changeVal', { name: this.prop, val: [] })
this.$emit('makeRecord', { name: this.prop, record: {} })
}
},
mounted() {
if (this.defaultValue) {
this.model = this.defaultValue
this.$emit('changeVal', { name: this.prop, val: this.result})
this.$emit('makeRecord', { name: this.prop, record: this.model })
} else {
this.reset()
}
},
methods: {
input(val) {
let arr = []
this.list.map(i => {
this.mdoel.list.map(i => {
if (i.check) {
arr.push(i.useCaseNo)
}
})
console.log(arr)
this.$emit('changeVal', { name: this.prop, val: arr })
this.$emit('changeVal', { name: this.prop, val: arr.join(',') })
this.$emit('makeRecord', { name: this.prop, record: this.mdoel.list })
},
reset() {
this.list = []
this.model.list = []
this.items.options.map(i => {
this.list.push({
this.model.list.push({
value: '',
check: false,
useCaseNo: i.useCaseNo,
......
......@@ -4,8 +4,7 @@
<div v-for="(i, k) in items.options" class="checkbox-item" :key="k">
<el-checkbox
:disabled="status"
v-model="list[k].check"
:value="i.id"
v-model="model.list[k].check"
@change="input"
label=""
>
......@@ -13,9 +12,9 @@
<el-input
v-bind="items"
placeholder="请输入"
:disabled="!list[k].check"
:disabled="!model.list[k].check"
style="width: 10rem; margin: 0 10px"
v-model="list[k].value"
v-model="model.list[k].value"
@input="input"
>
</el-input>
......@@ -30,7 +29,7 @@
class="upload-demo"
:action="uploadImgUrl"
:on-preview="handlePreview"
v-model="file"
v-model="model.file"
:on-remove="handleRemove"
:before-remove="beforeRemove"
:show-file-list="false"
......@@ -67,10 +66,12 @@ export default {
},
data() {
return {
value: '',
list: [],
file: '',
path: '',
model: {
value: '',
list: [],
file: '',
path: ''
},
uploadImgUrl: process.env.VUE_APP_BASE_API + '/common/uploadMinio' // 上传的图片服务器地址
}
},
......@@ -80,28 +81,38 @@ export default {
},
watch: {
defaultValue(newVal) {
this.value = newVal
this.model.value = newVal
},
status(newVal) {
this.reset()
this.$emit('changeVal', { name: this.prop, val: [] })
this.$emit('makeRecord', { name: this.prop, record: {} })
}
},
mounted() {
if (this.defaultValue) {
this.model = this.defaultValue
this.$emit('changeVal', { name: this.prop, val: this.result})
this.$emit('makeRecord', { name: this.prop, record: this.model })
} else {
this.reset()
}
},
methods: {
input(val) {
let arr = []
this.list.map(i => {
this.model.list.map(i => {
if (i.check) {
arr.push(i.useCaseNo)
}
})
console.log(arr)
this.$emit('changeVal', { name: this.prop, val: this.list })
this.$emit('changeVal', { name: this.prop, val: arr.join(',') })
this.$emit('makeRecord', { name: this.prop, record: this.model })
},
reset() {
this.list = []
this.model.list = []
this.items.options.map(i => {
this.list.push({
this.model.list.push({
value: '',
check: false,
useCaseNo: i.useCaseNo,
......@@ -117,7 +128,7 @@ export default {
},
handleSuccess(res, file) {
if (res === 200) {
console.log(res)
this.model.path = res.url
this.$message.success('上传成功')
} else {
this.$message.error('error')
......
......@@ -21,7 +21,9 @@ export default {
default: false
},
defaultValue: {
type: [String, Number],
default: ''
},
result: {
default: ''
}
},
......@@ -37,11 +39,17 @@ export default {
status(newVal) {
this.value = []
this.$emit('changeVal', { name: this.prop, val: [] })
this.$emit('makeRecord', { name: this.prop, record: []})
this.$emit('makeRecord', { name: this.prop, record: [] })
}
},
mounted() {
// this.value = this.defaultValue
if (this.defaultValue) {
this.value = this.defaultValue
this.$emit('changeVal', { name: this.prop, val: this.result})
this.$emit('makeRecord', { name: this.prop, record: this.value })
} else {
this.reset()
}
},
methods: {
input(val) {
......@@ -51,13 +59,11 @@ export default {
arr.push(i.useCaseNo)
}
})
console.log(arr)
this.$emit('changeVal', { name: this.prop, val: arr })
this.$emit('changeVal', { name: this.prop, val: arr.join(',') })
this.$emit('makeRecord', { name: this.prop, record: this.value })
},
reset() {
this.value = ''
this.value = []
},
setDefaultValue(val) {
this.value = val
......
......@@ -3,10 +3,10 @@
<el-checkbox-group :disabled="status" v-model="model.value" @change="input">
<el-checkbox
v-for="(i, k) in items.options"
:label="i.object"
:value="i.useCaseNo"
:label="i.id"
:key="k"
>
{{ i.object }}
</el-checkbox>
</el-checkbox-group>
<el-upload
......@@ -69,20 +69,29 @@ export default {
}
},
mounted() {
this.reset()
if (this.defaultValue) {
this.model = this.defaultValue
this.$emit('changeVal', { name: this.prop, val: this.result})
this.$emit('makeRecord', { name: this.prop, record: this.model })
} else {
this.reset()
}
},
methods: {
input() {
let arr = []
this.item.options.map(i => {
this.items.options.map(i => {
console.log(this.model.value)
console.log(i)
if (this.model.value.includes(i.id)) {
arr.push(i.useCaseNo)
}
})
console.log(arr)
this.$emit('changeVal', {
name: this.prop,
val: arr
val: arr.join(',')
})
this.$emit('makeRecord', { name: this.prop, record: this.model })
},
......
......@@ -40,20 +40,22 @@ export default {
status(newVal) {
this.value = ''
this.$emit('changeVal', { name: this.prop, val: [] })
this.$emit('makeRecord', { name: this.prop, record: '' })
}
},
mounted() {
this.value = this.defaultValue
if (this.defaultValue) {
this.value = this.defaultValue
this.$emit('changeVal', { name: this.prop, val: this.result})
this.$emit('makeRecord', { name: this.prop, record: this.value })
} else {
this.reset()
}
},
methods: {
input(val) {
let arr = []
if (val) {
this.items.options.map(i => {
arr.push(i.useCaseNo)
})
}
this.$emit('changeVal', { name: this.prop, val: arr })
this.$emit('changeVal', { name: this.prop, val: val })
this.$emit('makeRecord', { name: this.prop, record: val })
},
reset() {
this.value = ''
......
......@@ -3,7 +3,7 @@
<el-input
v-bind="items"
:disabled="status"
v-model="value"
v-model="model.value"
style="width: 50%"
placeholder="请输入"
@input="input"
......@@ -13,7 +13,7 @@
class="upload-demo"
:action="uploadImgUrl"
:on-preview="handlePreview"
v-model="file"
v-model="model.file"
:on-remove="handleRemove"
:before-remove="beforeRemove"
:show-file-list="false"
......@@ -50,8 +50,11 @@ export default {
},
data() {
return {
value: '',
file: '',
model: {
value: '',
file: '',
path: ''
},
uploadImgUrl: process.env.VUE_APP_BASE_API + '/common/uploadMinio' // 上传的图片服务器地址
}
},
......@@ -60,12 +63,19 @@ export default {
this.value = newVal
},
status(newVal) {
this.value = ''
this.reset()
this.$emit('changeVal', { name: this.prop, val: [] })
this.$emit('makeRecord', { name: this.prop, record:{} })
}
},
mounted() {
this.value = this.defaultValue
if (this.defaultValue) {
this.model = this.defaultValue
this.$emit('changeVal', { name: this.prop, val: this.result})
this.$emit('makeRecord', { name: this.prop, record: this.model })
} else {
this.reset()
}
},
methods: {
input(val) {
......@@ -75,10 +85,17 @@ export default {
arr.push(i.useCaseNo)
})
}
this.$emit('changeVal', { name: this.prop, val: arr })
console.log(arr);
this.$emit('changeVal', { name: this.prop, val: arr.join(',') })
this.$emit('makeRecord', { name: this.prop, record: this.model })
},
reset() {
this.value = ''
this.model = {
value: '',
file: '',
path: ''
}
},
setDefaultValue(val) {
this.value = val
......@@ -91,6 +108,7 @@ export default {
},
handleSuccess(res, file) {
if (res === 200) {
this.model.path = res.url
this.$message.success('上传成功')
} else {
this.$message.error('error')
......
......@@ -37,22 +37,32 @@ export default {
status(newVal) {
this.value = ''
this.$emit('changeVal', { name: this.prop, val: [] })
this.$emit('makeRecord', { name: this.prop, record: this.value })
}
},
mounted() {
this.value = this.defaultValue
if (this.defaultValue) {
this.value = this.defaultValue
this.$emit('changeVal', { name: this.prop, val: this.result})
this.$emit('makeRecord', { name: this.prop, record: this.value })
} else {
this.reset()
}
},
methods: {
input(val) {
let arr = []
this.items.options.map(i => {
console.log(i.id == this.value);
if (i.id == this.value) {
console.log(i);
arr.push(i.useCaseNo)
}
})
console.log(arr)
this.$emit('changeVal', { name: this.prop, val: arr })
this.$emit('changeVal', { name: this.prop, val: arr.join(',') })
this.$emit('makeRecord', { name: this.prop, record: this.value })
},
reset() {
this.value = ''
......
<template>
<div>
<el-radio-group :disabled="status" v-model="value" @change="input">
<el-radio-group :disabled="status" v-model="model.value" @change="input">
<div v-for="(i, k) in items.options" class="checkbox-item" :key="k">
<el-radio @change="input" :label="i.id">
<div class="checkbox-radio">
<el-input
v-model="list[k].value"
v-model="model.list[k].value"
placeholder="请输入"
:disabled="value !== i.value"
style="width: 50%; margin: 0 10px"
......@@ -43,8 +43,10 @@ export default {
},
data() {
return {
value: '',
list: []
model:{
list: []
}
}
},
created() {
......@@ -58,23 +60,37 @@ export default {
status(newVal) {
this.reset()
this.$emit('changeVal', { name: this.prop, val: [] })
this.$emit('makeRecord', { name: this.prop, record: this.model })
}
},
mounted() {
if (this.defaultValue) {
this.model = this.defaultValue
this.$emit('changeVal', { name: this.prop, val: this.result})
this.$emit('makeRecord', { name: this.prop, record: this.model })
value
} else {
this.reset()
}
},
methods: {
input(val) {
let arr = []
if (val) {
this.list.options.map(i => {
this.model.list.options.map(i => {
if (i.key == this.value) {
arr.push(i.useCaseNo)
}
})
}
this.$emit('changeVal', { name: this.prop, val: arr })
this.$emit('changeVal', { name: this.prop, val: arr.join(',') })
this.$emit('makeRecord', { name: this.prop, record: this.model })
},
reset() {
this.model.value = ''
this.items.options.map(i => {
this.list.push({
this.model.list.push({
value: '',
useCaseNo:i.useCaseNo,
key: i.id
......
<template>
<div class="checkbox-upload">
<el-radio-group :disabled="status" v-model="value" @change="input">
<el-radio-group :disabled="status" v-model="model.value" @change="input">
<el-radio v-for="(i, k) in items.options" :label="i.id" :key="k"
>{{ i.object }}
</el-radio>
......@@ -9,7 +9,7 @@
class="upload-demo"
:action="uploadImgUrl"
:on-preview="handlePreview"
v-model="file"
v-model="model.file"
:on-remove="handleRemove"
:before-remove="beforeRemove"
:show-file-list="false"
......@@ -46,38 +46,54 @@ export default {
},
data() {
return {
value: '',
file: '',
model: {
value: '',
file: '',
path: ''
},
uploadImgUrl: process.env.VUE_APP_BASE_API + '/common/uploadMinio' // 上传的图片服务器地址
}
},
watch: {
defaultValue(newVal) {
this.value = newVal
this.model = newVal
},
status(newVal) {
this.reset()
this.$emit('changeVal', { name: this.prop, val: [] })
this.$emit('makeRecord', { name: this.prop, record: this.model })
}
},
mounted() {
this.value = this.defaultValue
if (this.defaultValue) {
this.model = this.defaultValue
this.$emit('changeVal', { name: this.prop, val: this.result })
this.$emit('makeRecord', { name: this.prop, record: this.model })
} else {
this.reset()
}
},
methods: {
input(val) {
let arr = []
this.items.options.map(i => {
if (i.id == this.value) {
if (i.id == this.model.value) {
arr.push(i.useCaseNo)
}
})
this.$emit('changeVal', { name: this.prop, val: arr })
this.$emit('changeVal', { name: this.prop, val: arr.join(',') })
this.$emit('makeRecord', { name: this.prop, record: this.model })
},
reset() {
this.value = ''
this.model = {
value: '',
file: '',
path: ''
}
},
setDefaultValue(val) {
this.value = val
this.mdoel = val
},
handleRemove(file, fileList) {
console.log(file, fileList)
......@@ -87,6 +103,7 @@ export default {
},
handleSuccess(res, file) {
if (res === 200) {
this.model.path = res.url
this.$message.success('上传成功')
} else {
this.$message.error('error')
......
......@@ -22,9 +22,11 @@
style="width: 100%"
:rules="[
{
required: !item.status,
message: `${item.describe}不能为空`,
trigger: ['blur']
validator: (rule, value, callback) => {
checkItem(item, value, callback)
},
// message: `${item.describe}不能为空`,
trigger: ['change', 'blur']
}
]"
>
......@@ -33,7 +35,8 @@
:status="item.status"
:prop="item.key"
:items="item.componentProps"
:defaultValue="form[item.prop]"
:defaultValue="item.record ? item.record.defaultValue : ''"
:result="item.result"
@changeVal="changeVal"
@makeRecord="makeRecord"
ref="formItem"
......@@ -88,8 +91,6 @@ export default {
...item
}
})
console.log('schemas', schemas)
return schemas
}
},
......@@ -105,12 +106,12 @@ export default {
changeVal(data) {
const { name, val } = data
this.form[name] = val
this.$refs.queryForm.clearValidate(name)
this.$emit('input', this.form)
this.$refs.queryForm.clearValidate(name)
},
makeRecord(data) {
const { name, record } = data
if (this.record[name]) {
if (!this.record[name]) {
this.record[name] = {
defaultValue: ''
}
......@@ -118,16 +119,37 @@ export default {
this.record[name].defaultValue = record
},
getValidate() {
this.$refs.queryForm.validate(res => {
if (res) {
return true
checkItem(prop, value, cb) {
if (!prop.status) {
if (this.form[prop.key]) {
cb()
} else {
console.log(3333)
cb(new Error(`${prop.describe}不能为空`))
}
}
cb()
},
async getValidateVaule() {
const res = await this.$refs.queryForm.validate
if (res) {
let arr = []
let codes = []
this.schemas.map((i, k) => {
if (i.status == false) {
i.result = this.form[i.key]
i.record = this.record[i.key]
codes.push(this.form[i.key])
}
arr.push(i)
})
return false
return {
record: arr,
codes: codes.join(',')
}
})
} else {
return false
}
}
}
}
......
......@@ -164,12 +164,7 @@ export function download(url, params, filename, config) {
})
return service
.post(url, params, {
transformRequest: [
params => {
return tansParams(params)
}
],
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
headers: { 'Content-Type': 'application/json' },
responseType: 'blob',
...config
})
......
This diff is collapsed.
This diff is collapsed.
<template>
<el-dialog
:visible.sync="dialogManger.dialogVisible"
:title="modalTitle"
width="1200"
append-to-body
destroy-on-close
:close-on-click-modal="false"
:before-close="handleClose"
>
<el-form
ref="form"
class="company-form"
label-width="120px"
label-position="top"
:model="model"
:rules="rules"
>
<el-form-item label="企业名称" prop="enterpriseName">
<el-input
v-model="model.enterpriseName"
class="w-100"
placeholder="请输入企业名称"
/>
</el-form-item>
<el-form-item label="企业地址" prop="address">
<el-input
v-model="model.address"
type="textarea"
:rows="4"
maxlength="200"
show-word-limit
placeholder="请输入企业地址"
/>
</el-form-item>
<el-form-item label="企业邮编" prop="postcode">
<el-input v-model="model.postcode" placeholder="请输入企业邮编" />
</el-form-item>
<el-form-item label="企业联系人" prop="enterpriseContact">
<el-input
v-model="model.enterpriseContact"
placeholder="请输入企业联系人"
/>
</el-form-item>
<el-form-item label="联系电话" prop="contactNumber">
<el-input v-model="model.contactNumber" placeholder="请输入联系电话" />
</el-form-item>
</el-form>
<div slot="footer">
<el-button @click="handleClose()"> 取消 </el-button>
<el-button type="primary" @click="saveModel()"> 保存 </el-button>
</div>
</el-dialog>
</template>
<script>
export default {
props: {
dialogManger: {
default: () => {
return {
dialogVisible: false,
dialogEditId: null
}
},
type: Object
}
},
data() {
return {
model: this.$modelDataSource({
url: '/system/enterprise',
dataKey: 'model',
attributes: {
address: '',
contactNumber: '',
enterpriseContact: '',
enterpriseName: '',
id: 0,
// params: '',
postcode: ''
// remark: ''
}
}),
rules: {
enterpriseName: [
{ required: true, message: '请输入企业名称', trigger: 'blur' }
],
address: [
{ required: true, message: '请输入企业地址', trigger: 'blur' }
],
postcode: [
{ required: true, message: '请输入企业邮编', trigger: 'blur' }
],
enterpriseContact: [
{ required: true, message: '请输入企业联系人', trigger: 'blur' }
],
contactNumber: [
{ required: true, message: '请输入联系电话', trigger: 'blur' }
]
}
}
},
computed: {
modalTitle() {
if (this.dialogManger.dialogEditId === 0) {
return '新增'
} else {
return '编辑'
}
}
},
watch: {
'dialogManger.dialogEditId'(newValue) {
this.model.fetch(
newValue,
{},
() => {
this.dialogManger.dialogVisible = true
},
() => {
this.$emit('refresh')
}
)
}
},
methods: {
handleClose() {
this.model.reset()
this.dialogManger.dialogEditId = null
this.dialogManger.dialogVisible = false
},
saveModel() {
this.$refs['form'].validate(valid => {
if (valid) {
console.log('表单验证通过')
this.model.save(
() => {
this.$message.success('保存成功')
this.$emit('refresh')
this.handleClose()
},
errors => {
// this.handleClose()
}
)
} else {
console.log('表单验证失败')
}
})
}
}
}
</script>
<template>
<page-standard>
<el-form ref="queryForm" :model="queryParams" size="small" :inline="true">
<template v-if="showSearch">
<el-form-item label="被检车企" prop="inspectCarCompanyId">
<el-select
v-model="queryParams.inspectCarCompanyId"
placeholder="请选择被检车企"
style="width: 100%"
>
<el-option
v-for="item in componentSelect"
:key="item.id"
:label="item.enterpriseName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="车辆VIN号" prop="carModel">
<el-input
v-model="queryParams.carModel"
placeholder="请输入"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>查询</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</template>
<!-- <el-form-item>
<right-toolbar
:show-search.sync="showSearch"
@queryTable="loadData"
></right-toolbar>
</el-form-item> -->
</el-form>
<el-table
v-if="refreshTable"
v-loading="loading"
border
:scroll-x="'1500px'"
:data="tableData"
:default-sort="{ prop: 'createTime', order: 'descending' }"
@sort-change="sort_change"
>
<el-table-column type="index" width="55" label="序号" align="center">
</el-table-column>
<el-table-column
label="被检车企"
show-overflow-tooltip
prop="inspectCarCompanyName"
min-width="200"
align="left"
>
</el-table-column>
<el-table-column
label="车辆VIN号"
show-overflow-tooltip
min-width="200"
prop="carModel"
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="检测机构"
prop="testOrganizationName"
min-width="200"
align="left"
sortable
>
</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="handleUpdate(scope.row.id)">
修改</el-button
>
<el-button type="text" @click="handleDelete(scope.row.id)">
删除</el-button
>
<el-upload
v-if="!scope.row.file_url"
ref="fileUpload"
:action="uploadFileUrl"
:limit="1"
:on-success="(res)=>{
handleUploadSuccess(res,scope.row.id)
}"
:show-file-list="false"
:headers="headers"
class="upload-file-uploader"
>
<el-button type="text">上传结果 </el-button>
</el-upload>
<el-button type="text" v-else> 重新上传 </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>
<company-dialog
:dialog-manger="dialogManger"
@refresh="refreshList = true"
></company-dialog>
</page-standard>
</template>
<script>
import page from '@/mixins/page'
import { del,update } from '@/api/plan'
import companyDialog from './components/dialog.vue'
export default {
components: {
companyDialog
},
mixins: [page],
data() {
return {
listUrl: '/Plan/Record/page',
uploadFileUrl: process.env.VUE_APP_BASE_API + '/common/uploadMinio', // 上传文件服务器地址
componentSelect: [],
showSearch: true,
headers: {
Authorization: 'Bearer ' + this.$store.getters.token
},
view: '',
tableData: [],
dialogManger: {
dialogVisible: false,
dialogEditId: null
},
refreshList: false,
model: this.$modelDataSource({
url: '/Plan/Record/page',
dataKey: 'model',
attributes: {
id: ''
}
})
}
},
watch: {
refreshList(newVal) {
if (newVal) {
this.loadData()
this.refreshList = false
}
}
},
created() {
this.queryParams.isAsc = 'desc'
this.queryParams.orderByColumn = 'createTime'
this.view = this.$route.query.view
},
methods: {
goDetail(id) {
this.$router.push({
path: '/plan/detail?id=' + id
})
},
handleUploadSuccess(res,id) {
update({
id: id,
testResult: res.originalFilename,
fileUrl: res.url
}).then(res => {
if (res.code == 200) {
this.$message.success('上传成功')
this.loadData()
} else {
this.$message.error('上传失败')
}
})
},
resetQuery() {
this.queryParams = {
pageNum: this.queryParams.pageNum,
pageSize: this.queryParams.pageSize,
isAsc: this.queryParams.isAsc,
orderByColumn: this.queryParams.orderByColumn
}
this.loadData()
},
sort_change(column, prop, order) {
this.queryParams.pageNum = 1 // 排序后返回第一页
if (column.order) {
this.queryParams.isAsc = column.order === 'ascending' ? 'asc' : 'desc'
this.queryParams.orderByColumn = column.prop
this.loadData()
}
},
handleDelete(id) {
this.$modal
.confirm('是否确定删除该条数据?', {
type: 'warning',
title: '删除',
closeOnClickModal: false
})
.then(() => {
del({
id: id
}).then(() => {
this.refreshList = true
this.$message.success('删除成功')
})
})
.catch(() => {})
},
handleUpdate(id) {
this.$router.push({
path: '/plan/customized?id=' + id
})
},
getComponentSelect() {
componentSelect({
pageNum: 1,
pageSize: 9999,
isAsc: 'desc',
orderByColumn: 'createTime'
}).then(res => {
this.componentSelect = res.rows
})
}
}
}
</script>
......@@ -38,6 +38,7 @@ module.exports = {
// target: `http://106.3.99.64:22016`,
// target: `http://192.168.10.171:22032`,
// target: `http://10.11.77.251:22008`,
target: `http://10.11.79.113:22008`,
// target: `http://10.11.79.113/prod-api`,
// target: `http://10.11.77.182:22016`,
......
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