【fix ESLint】src/views/demo、src/utils

This commit is contained in:
zhaoxiao
2023-03-06 16:07:07 +08:00
parent a456ea7743
commit 84e931c884
54 changed files with 571 additions and 624 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ function globalDisabledAuth (code) {
// 设置全局配置是否有命中 // 设置全局配置是否有命中
let gFlag = false// 禁用命中 let gFlag = false// 禁用命中
let invalidFlag = false// 无效命中 let invalidFlag = false// 无效命中
if (allPermissionList != null && allPermissionList !== '' && allPermissionList !== undefined && allPermissionList.length > 0) { if (allPermissionList != null && allPermissionList != '' && allPermissionList !== undefined && allPermissionList.length > 0) {
for (const itemG of allPermissionList) { for (const itemG of allPermissionList) {
if (code === itemG.action) { if (code === itemG.action) {
if (itemG.status + '' === '0') { if (itemG.status + '' === '0') {
+1 -1
View File
@@ -84,7 +84,7 @@ export function filterGlobalPermission (el, binding) {
} }
// 设置全局配置是否有命中 // 设置全局配置是否有命中
let invalidFlag = false// 无效命中 let invalidFlag = false// 无效命中
if (allPermissionList != null && allPermissionList !== '' && allPermissionList !== undefined && allPermissionList.length > 0) { if (allPermissionList != null && allPermissionList != '' && allPermissionList !== undefined && allPermissionList.length > 0) {
for (const itemG of allPermissionList) { for (const itemG of allPermissionList) {
if (binding.value === itemG.action) { if (binding.value === itemG.action) {
if (itemG.status + '' !== '0') { if (itemG.status + '' !== '0') {
+28 -32
View File
@@ -37,7 +37,8 @@
<div class="test-button"> <div class="test-button">
<button @click="changeImg" class="btn">changeImg</button> <button @click="changeImg" class="btn">changeImg</button>
<label class="btn" for="uploads">upload</label> <label class="btn" for="uploads">upload</label>
<input type="file" id="uploads" style="position:absolute; clip:rect(0 0 0 0);" accept="image/png, image/jpeg, image/gif, image/jpg" @change="uploadImg($event, 1)" ref="uploadImg"> <input type="file" id="uploads" style="position:absolute; clip:rect(0 0 0 0);" accept="image/png, image/jpeg, image/gif, image/jpg"
@change="uploadImg($event, 1)" ref="uploadImg">
<button @click="startCrop" v-if="!crap" class="btn">start</button> <button @click="startCrop" v-if="!crap" class="btn">start</button>
<button @click="stopCrop" v-else class="btn">stop</button> <button @click="stopCrop" v-else class="btn">stop</button>
<button @click="clearCrop" class="btn">clear</button> <button @click="clearCrop" class="btn">clear</button>
@@ -57,10 +58,9 @@
<div class="pre"> <div class="pre">
<section class="pre-item"> <section class="pre-item">
<p>截图框大小</p> <p>截图框大小</p>
<div class="show-preview" :style="{'width': previews.w + 'px', 'height': previews.h + 'px', 'overflow': 'hidden', <div class="show-preview" :style="{'width': previews.w + 'px', 'height': previews.h + 'px', 'overflow': 'hidden','margin': '5px'}">
'margin': '5px'}">
<div :style="previews.div"> <div :style="previews.div">
<img :src="previews.url" :style="previews.img"> <img :src="previews.url" :style="previews.img" alt="">
</div> </div>
</div> </div>
</section> </section>
@@ -69,7 +69,7 @@
<p>中等大小</p> <p>中等大小</p>
<div :style="previewStyle1"> <div :style="previewStyle1">
<div :style="previews.div"> <div :style="previews.div">
<img :src="previews.url" :style="previews.img"> <img :src="previews.url" :style="previews.img" alt="">
</div> </div>
</div> </div>
</section> </section>
@@ -78,7 +78,7 @@
<p>迷你大小</p> <p>迷你大小</p>
<div :style="previewStyle2"> <div :style="previewStyle2">
<div :style="previews.div"> <div :style="previews.div">
<img :src="previews.url" :style="previews.img"> <img :src="previews.url" :style="previews.img" alt="">
</div> </div>
</div> </div>
</section> </section>
@@ -87,7 +87,7 @@
<p>固定为100宽度</p> <p>固定为100宽度</p>
<div :style="previewStyle3"> <div :style="previewStyle3">
<div :style="previews.div"> <div :style="previews.div">
<img :src="previews.url" :style="previews.img"> <img :src="previews.url" :style="previews.img" alt="">
</div> </div>
</div> </div>
</section> </section>
@@ -96,7 +96,7 @@
<p>固定为100高度</p> <p>固定为100高度</p>
<div :style="previewStyle4"> <div :style="previewStyle4">
<div :style="previews.div"> <div :style="previews.div">
<img :src="previews.url" :style="previews.img"> <img :src="previews.url" :style="previews.img" alt="">
</div> </div>
</div> </div>
</section> </section>
@@ -300,7 +300,7 @@ export default {
finish (type) { finish (type) {
if (type === 'blob') { if (type === 'blob') {
this.$refs.cropper.getCropBlob(data => { this.$refs.cropper.getCropBlob(data => {
var img = window.URL.createObjectURL(data) const img = window.URL.createObjectURL(data)
this.model = true this.model = true
this.modelSrc = img this.modelSrc = img
}) })
@@ -313,9 +313,9 @@ export default {
}, },
// 实时预览函数 // 实时预览函数
realTime (data) { realTime (data) {
var previews = data const previews = data
var h = 0.5 const h = 0.5
var w = 0.2 const w = 0.2
this.previewStyle1 = { this.previewStyle1 = {
width: previews.w + 'px', width: previews.w + 'px',
@@ -352,13 +352,13 @@ export default {
this.previews = data this.previews = data
}, },
finish2 (type) { finish2 () {
this.$refs.cropper2.getCropData(data => { this.$refs.cropper2.getCropData(data => {
this.model = true this.model = true
this.modelSrc = data this.modelSrc = data
}) })
}, },
finish3 (type) { finish3 () {
this.$refs.cropper3.getCropData(data => { this.$refs.cropper3.getCropData(data => {
this.model = true this.model = true
this.modelSrc = data this.modelSrc = data
@@ -370,7 +370,7 @@ export default {
this.$refs.cropper.getCropBlob(data => { this.$refs.cropper.getCropBlob(data => {
this.downImg = window.URL.createObjectURL(data) this.downImg = window.URL.createObjectURL(data)
if (window.navigator.msSaveBlob) { if (window.navigator.msSaveBlob) {
var blobObject = new Blob([data]) const blobObject = new Blob([data])
window.navigator.msSaveBlob(blobObject, 'demo.png') window.navigator.msSaveBlob(blobObject, 'demo.png')
} else { } else {
this.$nextTick(() => { this.$nextTick(() => {
@@ -382,7 +382,7 @@ export default {
this.$refs.cropper.getCropData(data => { this.$refs.cropper.getCropData(data => {
this.downImg = data this.downImg = data
if (window.navigator.msSaveBlob) { if (window.navigator.msSaveBlob) {
var blobObject = new Blob([data]) const blobObject = new Blob([data])
window.navigator.msSaveBlob(blobObject, 'demo.png') window.navigator.msSaveBlob(blobObject, 'demo.png')
} else { } else {
this.$nextTick(() => { this.$nextTick(() => {
@@ -396,12 +396,12 @@ export default {
uploadImg (e, num) { uploadImg (e, num) {
// 上传图片 // 上传图片
// this.option.img // this.option.img
var file = e.target.files[0] const file = e.target.files[0]
if (!/\.(gif|jpg|jpeg|png|bmp|GIF|JPG|PNG)$/.test(e.target.value)) { if (!/\.(gif|jpg|jpeg|png|bmp|GIF|JPG|PNG)$/.test(e.target.value)) {
alert('图片类型必须是.gif,jpeg,jpg,png,bmp中的一种') alert('图片类型必须是.gif,jpeg,jpg,png,bmp中的一种')
return false return false
} }
var reader = new FileReader() const reader = new FileReader()
reader.onload = e => { reader.onload = e => {
let data let data
if (typeof e.target.result === 'object') { if (typeof e.target.result === 'object') {
@@ -428,13 +428,10 @@ export default {
this.option.cropData = data this.option.cropData = data
} }
}, },
components: {
VueCropper
},
mounted () { mounted () {
this.changeImg() this.changeImg()
var list = [].slice.call(document.querySelectorAll('pre code')) const list = [].slice.call(document.querySelectorAll('pre code'))
list.forEach((val, index) => { list.forEach((val) => {
hljs.highlightBlock(val) hljs.highlightBlock(val)
}) })
} }
@@ -448,9 +445,8 @@ export default {
} }
.content { .content {
margin: auto;
max-width: 1200px; max-width: 1200px;
margin-bottom: 100px; margin: auto auto 100px;
} }
.test-button { .test-button {
@@ -463,13 +459,13 @@ export default {
line-height: 1; line-height: 1;
white-space: nowrap; white-space: nowrap;
cursor: pointer; cursor: pointer;
background: #fff; /*background: #fff;*/
border: 1px solid #c0ccda; /*border: 1px solid #c0ccda;*/
color: #1f2d3d; /*color: #1f2d3d;*/
text-align: center; text-align: center;
box-sizing: border-box; box-sizing: border-box;
outline: none; outline: none;
margin: 20px 10px 0px 0px; margin: 20px 10px 0 0;
padding: 9px 15px; padding: 9px 15px;
font-size: 14px; font-size: 14px;
border-radius: 4px; border-radius: 4px;
@@ -487,7 +483,7 @@ export default {
code.language-html { code.language-html {
padding: 10px 20px; padding: 10px 20px;
margin: 10px 0px; margin: 10px 0;
display: block; display: block;
background-color: #333; background-color: #333;
color: #fff; color: #fff;
@@ -511,7 +507,7 @@ export default {
text-decoration: none; text-decoration: none;
text-align: center; text-align: center;
line-height: 1.5; line-height: 1.5;
margin: 20px 0px; margin: 20px 0;
background-image: -webkit-linear-gradient( background-image: -webkit-linear-gradient(
left, left,
#3498db, #3498db,
@@ -563,7 +559,7 @@ export default {
max-width: 80%; max-width: 80%;
width: auto; width: auto;
user-select: none; user-select: none;
background-position: 0px 0px, 10px 10px; background-position: 0 0, 10px 10px;
background-size: 20px 20px; background-size: 20px 20px;
background-image: linear-gradient( background-image: linear-gradient(
45deg, 45deg,
+6 -8
View File
@@ -14,10 +14,10 @@
<a-col :span="12"> <a-col :span="12">
<template> <template>
<div v-for="(fileDetail,index) in dataSource[0].fileDetails" :key="index"> <div v-for="(fileDetail,index) in dataSource[0].fileDetails" :key="index">
<div style="float: left;width:104px;height:104px;margin-right: 10px;margin: 0 8px 8px 0;"> <div style="float: left;width:104px;height:104px;margin: 0 8px 8px 0;">
<div <div
style="width: 100%;height: 100%;position: relative;padding: 8px;border: 1px solid #d9d9d9;border-radius: 4px;"> style="width: 100%;height: 100%;position: relative;padding: 8px;border: 1px solid #d9d9d9;border-radius: 4px;">
<img style="width: 100%;" :src="fileDetail.imgUrl" :preview="dataSource[0].key"> <img style="width: 100%;" :src="fileDetail.imgUrl" :preview="dataSource[0].key" alt="">
</div> </div>
</div> </div>
</div> </div>
@@ -37,10 +37,10 @@
<a-col :span="12"> <a-col :span="12">
<template> <template>
<div v-for="(fileDetail,index) in dataSource[1].fileDetails" :key="index"> <div v-for="(fileDetail,index) in dataSource[1].fileDetails" :key="index">
<div style="float: left;width:104px;height:104px;margin-right: 10px;margin: 0 8px 8px 0;"> <div style="float: left;width:104px;height:104px;margin: 0 8px 8px 0;">
<div <div
style="width: 100%;height: 100%;position: relative;padding: 8px;border: 1px solid #d9d9d9;border-radius: 4px;"> style="width: 100%;height: 100%;position: relative;padding: 8px;border: 1px solid #d9d9d9;border-radius: 4px;">
<img style="width: 100%;" :src="fileDetail.imgUrl" :preview="dataSource[1].key"> <img style="width: 100%;" :src="fileDetail.imgUrl" :preview="dataSource[1].key" alt="">
</div> </div>
</div> </div>
</div> </div>
@@ -90,14 +90,12 @@ export default {
] ]
} }
], ],
url: { url: {}
}
} }
}, },
created () { created () {
}, },
methods: { methods: {}
}
} }
</script> </script>
<style scoped> <style scoped>
+3 -3
View File
@@ -2,9 +2,9 @@
<a-card> <a-card>
<draggable @end="end" :options="{animation: 300}" v-model="dataSource" style="display: inline-block"> <draggable @end="end" :options="{animation: 300}" v-model="dataSource" style="display: inline-block">
<template v-for="(data,index) in dataSource"> <template v-for="(data,index) in dataSource">
<div style="float: left;width:150px;height:150px;margin-right: 10px;margin: 0 8px 8px 0;" :key="index"> <div style="float: left;width:150px;height:150px;margin: 0 8px 8px 0;" :key="index">
<div style="width: 100%;height: 100%;position: relative;padding: 8px;border: 1px solid #d9d9d9;border-radius: 4px;"> <div style="width: 100%;height: 100%;position: relative;padding: 8px;border: 1px solid #d9d9d9;border-radius: 4px;">
<img style="width: 100%;" :src="data.filePath" preview="index"> <img style="width: 100%;" :src="data.filePath" preview="index" alt="">
</div> </div>
</div> </div>
</template> </template>
@@ -61,7 +61,7 @@ export default {
console.log('拖动后的位置' + evt.newIndex) console.log('拖动后的位置' + evt.newIndex)
}, },
sureChange () { sureChange () {
for (var i = 0; i < this.dataSource.length; i++) { for (let i = 0; i < this.dataSource.length; i++) {
this.dataSource[i].sort = i this.dataSource[i].sort = i
} }
this.newDateSource = this.dataSource this.newDateSource = this.dataSource
+6 -10
View File
@@ -24,7 +24,7 @@
<span style="margin-left: 15%;font-weight: bolder">{{ navName }}</span> <span style="margin-left: 15%;font-weight: bolder">{{ navName }}</span>
</a-col> </a-col>
<a-col :span="24" style="padding-left: 2%;"> <a-col :span="24" style="padding-left: 2%;">
<img :src="imgUrl" preview> <img :src="imgUrl" preview alt="">
</a-col> </a-col>
</a-row> </a-row>
</a-col> </a-col>
@@ -33,13 +33,9 @@
</template> </template>
<script> <script>
import draggable from 'vuedraggable'
export default { export default {
name: 'ImgTurnPage', name: 'ImgTurnPage',
components: {
draggable
},
data () { data () {
return { return {
description: '图片翻页', description: '图片翻页',
@@ -90,9 +86,9 @@ export default {
}, },
methods: { methods: {
getImgList () { getImgList () {
var count = 0 let count = 0
for (var i = 0; i < this.treeData.length; i++) { for (let i = 0; i < this.treeData.length; i++) {
for (var j = 0; j < this.treeData[i].children.length; j++) { for (let j = 0; j < this.treeData[i].children.length; j++) {
this.imgList.push({ this.imgList.push({
key: this.treeData[i].children[j].key, key: this.treeData[i].children[j].key,
pkey: this.treeData[i].key, pkey: this.treeData[i].key,
@@ -104,8 +100,8 @@ export default {
} }
this.setValue(this.imgList[this.sort]) this.setValue(this.imgList[this.sort])
}, },
onSelect (selectedKeys, info) { onSelect (selectedKeys) {
for (var i = 0; i < this.imgList.length; i++) { for (let i = 0; i < this.imgList.length; i++) {
if (this.imgList[i].key === selectedKeys[0]) { if (this.imgList[i].key === selectedKeys[0]) {
this.sort = this.imgList[i].sort this.sort = this.imgList[i].sort
this.setValue(this.imgList[i]) this.setValue(this.imgList[i])
+10 -8
View File
@@ -1,10 +1,10 @@
<template> <template>
<j-vxe-table <j-vxe-table
ref="vTable" ref="vTable"
toolbar :toolbar="true"
row-number :row-number="true"
row-selection :row-selection="true"
drag-sort :drag-sort="true"
keep-source keep-source
:height="580" :height="580"
:loading="loading" :loading="loading"
@@ -60,7 +60,7 @@ export default {
type: JVXETypes.input, type: JVXETypes.input,
width: '180px', width: '180px',
defaultValue: '', defaultValue: '',
placeholder: '请输入${title}', placeholder: '请输入${title}', // 这是vxe-table的写法
validateRules: [ validateRules: [
{ {
required: true, // 必填 required: true, // 必填
@@ -75,16 +75,18 @@ export default {
message: '${title}不能重复' message: '${title}不能重复'
}, },
{ {
handler ({ cellValue, row, column }, callback, target) { handler ({ cellValue, row, column }, callback) {
// cellValue 当前校验的值 // cellValue 当前校验的值
// callback(flag, message) 方法必须执行且只能执行一次 // callback(flag, message) 方法必须执行且只能执行一次
// flag = 是否通过了校验,不填写或者填写 null 代表不进行任何操作 // flag = 是否通过了校验,不填写或者填写 null 代表不进行任何操作
// message = 提示的类型,默认使用配置的 message // message = 提示的类型,默认使用配置的 message
// target 行编辑的实例对象 // target 行编辑的实例对象
if (cellValue === 'abc') { if (cellValue === 'abc') {
callback(false, '${title}不能是abc') // false = 未通过校验 const flag = false
callback(flag, new Error('${title}不能是abc')) // false = 未通过校验
} else { } else {
callback(true) // true = 通过验证 const flag = true
callback(flag) // true = 通过验证
} }
}, },
message: '${title}默认提示' message: '${title}默认提示'
+10 -10
View File
@@ -1,9 +1,9 @@
<template> <template>
<j-vxe-table <j-vxe-table
ref="vTable" ref="vTable"
toolbar :toolbar="true"
row-number :row-number="true"
row-selection :row-selection="true"
keep-source keep-source
:height="484" :height="484"
:loading="loading" :loading="loading"
@@ -22,7 +22,7 @@
</template> </template>
<script> <script>
import moment from 'moment' // import moment from 'moment'
import { randomNumber, randomUUID } from '@/utils/util' import { randomNumber, randomUUID } from '@/utils/util'
import { JVXETypes } from '@/components/jero/JVxeTable' import { JVXETypes } from '@/components/jero/JVxeTable'
@@ -144,12 +144,12 @@ export default {
this.loading = true this.loading = true
} }
const randomDatetime = () => { // const randomDatetime = () => {
const time = randomNumber(1000, 9999999999999) // const time = randomNumber(1000, 9999999999999)
return moment(new Date(time)).format('YYYY-MM-DD HH:mm:ss') // return moment(new Date(time)).format('YYYY-MM-DD HH:mm:ss')
} // }
//
const limit = (current - 1) * pageSize // const limit = (current - 1) * pageSize
const begin = Date.now() const begin = Date.now()
const values = [] const values = []
@@ -1,9 +1,9 @@
<template> <template>
<j-vxe-table <j-vxe-table
ref="vTable" ref="vTable"
toolbar :toolbar="true"
row-number :row-number="true"
row-selection :row-selection="true"
keep-source keep-source
:height="484" :height="484"
:dataSource="dataSource" :dataSource="dataSource"
@@ -148,7 +148,7 @@ export default {
* 模拟从后台查询数据 * 模拟从后台查询数据
*/ */
requestData (parent) { requestData (parent) {
return new Promise((resolve, reject) => { return new Promise((resolve) => {
const data = this.mockData.filter(i => i.parent === parent) const data = this.mockData.filter(i => i.parent === parent)
setTimeout(() => { setTimeout(() => {
resolve(data) resolve(data)
@@ -158,7 +158,7 @@ export default {
// 模拟加载数据,模拟数据格式不同的情况下如何组装数据 // 模拟加载数据,模拟数据格式不同的情况下如何组装数据
async loadData (parent) { async loadData (parent) {
return new Promise((resolve, reject) => { return new Promise((resolve) => {
const parentId = parent === '' ? '0' : parent const parentId = parent === '' ? '0' : parent
let data = this.mockData1.filter(i => i.parentId === parentId) let data = this.mockData1.filter(i => i.parentId === parentId)
data = data.map(item => { data = data.map(item => {
@@ -7,14 +7,12 @@
3. 在这个事件里面判断数据是否更改如果更改了就调用接口进行保存操作 3. 在这个事件里面判断数据是否更改如果更改了就调用接口进行保存操作
--> -->
<j-vxe-table <j-vxe-table
toolbar :toolbar="true"
:toolbarConfig="toolbarConfig" :toolbarConfig="toolbarConfig"
:row-number="true"
row-number :row-selection="true"
row-selection
keep-source keep-source
async-remove :async-remove="true"
:height="340" :height="340"
:loading="loading" :loading="loading"
:columns="columns" :columns="columns"
@@ -184,7 +182,6 @@ export default {
const { $table, row, column } = event const { $table, row, column } = event
const field = column.property const field = column.property
const cellValue = row[field]
// 判断单元格值是否被修改 // 判断单元格值是否被修改
if ($table.isUpdateByRow(row, field)) { if ($table.isUpdateByRow(row, field)) {
// 校验当前行 // 校验当前行
@@ -16,13 +16,13 @@
--> -->
<j-vxe-table <j-vxe-table
toolbar :toolbar="true"
row-number :row-number="true"
row-selection :row-selection="true"
highlight-current-row highlight-current-row
click-row-show-sub-form :click-row-show-sub-form="true"
click-row-show-main-form :click-row-show-main-form="true"
:height="750" :height="750"
:loading="loading" :loading="loading"
@@ -255,15 +255,16 @@ export default {
if (!errMap) { if (!errMap) {
// 校验子表,如果需要的话,可以操作下面这个对象: // 校验子表,如果需要的话,可以操作下面这个对象:
// this.$refs.subFormTable // this.$refs.subFormTable
const flag = true
callback(true) callback(flag)
this.loading = true this.loading = true
setTimeout(() => { setTimeout(() => {
this.loading = false this.loading = false
this.$message.success('保存成功') this.$message.success('保存成功')
}, 1000) }, 1000)
} else { } else {
callback(false) const flag = false
callback(flag)
this.$message.warn('校验失败') this.$message.warn('校验失败')
} }
}) })
@@ -17,8 +17,8 @@
--> -->
<j-vxe-table <j-vxe-table
ref="table" ref="table"
row-number :row-number="true"
row-selection :row-selection="true"
keep-source keep-source
socket-reload socket-reload
@@ -88,7 +88,6 @@ export default {
const { $table, row, column } = event const { $table, row, column } = event
const field = column.property const field = column.property
const cellValue = row[field]
// 判断单元格值是否被修改 // 判断单元格值是否被修改
if ($table.isUpdateByRow(row, field)) { if ($table.isUpdateByRow(row, field)) {
// 校验当前行 // 校验当前行
@@ -2,14 +2,14 @@
<a-card :bordered="false"> <a-card :bordered="false">
<j-vxe-table <j-vxe-table
toolbar :toolbar="true"
:toolbarConfig="toolbarConfig" :toolbarConfig="toolbarConfig"
row-number :row-number="true"
row-selection :row-selection="true"
row-selection-type="radio" row-selection-type="radio"
highlight-current-row highlight-current-row
click-select-row :click-select-row="true"
:height="tableHeight" :height="tableHeight"
:loading="table1.loading" :loading="table1.loading"
:columns="table1.columns" :columns="table1.columns"
@@ -25,9 +25,9 @@
<a-tabs v-show="subTabs.show" :class="{'sub-tabs':true, 'un-expand': !subTabs.expand}"> <a-tabs v-show="subTabs.show" :class="{'sub-tabs':true, 'un-expand': !subTabs.expand}">
<a-tab-pane tab="子表1" key="1"> <a-tab-pane tab="子表1" key="1">
<j-vxe-table <j-vxe-table
toolbar :toolbar="true"
row-number :row-number="true"
row-selection :row-selection="true"
height="auto" height="auto"
:maxHeight="350" :maxHeight="350"
:loading="table2.loading" :loading="table2.loading"
@@ -4,10 +4,10 @@
<!-- 这里是父级节点 --> <!-- 这里是父级节点 -->
<a-col :span="24" style="margin-bottom: 4px;"> <a-col :span="24" style="margin-bottom: 4px;">
<j-vxe-table <j-vxe-table
toolbar :toolbar="true"
row-number :row-number="true"
row-selection :row-selection="true"
click-select-row :click-select-row="true"
highlight-current-row highlight-current-row
:radio-config="{highlight: false}" :radio-config="{highlight: false}"
:checkbox-config="{highlight: false}" :checkbox-config="{highlight: false}"
@@ -23,10 +23,10 @@
<!-- 这里是子级节点 --> <!-- 这里是子级节点 -->
<a-col :span="12"> <a-col :span="12">
<j-vxe-table <j-vxe-table
toolbar :toolbar="true"
row-number :row-number="true"
row-selection :row-selection="true"
click-select-row :click-select-row="true"
highlight-current-row highlight-current-row
:radio-config="{highlight: false}" :radio-config="{highlight: false}"
:checkbox-config="{highlight: false}" :checkbox-config="{highlight: false}"
@@ -43,9 +43,9 @@
<!-- 这里是孙级节点 --> <!-- 这里是孙级节点 -->
<a-col :span="12"> <a-col :span="12">
<j-vxe-table <j-vxe-table
toolbar :toolbar="true"
row-number :row-number="true"
row-selection :row-selection="true"
:height="340" :height="340"
:loading="table3.loading" :loading="table3.loading"
:columns="table3.columns" :columns="table3.columns"
@@ -100,7 +100,7 @@ export default {
width: '180px', width: '180px',
// 如果加上了该属性,就代表当前单元格是可编辑的,type就是表单的类型,input就是简单的输入框 // 如果加上了该属性,就代表当前单元格是可编辑的,type就是表单的类型,input就是简单的输入框
type: JVXETypes.input, type: JVXETypes.input,
formatter ({ cellValue, row, column }) { formatter ({ cellValue, row }) {
let foo = '' let foo = ''
if (row.company === '佧伒侾佯有限公司') { if (row.company === '佧伒侾佯有限公司') {
foo += '-233' foo += '-233'
@@ -164,7 +164,7 @@ export default {
// 监听器 // 监听器
watch: { watch: {
// 监听table1 【主表】选择的数据发生了变化 // 监听table1 【主表】选择的数据发生了变化
'table1.lastRow' (row) { 'table1.lastRow' () {
this.loadTable2Data() this.loadTable2Data()
}, },
// 监听table2 【子表】选择的数据发生了变化 // 监听table2 【子表】选择的数据发生了变化
@@ -4,10 +4,10 @@
<!-- 左侧父 --> <!-- 左侧父 -->
<a-col :span="12"> <a-col :span="12">
<j-vxe-table <j-vxe-table
toolbar :toolbar="true"
row-number :row-number="true"
row-selection :row-selection="true"
click-select-row :click-select-row="true"
highlight-current-row highlight-current-row
:radio-config="{highlight: false}" :radio-config="{highlight: false}"
:checkbox-config="{highlight: false}" :checkbox-config="{highlight: false}"
@@ -24,7 +24,7 @@
<!-- 左侧选择的数据展示在这里 --> <!-- 左侧选择的数据展示在这里 -->
<j-vxe-table <j-vxe-table
row-number :row-number="true"
:height="381" :height="381"
:columns="table1.columns" :columns="table1.columns"
@@ -34,10 +34,10 @@
<!-- 右下子 --> <!-- 右下子 -->
<j-vxe-table <j-vxe-table
toolbar :toolbar="true"
row-number :row-number="true"
row-selection :row-selection="true"
click-select-row :click-select-row="true"
:height="361" :height="361"
:loading="table2.loading" :loading="table2.loading"
:columns="table2.columns" :columns="table2.columns"
@@ -5,10 +5,10 @@
<a-col :span="12"> <a-col :span="12">
<!-- 左上父 --> <!-- 左上父 -->
<j-vxe-table <j-vxe-table
toolbar :toolbar="true"
row-number :row-number="true"
row-selection :row-selection="true"
click-select-row :click-select-row="true"
highlight-current-row highlight-current-row
:radio-config="{highlight: false}" :radio-config="{highlight: false}"
:checkbox-config="{highlight: false}" :checkbox-config="{highlight: false}"
@@ -24,10 +24,10 @@
<!-- 左下子 --> <!-- 左下子 -->
<j-vxe-table <j-vxe-table
toolbar :toolbar="true"
row-number :row-number="true"
row-selection :row-selection="true"
click-select-row :click-select-row="true"
:height="356" :height="356"
:loading="table2.loading" :loading="table2.loading"
:columns="table2.columns" :columns="table2.columns"
@@ -39,7 +39,7 @@
<!-- 左侧父选择的数据展示在这里 --> <!-- 左侧父选择的数据展示在这里 -->
<a-col :span="12"> <a-col :span="12">
<j-vxe-table <j-vxe-table
row-number :row-number="true"
:height="800" :height="800"
:columns="table1.columns" :columns="table1.columns"
:dataSource="table1.selectedRows" :dataSource="table1.selectedRows"
@@ -128,7 +128,7 @@ export default {
// 监听器 // 监听器
watch: { watch: {
// 监听table1 【主表】选择的数据发生了变化 // 监听table1 【主表】选择的数据发生了变化
'table1.lastRow' (row) { 'table1.lastRow' () {
this.loadTable2Data() this.loadTable2Data()
} }
}, },
@@ -5,10 +5,10 @@
<a-col :span="12"> <a-col :span="12">
<!-- 左上父 --> <!-- 左上父 -->
<j-vxe-table <j-vxe-table
toolbar :toolbar="true"
row-number :row-number="true"
row-selection :row-selection="true"
click-select-row :click-select-row="true"
highlight-current-row highlight-current-row
:radio-config="{highlight: false}" :radio-config="{highlight: false}"
:checkbox-config="{highlight: false}" :checkbox-config="{highlight: false}"
@@ -23,10 +23,10 @@
/> />
<!-- 左下子 --> <!-- 左下子 -->
<j-vxe-table <j-vxe-table
toolbar :toolbar="true"
row-number :row-number="true"
row-selection :row-selection="true"
click-select-row :click-select-row="true"
:height="350" :height="350"
:loading="table2.loading" :loading="table2.loading"
:columns="table2.columns" :columns="table2.columns"
@@ -39,9 +39,9 @@
<a-col :span="12"> <a-col :span="12">
<!-- 右上父 --> <!-- 右上父 -->
<j-vxe-table <j-vxe-table
row-number :row-number="true"
row-selection :row-selection="true"
click-select-row :click-select-row="true"
highlight-current-row highlight-current-row
:radio-config="{highlight: false}" :radio-config="{highlight: false}"
:checkbox-config="{highlight: false}" :checkbox-config="{highlight: false}"
@@ -53,10 +53,10 @@
/> />
<!-- 右下子 --> <!-- 右下子 -->
<j-vxe-table <j-vxe-table
toolbar :toolbar="true"
row-number :row-number="true"
row-selection :row-selection="true"
click-select-row :click-select-row="true"
:height="350" :height="350"
:loading="table4.loading" :loading="table4.loading"
:columns="table4.columns" :columns="table4.columns"
@@ -272,7 +272,6 @@ export default {
// 加载table4右下【子表】的数据,根据主表的id进行查询 // 加载table4右下【子表】的数据,根据主表的id进行查询
loadTable4Data () { loadTable4Data () {
const parentIds = []
// 如果主表没有选择,则不查询 // 如果主表没有选择,则不查询
const selectedRows = this.table3.selectedRows const selectedRows = this.table3.selectedRows
if (!selectedRows || selectedRows.length === 0) { if (!selectedRows || selectedRows.length === 0) {
@@ -7,7 +7,7 @@
<a-tree <a-tree
class="template-5-tree" class="template-5-tree"
:tree-data="treeData" :tree-data="treeData"
show-icon :show-icon="true"
show-line show-line
:expandedKeys="treeExpandedKeys" :expandedKeys="treeExpandedKeys"
:selectedKeys="[pagination.current]" :selectedKeys="[pagination.current]"
@@ -20,8 +20,8 @@
</a-col> </a-col>
<a-col :span="18"> <a-col :span="18">
<j-vxe-table <j-vxe-table
row-number :row-number="true"
row-selection :row-selection="true"
:height="750" :height="750"
:loading="loading" :loading="loading"
:columns="columns" :columns="columns"
+18 -26
View File
@@ -90,9 +90,9 @@
<template slot="content"> <template slot="content">
<a-checkbox-group @change="onColSettingsChange" v-model="settingColumns" :defaultValue="settingColumns"> <a-checkbox-group @change="onColSettingsChange" v-model="settingColumns" :defaultValue="settingColumns">
<a-row style="width: 400px"> <a-row style="width: 400px">
<template v-for="(item,index) in defColumns"> <template v-for="(item, i) in defColumns">
<template v-if="item.key!='rowIndex'&& item.dataIndex!='action'"> <template v-if="item.key + '' !== 'rowIndex'&& item.dataIndex + '' !== 'action'">
<a-col :span="12"><a-checkbox :value="item.dataIndex"><j-ellipsis :value="item.title" :length="10"></j-ellipsis></a-checkbox></a-col> <a-col :key="i" :span="12"><a-checkbox :value="item.dataIndex"><j-ellipsis :value="item.title" :length="10"></j-ellipsis></a-checkbox></a-col>
</template> </template>
</template> </template>
</a-row> </a-row>
@@ -119,9 +119,9 @@
<a-card> <a-card>
<a-checkbox-group @change="onColSettingsChange" v-model="settingColumns" :defaultValue="settingColumns"> <a-checkbox-group @change="onColSettingsChange" v-model="settingColumns" :defaultValue="settingColumns">
<a-row style="width: 400px"> <a-row style="width: 400px">
<template v-for="(item,index) in defColumns"> <template v-for="(item, i) in defColumns">
<template v-if="item.key!='rowIndex'&& item.dataIndex!='action'"> <template v-if="item.key + '' !=='rowIndex'&& item.dataIndex + '' !== 'action'">
<a-col :span="12"><a-checkbox :value="item.dataIndex"><j-ellipsis :value="item.title" :length="10"></j-ellipsis></a-checkbox></a-col> <a-col :key="i" :span="12"><a-checkbox :value="item.dataIndex"><j-ellipsis :value="item.title" :length="10"></j-ellipsis></a-checkbox></a-col>
</template> </template>
</template> </template>
</a-row> </a-row>
@@ -164,7 +164,7 @@ import JeroDemoModal from './modules/JeroDemoModal'
import JSuperQuery from '@/components/jero/JSuperQuery.vue' import JSuperQuery from '@/components/jero/JSuperQuery.vue'
import JInput from '@/components/jero/JInput.vue' import JInput from '@/components/jero/JInput.vue'
import JeroDemoTabsModal from './modules/JeroDemoTabsModal' import JeroDemoTabsModal from './modules/JeroDemoTabsModal'
import { initDictOptions, filterDictText, filterDictTextByCache } from '@/components/dict/JDictSelectUtil' import { filterDictTextByCache, initDictOptions } from '@/components/dict/JDictSelectUtil'
import { JeroListMixin } from '@/mixins/JeroListMixin' import { JeroListMixin } from '@/mixins/JeroListMixin'
import Vue from 'vue' import Vue from 'vue'
import { filterObj } from '@/utils/util' import { filterObj } from '@/utils/util'
@@ -288,7 +288,7 @@ export default {
sqp.superQueryParams = encodeURI(this.superQueryParams) sqp.superQueryParams = encodeURI(this.superQueryParams)
sqp.superQueryMatchType = this.superQueryMatchType sqp.superQueryMatchType = this.superQueryMatchType
} }
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters) const param = Object.assign(sqp, this.queryParam, this.isorter, this.filters)
param.field = this.getQueryField() param.field = this.getQueryField()
param.pageNo = this.ipagination.current param.pageNo = this.ipagination.current
@@ -320,45 +320,37 @@ export default {
}, },
// 列设置更改事件 // 列设置更改事件
onColSettingsChange (checkedValues) { onColSettingsChange (checkedValues) {
var key = this.$route.name + ':colsettings' const key = this.$route.name + ':colsettings'
Vue.ls.set(key, checkedValues, 7 * 24 * 60 * 60 * 1000) Vue.ls.set(key, checkedValues, 7 * 24 * 60 * 60 * 1000)
this.settingColumns = checkedValues this.settingColumns = checkedValues
const cols = this.defColumns.filter(item => { this.columns = this.defColumns.filter(item => {
if (item.key == 'rowIndex' || item.dataIndex == 'action') { if (item.key + '' === 'rowIndex' || item.dataIndex + '' === 'action') {
return true return true
} }
if (this.settingColumns.includes(item.dataIndex)) { return this.settingColumns.includes(item.dataIndex)
return true
}
return false
}) })
this.columns = cols
}, },
initColumns () { initColumns () {
// 权限过滤(列权限控制时打开,修改第二个参数为授权码前缀) // 权限过滤(列权限控制时打开,修改第二个参数为授权码前缀)
// this.defColumns = colAuthFilter(this.defColumns,'testdemo:'); // this.defColumns = colAuthFilter(this.defColumns,'testdemo:');
var key = this.$route.name + ':colsettings' const key = this.$route.name + ':colsettings'
const colSettings = Vue.ls.get(key) const colSettings = Vue.ls.get(key)
if (colSettings == null || colSettings == undefined) { if (colSettings === null || colSettings === undefined) {
const allSettingColumns = [] const allSettingColumns = []
this.defColumns.forEach(function (item, i, array) { this.defColumns.forEach(function (item) {
allSettingColumns.push(item.dataIndex) allSettingColumns.push(item.dataIndex)
}) })
this.settingColumns = allSettingColumns this.settingColumns = allSettingColumns
this.columns = this.defColumns this.columns = this.defColumns
} else { } else {
this.settingColumns = colSettings this.settingColumns = colSettings
const cols = this.defColumns.filter(item => { this.columns = this.defColumns.filter(item => {
if (item.key == 'rowIndex' || item.dataIndex == 'action') { if (item.key + '' === 'rowIndex' || item.dataIndex + '' === 'action') {
return true return true
} }
if (colSettings.includes(item.dataIndex)) { return !!colSettings.includes(item.dataIndex)
return true
}
return false
}) })
this.columns = cols
} }
} }
}, },
@@ -126,7 +126,7 @@ export default {
title: '订单类型', title: '订单类型',
align: 'center', align: 'center',
dataIndex: 'ctype', dataIndex: 'ctype',
customRender: (text, record, index) => { customRender: (text) => {
let re = '' let re = ''
if (text === '1') { if (text === '1') {
re = '国内订单' re = '国内订单'
@@ -51,9 +51,9 @@
<a-tab-pane tab="客户信息" key="1" :forceRender="true"> <a-tab-pane tab="客户信息" key="1" :forceRender="true">
<j-vxe-table <j-vxe-table
ref="editableTable1" ref="editableTable1"
toolbar :toolbar="true"
row-number :row-number="true"
row-selection :row-selection="true"
keep-source keep-source
:height="300" :height="300"
:loading="table1.loading" :loading="table1.loading"
@@ -66,9 +66,9 @@
<a-tab-pane tab="机票信息" key="2" :forceRender="true"> <a-tab-pane tab="机票信息" key="2" :forceRender="true">
<j-vxe-table <j-vxe-table
ref="editableTable2" ref="editableTable2"
toolbar :toolbar="true"
row-number :row-number="true"
row-selection :row-selection="true"
keep-source keep-source
:height="300" :height="300"
:loading="table2.loading" :loading="table2.loading"
@@ -84,17 +84,12 @@
<script> <script>
import JEditableTable from '@/components/jero/JEditableTable'
import { VALIDATE_FAILED, getRefPromise, validateFormModelAndTables } from '@/components/jero/JVxeTable/utils/vxeUtils' import { VALIDATE_FAILED, getRefPromise, validateFormModelAndTables } from '@/components/jero/JVxeTable/utils/vxeUtils'
import { httpAction, getAction } from '@/api/manage' import { httpAction, getAction } from '@/api/manage'
import { JVXETypes } from '@/components/jero/JVxeTable' import { JVXETypes } from '@/components/jero/JVxeTable'
import JDate from '@/components/jero/JDate'
export default { export default {
name: 'jeroOrderModalForJvexTable', name: 'jeroOrderModalForJvexTable',
components: {
JDate, JEditableTable
},
data () { data () {
return { return {
title: '操作', title: '操作',
@@ -227,7 +222,7 @@ export default {
}, },
close () { close () {
this.visible = false this.visible = false
this.getAllTable().then(editableTables => { this.getAllTable().then(() => {
this.table1.dataSource = [] this.table1.dataSource = []
this.table2.dataSource = [] this.table2.dataSource = []
}) })
+2 -2
View File
@@ -21,9 +21,9 @@
<!-- 预览区域 --> <!-- 预览区域 -->
<a-col :span="24"> <a-col :span="24">
<template v-if="file.filePdfPath"> <template v-if="file.filePdfPath">
<div style="float: left;width:104px;height:104px;margin-right: 10px;margin: 0 8px 8px 0;"> <div style="float: left;width:104px;height:104px;margin: 0 8px 8px 0;">
<div style="width: 100%;height: 100%;position: relative;padding: 8px;" @click="pdfPreview(file.title)"> <div style="width: 100%;height: 100%;position: relative;padding: 8px;" @click="pdfPreview(file.title)">
<img style="width: 100%;" src="~@/assets/pdf4.jpg"> <img style="width: 100%;" src="~@/assets/pdf4.jpg" alt="">
</div> </div>
</div> </div>
</template> </template>
+3 -1
View File
@@ -58,7 +58,9 @@ export default {
// https://vue.ant.design/components/table-cn/#rowSelection // https://vue.ant.design/components/table-cn/#rowSelection
rowSelection: { rowSelection: {
selectedRowKeys: _this.selectedRowKeys, selectedRowKeys: _this.selectedRowKeys,
onChange: (selectedRowKeys) => _this.selectedRowKeys = selectedRowKeys onChange: (selectedRowKeys) => {
_this.selectedRowKeys = selectedRowKeys
}
} }
} }
} }
+6 -10
View File
@@ -54,13 +54,9 @@
</template> </template>
<script> <script>
import ACol from 'ant-design-vue/es/grid/Col' import ACol from 'ant-design-vue/es/grid/Col'
import ARow from 'ant-design-vue/es/grid/Row'
import ATextarea from 'ant-design-vue/es/input/TextArea'
export default { export default {
components: { components: {
ATextarea,
ARow,
ACol ACol
}, },
name: 'Printgzsld', name: 'Printgzsld',
@@ -140,10 +136,10 @@ export default {
/*update_end author:scott date:20191203 for:打印机打印的字体模糊问题 */ /*update_end author:scott date:20191203 for:打印机打印的字体模糊问题 */
.abcdefg .ant-card-body{ .abcdefg .ant-card-body{
margin-left: 0%; margin-left: 0;
margin-right: 0%; margin-right: 0;
margin-bottom: 1%; margin-bottom: 1%;
border:0px solid black; border:0 solid black;
min-width: 800px; min-width: 800px;
color:#000000!important; color:#000000!important;
} }
@@ -155,9 +151,9 @@ export default {
.explain .ant-input,.sign .ant-input{ .explain .ant-input,.sign .ant-input{
font-weight:bolder; font-weight:bolder;
text-align:center; text-align:center;
border-left-width:0px!important; border-left-width:0 !important;
border-top-width:0px!important; border-top-width:0 !important;
border-right-width:0px!important; border-right-width:0 !important;
} }
.explain div{ .explain div{
margin-bottom: 10px; margin-bottom: 10px;
+6 -6
View File
@@ -57,10 +57,10 @@ export default {
attrs: {} attrs: {}
} }
// 当前列跨行的条数 // 当前列跨行的条数
var a = parseInt(this.levelNum) const a = parseInt(this.levelNum)
var b = parseInt(this.gridNum) * parseInt(this.boxNum) const b = parseInt(this.gridNum) * parseInt(this.boxNum)
console.log(a) console.log(a)
for (var c = 0; c <= a; c++) { for (let c = 0; c <= a; c++) {
if (index === (c * b)) { if (index === (c * b)) {
console.log(1) console.log(1)
console.log(c * b) console.log(c * b)
@@ -82,9 +82,9 @@ export default {
children: value, children: value,
attrs: {} attrs: {}
} }
var a = parseInt(this.levelNum) * parseInt(this.gridNum) const a = parseInt(this.levelNum) * parseInt(this.gridNum)
var b = parseInt(this.boxNum) const b = parseInt(this.boxNum)
for (var c = 0; c <= a; c++) { for (let c = 0; c <= a; c++) {
if (index === (c * b)) { if (index === (c * b)) {
obj.attrs.rowSpan = b obj.attrs.rowSpan = b
break break
+3 -7
View File
@@ -325,7 +325,7 @@
<!-- 定义的当有高级查询条件生效状态下的按钮 --> <!-- 定义的当有高级查询条件生效状态下的按钮 -->
<a-button-group v-else> <a-button-group v-else>
<a-button type="primary" ghost @click="open()"> <a-button type="primary" ghost @click="open()">
<a-icon type="plus-circle" spin/> <a-icon type="plus-circle" :spin="true"/>
<span>高级查询</span> <span>高级查询</span>
</a-button> </a-button>
<a-button v-if="isMobile" type="primary" ghost icon="delete" @click="reset()"/> <a-button v-if="isMobile" type="primary" ghost icon="delete" @click="reset()"/>
@@ -460,7 +460,6 @@ import JEllipsis from '@/components/jero/JEllipsis'
import JSlider from '@/components/jero/JSlider' import JSlider from '@/components/jero/JSlider'
import JSelectMultiple from '@/components/jero/JSelectMultiple' import JSelectMultiple from '@/components/jero/JSelectMultiple'
import JTreeDict from '../../components/jero/JTreeDict.vue' import JTreeDict from '../../components/jero/JTreeDict.vue'
import JCron from '@/components/jero/JCron.vue'
import JEasyCron from '@/components/jero/JEasyCron' import JEasyCron from '@/components/jero/JEasyCron'
import JTreeSelect from '@/components/jero/JTreeSelect' import JTreeSelect from '@/components/jero/JTreeSelect'
import JSuperQuery from '@/components/jero/JSuperQuery' import JSuperQuery from '@/components/jero/JSuperQuery'
@@ -473,7 +472,6 @@ import JAreaLinkage from '@comp/jero/JAreaLinkage'
import JMarkdownEditor from '@/components/jero/JMarkdownEditor/index' import JMarkdownEditor from '@/components/jero/JMarkdownEditor/index'
import JSearchSelectTag from '@/components/dict/JSearchSelectTag' import JSearchSelectTag from '@/components/dict/JSearchSelectTag'
import JSwitch from '@/components/jero/JSwitch.vue' import JSwitch from '@/components/jero/JSwitch.vue'
import JImportModal from '@/components/jero/JImportModal.vue'
import JTime from '@/components/jero/JTime.vue' import JTime from '@/components/jero/JTime.vue'
export default { export default {
@@ -499,14 +497,12 @@ export default {
JEllipsis, JEllipsis,
JSlider, JSlider,
JSelectMultiple, JSelectMultiple,
JCron,
JEasyCron, JEasyCron,
JTreeSelect, JTreeSelect,
JSuperQuery, JSuperQuery,
JMultiSelectTag, JMultiSelectTag,
JSearchSelectTag, JSearchSelectTag,
JSwitch, JSwitch,
JImportModal,
JTime JTime
}, },
data () { data () {
@@ -599,8 +595,8 @@ export default {
}, },
computed: { computed: {
nameList: function () { nameList: function () {
var names = [] let names = []
for (var a = 0; a < this.selectList.length; a++) { for (let a = 0; a < this.selectList.length; a++) {
names.push(this.selectList[a].name) names.push(this.selectList[a].name)
} }
return names return names
+2 -3
View File
@@ -77,7 +77,6 @@
</span> </span>
<a-table <a-table
slot="expandedRowRender" slot="expandedRowRender"
slot-scope="text"
:columns="innerColumns" :columns="innerColumns"
:dataSource="innerData" :dataSource="innerData"
size="middle" size="middle"
@@ -123,9 +122,9 @@ export default {
align: 'center', align: 'center',
dataIndex: 'sex', dataIndex: 'sex',
customRender: function (text) { customRender: function (text) {
if (text == 1) { if (text + '' === '1') {
return '男' return '男'
} else if (text == 2) { } else if (text + '' === '2') {
return '女' return '女'
} else { } else {
return text return text
+6 -6
View File
@@ -109,7 +109,7 @@ export default {
dataSource.push(totalRow) dataSource.push(totalRow)
}, },
handleTableChange (pagination, filters, sorter) { handleTableChange (pagination) {
this.ipagination = pagination this.ipagination = pagination
}, },
/* 如果分页走这个方法 */ /* 如果分页走这个方法 */
@@ -126,15 +126,15 @@ export default {
this.newArr.push(this.newDataSource.slice(index, (i + 1))) this.newArr.push(this.newDataSource.slice(index, (i + 1)))
} }
} }
var arrs = this.newArr const arrs = this.newArr
for (let i = 0; i < arrs.length; i++) { for (let i = 0; i < arrs.length; i++) {
const arr = arrs[i] const arr = arrs[i]
const newArr = { } const newArr = { }
newArr.name = '-' newArr.name = '-'
newArr.updateTime = '-' newArr.updateTime = '-'
newArr.rowIndex = '合计' newArr.rowIndex = '合计'
var level = 0 let level = 0
var point = 0 let point = 0
for (let j = 0; j < arr.length; j++) { for (let j = 0; j < arr.length; j++) {
level += arr[j].level level += arr[j].level
point += arr[j].point point += arr[j].point
@@ -143,10 +143,10 @@ export default {
newArr.point = point newArr.point = point
arrs[i].push(newArr) arrs[i].push(newArr)
} }
var newDataSource = [] let newDataSource = []
for (let i = 0; i < arrs.length; i++) { for (let i = 0; i < arrs.length; i++) {
const arr = arrs[i] const arr = arrs[i]
for (var j in arr) { for (const j in arr) {
newDataSource.push(arr[j]) newDataSource.push(arr[j])
} }
} }
@@ -15,7 +15,7 @@
:dataSource="data" :dataSource="data"
:pagination="false" :pagination="false"
> >
<template v-for="(col, i) in ['name', 'workId', 'department']" :slot="col" slot-scope="text, record, index"> <template v-for="(col, i) in ['name', 'workId', 'department']" :slot="col" slot-scope="text, record">
<a-input <a-input
:key="col" :key="col"
v-if="record.editable" v-if="record.editable"
@@ -26,7 +26,7 @@
/> />
<template v-else>{{ text }}</template> <template v-else>{{ text }}</template>
</template> </template>
<template slot="operation" slot-scope="text, record, index"> <template slot="operation" slot-scope="text, record">
<template v-if="record.editable"> <template v-if="record.editable">
<span v-if="record.isNew"> <span v-if="record.isNew">
<a @click="saveRow(record.key)">添加</a> <a @click="saveRow(record.key)">添加</a>
@@ -147,8 +147,7 @@ export default {
}) })
}, },
remove (key) { remove (key) {
const newData = this.data.filter(item => item.key !== key) this.data = this.data.filter(item => item.key !== key)
this.data = newData
}, },
saveRow (key) { saveRow (key) {
const target = this.data.filter(item => item.key === key)[0] const target = this.data.filter(item => item.key === key)[0]
@@ -46,13 +46,13 @@
</a> </a>
<a-menu slot="overlay"> <a-menu slot="overlay">
<a-menu-item> <a-menu-item>
<a href="javascript:;">详情</a> <a href="javascript:">详情</a>
</a-menu-item> </a-menu-item>
<a-menu-item> <a-menu-item>
<a href="javascript:;">禁用</a> <a href="javascript:">禁用</a>
</a-menu-item> </a-menu-item>
<a-menu-item> <a-menu-item>
<a href="javascript:;">删除</a> <a href="javascript:">删除</a>
</a-menu-item> </a-menu-item>
</a-menu> </a-menu>
</a-dropdown> </a-dropdown>
@@ -71,7 +71,7 @@
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
label="唯一识别码" label="唯一识别码"
hasFeedback :hasFeedback="true"
validateStatus="success" validateStatus="success"
> >
<a-input placeholder="唯一识别码" v-model="mdl.id" id="no" disabled="disabled" /> <a-input placeholder="唯一识别码" v-model="mdl.id" id="no" disabled="disabled" />
@@ -81,7 +81,7 @@
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
label="权限名称" label="权限名称"
hasFeedback :hasFeedback="true"
validateStatus="success" validateStatus="success"
> >
<a-input placeholder="起一个名字" v-model="mdl.name" id="permission_name" /> <a-input placeholder="起一个名字" v-model="mdl.name" id="permission_name" />
@@ -91,7 +91,7 @@
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
label="状态" label="状态"
hasFeedback :hasFeedback="true"
validateStatus="warning" validateStatus="warning"
> >
<a-select v-model="mdl.status"> <a-select v-model="mdl.status">
@@ -104,7 +104,7 @@
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
label="描述" label="描述"
hasFeedback :hasFeedback="true"
> >
<a-textarea :rows="5" v-model="mdl.describe" placeholder="..." id="describe"/> <a-textarea :rows="5" v-model="mdl.describe" placeholder="..." id="describe"/>
</a-form-item> </a-form-item>
@@ -115,7 +115,7 @@
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
label="赋予权限" label="赋予权限"
hasFeedback :hasFeedback="true"
> >
<a-select <a-select
style="width: 100%" style="width: 100%"
@@ -65,12 +65,19 @@
<a-button type="primary" icon="plus" @click="() => this.handleModalVisible(true)">新建</a-button> <a-button type="primary" icon="plus" @click="() => this.handleModalVisible(true)">新建</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0"> <a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay"> <a-menu slot="overlay">
<a-menu-item key="1"><a-icon type="delete" />删除</a-menu-item> <a-menu-item key="1">
<a-icon type="delete" />
删除
</a-menu-item>
<!-- lock | unlock --> <!-- lock | unlock -->
<a-menu-item key="2"><a-icon type="lock" />锁定</a-menu-item> <a-menu-item key="2">
<a-icon type="lock" />
锁定
</a-menu-item>
</a-menu> </a-menu>
<a-button style="margin-left: 8px"> <a-button style="margin-left: 8px">
批量操作 <a-icon type="down" /> 批量操作
<a-icon type="down" />
</a-button> </a-button>
</a-dropdown> </a-dropdown>
</div> </div>
@@ -83,8 +90,8 @@
:showAlertInfo="true" :showAlertInfo="true"
@onSelect="onChange" @onSelect="onChange"
> >
<template v-for="(col, index) in columns" v-if="col.scopedSlots" :slot="col.dataIndex" slot-scope="text, record, index"> <template v-for="(col, index) in columns" :slot="col.dataIndex" slot-scope="text, record">
<div :key="index"> <div :key="index" v-if="col.scopedSlots">
<a-input <a-input
v-if="record.editable" v-if="record.editable"
style="margin: -5px 0" style="margin: -5px 0"
@@ -94,7 +101,7 @@
<template v-else>{{ text }}</template> <template v-else>{{ text }}</template>
</div> </div>
</template> </template>
<template slot="action" slot-scope="text, record, index"> <template slot="action" slot-scope="text, record">
<div class="editable-row-operations"> <div class="editable-row-operations">
<span v-if="record.editable"> <span v-if="record.editable">
<a @click="() => save(record)">保存</a> <a @click="() => save(record)">保存</a>
@@ -114,7 +121,8 @@
<a-modal title="新建规则" destroyOnClose :visible="visibleCreateModal" @ok="handleCreateModalOk" @cancel="handleCreateModalCancel"> <a-modal title="新建规则" destroyOnClose :visible="visibleCreateModal" @ok="handleCreateModalOk" @cancel="handleCreateModalCancel">
<!----> <!---->
<a-form style="margin-top: 8px" :autoFormCreate="(form)=>{this.createForm = form}"> <a-form style="margin-top: 8px" :autoFormCreate="(form)=>{this.createForm = form}">
<a-form-item :labelCol="{ span: 5 }" :wrapperCol="{ span: 15 }" label="描述" fieldDecoratorId="description" :fieldDecoratorOptions="{rules: [{ required: true, message: '请输入至少五个字符的规则描述', min: 5 }]}"> <a-form-item :labelCol="{ span: 5 }" :wrapperCol="{ span: 15 }" label="描述" fieldDecoratorId="description"
:fieldDecoratorOptions="{rules: [{ required: true, message: '请输入至少五个字符的规则描述', min: 5 }]}">
<a-input placeholder="请输入" /> <a-input placeholder="请输入" />
</a-form-item> </a-form-item>
</a-form> </a-form>
+11 -11
View File
@@ -92,13 +92,13 @@
</a> </a>
<a-menu slot="overlay"> <a-menu slot="overlay">
<a-menu-item> <a-menu-item>
<a href="javascript:;">详情</a> <a href="javascript:">详情</a>
</a-menu-item> </a-menu-item>
<a-menu-item> <a-menu-item>
<a href="javascript:;">禁用</a> <a href="javascript:">禁用</a>
</a-menu-item> </a-menu-item>
<a-menu-item> <a-menu-item>
<a href="javascript:;">删除</a> <a href="javascript:">删除</a>
</a-menu-item> </a-menu-item>
</a-menu> </a-menu>
</a-dropdown> </a-dropdown>
@@ -117,7 +117,7 @@
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
label="规则编号" label="规则编号"
hasFeedback :hasFeedback="true"
validateStatus="success" validateStatus="success"
> >
<a-input placeholder="规则编号" v-model="mdl.no" id="no" /> <a-input placeholder="规则编号" v-model="mdl.no" id="no" />
@@ -127,7 +127,7 @@
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
label="服务调用次数" label="服务调用次数"
hasFeedback :hasFeedback="true"
validateStatus="success" validateStatus="success"
> >
<a-input-number :min="1" id="callNo" v-model="mdl.callNo" style="width: 100%" /> <a-input-number :min="1" id="callNo" v-model="mdl.callNo" style="width: 100%" />
@@ -137,7 +137,7 @@
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
label="状态" label="状态"
hasFeedback :hasFeedback="true"
validateStatus="warning" validateStatus="warning"
> >
<a-select defaultValue="1" v-model="mdl.status"> <a-select defaultValue="1" v-model="mdl.status">
@@ -151,7 +151,7 @@
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
label="描述" label="描述"
hasFeedback :hasFeedback="true"
help="请填写一段描述" help="请填写一段描述"
> >
<a-textarea :rows="5" v-model="mdl.description" placeholder="..." id="description"/> <a-textarea :rows="5" v-model="mdl.description" placeholder="..." id="description"/>
@@ -161,7 +161,7 @@
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
label="更新时间" label="更新时间"
hasFeedback :hasFeedback="true"
validateStatus="error" validateStatus="error"
> >
<a-date-picker <a-date-picker
@@ -285,17 +285,17 @@ export default {
this.visibleCreateModal = isVisible this.visibleCreateModal = isVisible
}, },
handleCreateModalOk () { handleCreateModalOk () {
this.createForm.validateFields((err, fieldsValue) => { this.createForm.validateFields((err) => {
if (err) { if (err) {
return return
} }
const description = this.createForm.getFieldValue('description') const description = this.createForm.getFieldValue('description')
axios.post('/saveRule', { axios.post('/saveRule', {
desc: description desc: description
}).then((res) => { }).then(() => {
this.createForm.resetFields() this.createForm.resetFields()
this.visibleCreateModal = false this.visibleCreateModal = false
this.loadRuleData() // this.loadRuleData()
}) })
}) })
}, },
+8 -8
View File
@@ -59,13 +59,13 @@
</a> </a>
<a-menu slot="overlay"> <a-menu slot="overlay">
<a-menu-item> <a-menu-item>
<a href="javascript:;">详情</a> <a href="javascript:">详情</a>
</a-menu-item> </a-menu-item>
<a-menu-item> <a-menu-item>
<a href="javascript:;">禁用</a> <a href="javascript:">禁用</a>
</a-menu-item> </a-menu-item>
<a-menu-item> <a-menu-item>
<a href="javascript:;">删除</a> <a href="javascript:">删除</a>
</a-menu-item> </a-menu-item>
</a-menu> </a-menu>
</a-dropdown> </a-dropdown>
@@ -85,7 +85,7 @@
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
label="唯一识别码" label="唯一识别码"
hasFeedback :hasFeedback="true"
validateStatus="success" validateStatus="success"
> >
<a-input placeholder="唯一识别码" v-model="mdl.id" id="no" disabled="disabled" /> <a-input placeholder="唯一识别码" v-model="mdl.id" id="no" disabled="disabled" />
@@ -95,7 +95,7 @@
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
label="角色名称" label="角色名称"
hasFeedback :hasFeedback="true"
validateStatus="success" validateStatus="success"
> >
<a-input placeholder="起一个名字" v-model="mdl.name" id="role_name" /> <a-input placeholder="起一个名字" v-model="mdl.name" id="role_name" />
@@ -105,7 +105,7 @@
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
label="状态" label="状态"
hasFeedback :hasFeedback="true"
validateStatus="warning" validateStatus="warning"
> >
<a-select v-model="mdl.status"> <a-select v-model="mdl.status">
@@ -118,7 +118,7 @@
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
label="描述" label="描述"
hasFeedback :hasFeedback="true"
> >
<a-textarea :rows="5" v-model="mdl.describe" placeholder="..." id="describe"/> <a-textarea :rows="5" v-model="mdl.describe" placeholder="..." id="describe"/>
</a-form-item> </a-form-item>
@@ -129,7 +129,7 @@
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
label="拥有权限" label="拥有权限"
hasFeedback :hasFeedback="true"
> >
<a-row :gutter="16" v-for="(permission, index) in mdl.permissions" :key="index"> <a-row :gutter="16" v-for="(permission, index) in mdl.permissions" :key="index">
<a-col :span="4"> <a-col :span="4">
@@ -14,7 +14,7 @@
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
label="唯一识别码" label="唯一识别码"
hasFeedback :hasFeedback="true"
> >
<a-input placeholder="唯一识别码" disabled="disabled" v-decorator="[ 'id', {rules: []} ]" /> <a-input placeholder="唯一识别码" disabled="disabled" v-decorator="[ 'id', {rules: []} ]" />
</a-form-item> </a-form-item>
@@ -23,7 +23,7 @@
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
label="角色名称" label="角色名称"
hasFeedback > :hasFeedback="true" >
<a-input placeholder="起一个名字" v-decorator="[ 'name', {rules: [{ required: true, message: '不起一个名字吗?' }] }]" /> <a-input placeholder="起一个名字" v-decorator="[ 'name', {rules: [{ required: true, message: '不起一个名字吗?' }] }]" />
</a-form-item> </a-form-item>
@@ -31,7 +31,7 @@
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
label="状态" label="状态"
hasFeedback > :hasFeedback="true" >
<a-select v-decorator="[ 'status', {rules: []} ]"> <a-select v-decorator="[ 'status', {rules: []} ]">
<a-select-option :value="1">正常</a-select-option> <a-select-option :value="1">正常</a-select-option>
<a-select-option :value="2">禁用</a-select-option> <a-select-option :value="2">禁用</a-select-option>
@@ -42,7 +42,7 @@
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
label="描述" label="描述"
hasFeedback :hasFeedback="true"
> >
<a-textarea :rows="5" placeholder="..." v-decorator="[ 'describe', { rules: [] } ]" /> <a-textarea :rows="5" placeholder="..." v-decorator="[ 'describe', { rules: [] } ]" />
</a-form-item> </a-form-item>
@@ -53,7 +53,7 @@
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
label="拥有权限" label="拥有权限"
hasFeedback :hasFeedback="true"
> >
<a-row :gutter="16" v-for="(permission, index) in permissions" :key="index"> <a-row :gutter="16" v-for="(permission, index) in permissions" :key="index">
<a-col :span="4"> <a-col :span="4">
@@ -67,7 +67,7 @@ export default {
message: '${title}不能重复' message: '${title}不能重复'
}, },
{ {
handler (type, value, row, column, callback, target) { handler (type, value, row, column, callback) {
// type 触发校验的类型(input、change、blur // type 触发校验的类型(input、change、blur
// value 当前校验的值 // value 当前校验的值
// callback(flag, message) 方法必须执行且只能执行一次 // callback(flag, message) 方法必须执行且只能执行一次
@@ -77,12 +77,15 @@ export default {
if (type === 'blur') { if (type === 'blur') {
if (value === 'abc') { if (value === 'abc') {
callback(false, '${title}不能是abc') // false = 未通过校验 const flag = false
callback(flag, '${title}不能是abc') // false = 未通过校验
} else { } else {
callback(true) // true = 通过验证 const flag = true
callback(flag) // true = 通过验证
} }
} else { } else {
callback(true) // 不填写或者填写 null 代表不进行任何操作 const flag = true
callback(flag) // 不填写或者填写 null 代表不进行任何操作
} }
}, },
message: '${title}默认提示' message: '${title}默认提示'
@@ -51,9 +51,9 @@
<a-tab-pane tab="客户信息" key="1" :forceRender="true"> <a-tab-pane tab="客户信息" key="1" :forceRender="true">
<j-vxe-table <j-vxe-table
ref="editableTable1" ref="editableTable1"
toolbar :toolbar="true"
row-number :row-number="true"
row-selection :row-selection="true"
keep-source keep-source
:height="300" :height="300"
:loading="table1.loading" :loading="table1.loading"
@@ -66,9 +66,9 @@
<a-tab-pane tab="机票信息" key="2" :forceRender="true"> <a-tab-pane tab="机票信息" key="2" :forceRender="true">
<j-vxe-table <j-vxe-table
ref="editableTable2" ref="editableTable2"
toolbar :toolbar="true"
row-number :row-number="true"
row-selection :row-selection="true"
keep-source keep-source
:height="300" :height="300"
:loading="table2.loading" :loading="table2.loading"
@@ -84,17 +84,12 @@
<script> <script>
import JEditableTable from '@/components/jero/JEditableTable'
import { VALIDATE_FAILED, getRefPromise, validateFormModelAndTables } from '@/components/jero/JVxeTable/utils/vxeUtils' import { VALIDATE_FAILED, getRefPromise, validateFormModelAndTables } from '@/components/jero/JVxeTable/utils/vxeUtils'
import { httpAction, getAction } from '@/api/manage' import { httpAction, getAction } from '@/api/manage'
import { JVXETypes } from '@/components/jero/JVxeTable' import { JVXETypes } from '@/components/jero/JVxeTable'
import JDate from '@/components/jero/JDate'
export default { export default {
name: 'JeroOrderModalForJvexTable', name: 'JeroOrderModalForJvexTable',
components: {
JDate, JEditableTable
},
data () { data () {
return { return {
title: '操作', title: '操作',
@@ -227,7 +222,7 @@ export default {
}, },
close () { close () {
this.visible = false this.visible = false
this.getAllTable().then(editableTables => { this.getAllTable().then(() => {
this.table1.dataSource = [] this.table1.dataSource = []
this.table2.dataSource = [] this.table2.dataSource = []
}) })
@@ -10,35 +10,35 @@
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<a-form-model ref="form" :label-col="labelCol" :wrapper-col="wrapperCol" :model="model" :rules="validatorRules"> <a-form-model ref="form" :label-col="labelCol" :wrapper-col="wrapperCol" :model="model" :rules="validatorRules">
<a-form-model-item label="姓名" required prop="name" hasFeedback> <a-form-model-item label="姓名" required prop="name" :hasFeedback="true">
<a-input v-model="model.name" placeholder="请输入姓名"/> <a-input v-model="model.name" placeholder="请输入姓名"/>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="关键词" prop="keyWord" hasFeedback> <a-form-model-item label="关键词" prop="keyWord" :hasFeedback="true">
<a-input v-model="model.keyWord" placeholder="请输入关键词"/> <a-input v-model="model.keyWord" placeholder="请输入关键词"/>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="打卡时间" prop="punchTime" hasFeedback> <a-form-model-item label="打卡时间" prop="punchTime" :hasFeedback="true">
<a-date-picker showTime valueFormat="YYYY-MM-DD HH:mm:ss" v-model="model.punchTime" /> <a-date-picker showTime valueFormat="YYYY-MM-DD HH:mm:ss" v-model="model.punchTime" />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="性别" prop="sex" hasFeedback> <a-form-model-item label="性别" prop="sex" :hasFeedback="true">
<j-dict-select-tag type="radio" v-model="model.sex" :trigger-change="true" dictCode="sex"/> <j-dict-select-tag type="radio" v-model="model.sex" :trigger-change="true" dictCode="sex"/>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="年龄" prop="age" hasFeedback> <a-form-model-item label="年龄" prop="age" :hasFeedback="true">
<a-input placeholder="请输入年龄" v-model="model.age"/> <a-input placeholder="请输入年龄" v-model="model.age"/>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="生日" prop="age" hasFeedback> <a-form-model-item label="生日" prop="age" :hasFeedback="true">
<a-date-picker valueFormat="YYYY-MM-DD" v-model="model.birthday"/> <a-date-picker valueFormat="YYYY-MM-DD" v-model="model.birthday"/>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="邮箱" prop="email" hasFeedback > <a-form-model-item label="邮箱" prop="email" :hasFeedback="true" >
<a-input placeholder="请输入邮箱" v-model="model.email"/> <a-input placeholder="请输入邮箱" v-model="model.email"/>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="个人简介" prop="content" hasFeedback> <a-form-model-item label="个人简介" prop="content" :hasFeedback="true">
<a-input type="textarea" placeholder="请输入个人简介" v-model="model.content"/> <a-input type="textarea" placeholder="请输入个人简介" v-model="model.content"/>
</a-form-model-item> </a-form-model-item>
@@ -107,17 +107,17 @@ export default {
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
if (valid) { if (valid) {
that.confirmLoading = true that.confirmLoading = true
let httpurl = '' let httpUrl
let method = '' let method
if (!this.model.id) { if (!this.model.id) {
httpurl += this.url.add httpUrl = this.url.add
method = 'post' method = 'post'
} else { } else {
httpurl += this.url.edit httpUrl = this.url.edit
method = 'put' method = 'put'
} }
httpAction(httpurl, this.model, method).then((res) => { httpAction(httpUrl, this.model, method).then((res) => {
if (res.success) { if (res.success) {
that.$message.success(res.message) that.$message.success(res.message)
that.$emit('ok') that.$emit('ok')
@@ -62,13 +62,13 @@
<a-tab-pane tab="Tab 1" key="1"> <a-tab-pane tab="Tab 1" key="1">
<a-table :columns="columns" :dataSource="data" :pagination="false" size="middle"> <a-table :columns="columns" :dataSource="data" :pagination="false" size="middle">
<template v-for="(col, i) in ['name', 'workId', 'department']" :slot="col" slot-scope="text, record, index"> <template v-for="(col, i) in ['name', 'workId', 'department']" :slot="col" slot-scope="text, record">
<a-tooltip title="必填项" :defaultVisible="false" :overlayStyle="{ color: 'red' }"> <a-tooltip :key="col" title="必填项" :defaultVisible="false" :overlayStyle="{ color: 'red' }">
<a-input :key="col" v-if="record.editable" style="margin: -5px 0" :value="text" :placeholder="columns[i].title" @change="e => handlerRowChange(e.target.value, record.key, col)"/> <a-input :key="col" v-if="record.editable" style="margin: -5px 0" :value="text" :placeholder="columns[i].title" @change="e => handlerRowChange(e.target.value, record.key, col)"/>
<template v-else>{{ text }}</template> <template v-else>{{ text }}</template>
</a-tooltip> </a-tooltip>
</template> </template>
<template slot="operation" slot-scope="text, record, index"> <template slot="operation" slot-scope="text, record">
<template v-if="record.editable"> <template v-if="record.editable">
<span v-if="record.isNew"> <span v-if="record.isNew">
<a @click="saveRow(record.key)">添加</a> <a @click="saveRow(record.key)">添加</a>
@@ -203,13 +203,12 @@ export default {
this.form.validateFields((err, values) => { this.form.validateFields((err, values) => {
if (!err) { if (!err) {
that.confirmLoading = true that.confirmLoading = true
let httpurl = '' let httpurl, method
let method = ''
if (!this.model.id) { if (!this.model.id) {
httpurl += this.url.add httpurl = this.url.add
method = 'post' method = 'post'
} else { } else {
httpurl += this.url.edit httpurl = this.url.edit
method = 'put' method = 'put'
} }
const formData = Object.assign(this.model, values) const formData = Object.assign(this.model, values)
@@ -249,8 +248,7 @@ export default {
}) })
}, },
removeRow (key) { removeRow (key) {
const newData = this.data.filter(item => item.key !== key) this.data = this.data.filter(item => item.key !== key)
this.data = newData
}, },
saveRow (key) { saveRow (key) {
const target = this.data.filter(item => item.key === key)[0] const target = this.data.filter(item => item.key === key)[0]
@@ -139,12 +139,14 @@
<script> <script>
import { httpAction, getAction } from '@/api/manage' import { httpAction, getAction } from '@/api/manage'
import JDate from '@/components/jero/JDate' import { rules } from '@/utils/rules'
export default { export default {
name: 'JeroOrderMainModal', name: 'JeroOrderMainModal',
components: { computed: {
JDate rules () {
return rules
}
}, },
data () { data () {
return { return {
@@ -220,13 +222,12 @@ export default {
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
if (valid) { if (valid) {
that.confirmLoading = true that.confirmLoading = true
let httpurl = '' let httpurl, method
let method = ''
if (!this.orderMainModel.id) { if (!this.orderMainModel.id) {
httpurl += this.url.add httpurl = this.url.add
method = 'post' method = 'post'
} else { } else {
httpurl += this.url.edit httpurl = this.url.edit
method = 'put' method = 'put'
} }
@@ -280,7 +281,7 @@ export default {
margin-left: 3px; margin-left: 3px;
} }
.ant-form-item-control { .ant-form-item-control {
line-height: 0px; line-height: 0;
} }
/** 主表单行间距 */ /** 主表单行间距 */
.ant-form .ant-form-item { .ant-form .ant-form-item {
@@ -288,6 +289,6 @@ export default {
} }
/** Tab页面行间距 */ /** Tab页面行间距 */
.ant-tabs-content .ant-form-item { .ant-tabs-content .ant-form-item {
margin-bottom: 0px; margin-bottom: 0;
} }
</style> </style>
@@ -85,12 +85,11 @@
import JEditableTable from '@/components/jero/JEditableTable' import JEditableTable from '@/components/jero/JEditableTable'
import { FormTypes, VALIDATE_NO_PASSED, getRefPromise, validateFormModelAndTables } from '@/utils/JEditableTableUtil' import { FormTypes, VALIDATE_NO_PASSED, getRefPromise, validateFormModelAndTables } from '@/utils/JEditableTableUtil'
import { httpAction, getAction } from '@/api/manage' import { httpAction, getAction } from '@/api/manage'
import JDate from '@/components/jero/JDate'
export default { export default {
name: 'JeroOrderModalForJEditableTable', name: 'JeroOrderModalForJEditableTable',
components: { components: {
JDate, JEditableTable JEditableTable
}, },
data () { data () {
return { return {
@@ -42,8 +42,8 @@ export default {
}, },
previewFiles (title, token) { previewFiles (title, token) {
var iframe = document.getElementById('pdfPreviewIframe') const iframe = document.getElementById('pdfPreviewIframe')
var json = { title: title, token: token } const json = { title: title, token: token }
iframe.contentWindow.postMessage(json, '*') iframe.contentWindow.postMessage(json, '*')
} }
@@ -4,7 +4,7 @@
:width="modalWidth" :width="modalWidth"
:visible="visible" :visible="visible"
:bodyStyle="bodyStyle" :bodyStyle="bodyStyle"
style="top: 0px;" style="top: 0;"
@ok="handleOk" @ok="handleOk"
@cancel="handleCancel" @cancel="handleCancel"
cancelText="关闭"> cancelText="关闭">
@@ -51,7 +51,6 @@
</template> </template>
<script> <script>
import { httpAction } from '@/api/manage'
export default { export default {
name: 'SuperQueryModal', name: 'SuperQueryModal',
@@ -250,7 +250,7 @@
</a-modal> </a-modal>
</template> </template>
<script> <script>
import pick from 'lodash.pick' // import pick from 'lodash.pick'
export default { export default {
name: 'VueCron', name: 'VueCron',
props: ['data', 'i18n'], props: ['data', 'i18n'],
@@ -649,7 +649,7 @@ export default {
.ant-tabs-tab { .ant-tabs-tab {
padding: 0 24px!important; padding: 0 24px!important;
background-color: #f5f7fa!important; background-color: #f5f7fa!important;
margin-right: 0px!important; margin-right: 0 !important;
border-radius: 0; border-radius: 0;
line-height: 38px; line-height: 38px;
border: 1px solid transparent!important; border: 1px solid transparent!important;
@@ -236,7 +236,7 @@ export default {
}, },
computed: { computed: {
title () { title () {
return this.$route.meta.title return this.$route.meta.title + ''
} }
} }
+31 -39
View File
@@ -63,7 +63,7 @@
<a-tab-pane loading="true" tab="受理监管" key="1"> <a-tab-pane loading="true" tab="受理监管" key="1">
<a-row> <a-row>
<a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24"> <a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24">
<bar title="受理量统计" /> <bar title="受理量统计" :data-source="[]"/>
</a-col> </a-col>
<a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24"> <a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24">
@@ -170,7 +170,7 @@
<a-tab-pane loading="true" tab="业务流程限时监管" key="1"> <a-tab-pane loading="true" tab="业务流程限时监管" key="1">
<a-table :dataSource="dataSource1" size="default" rowKey="id" :columns="columns" :pagination="ipagination"> <a-table :dataSource="dataSource1" size="default" rowKey="id" :columns="columns" :pagination="ipagination">
<template slot="flowRate" slot-scope="text, record, index"> <template slot="flowRate" slot-scope="text, record">
<a-progress :percent="getFlowRateNumber(record.flowRate)" style="width:80px" /> <a-progress :percent="getFlowRateNumber(record.flowRate)" style="width:80px" />
</template> </template>
</a-table> </a-table>
@@ -178,7 +178,7 @@
<a-tab-pane loading="true" tab="业务节点限时监管" key="2"> <a-tab-pane loading="true" tab="业务节点限时监管" key="2">
<a-table :dataSource="dataSource2" size="default" rowKey="id" :columns="columns2" :pagination="ipagination"> <a-table :dataSource="dataSource2" size="default" rowKey="id" :columns="columns2" :pagination="ipagination">
<template slot="flowRate" slot-scope="text, record, index"> <template slot="flowRate" slot-scope="text, record">
<span style="color: red;">{{ record.flowRate }}分钟</span> <span style="color: red;">{{ record.flowRate }}分钟</span>
</template> </template>
</a-table> </a-table>
@@ -198,13 +198,9 @@ import ATooltip from 'ant-design-vue/es/tooltip/Tooltip'
import MiniArea from '@/components/chart/MiniArea' import MiniArea from '@/components/chart/MiniArea'
import MiniBar from '@/components/chart/MiniBar' import MiniBar from '@/components/chart/MiniBar'
import LineChartMultid from '@/components/chart/LineChartMultid' import LineChartMultid from '@/components/chart/LineChartMultid'
import AreaChartTy from '@/components/chart/AreaChartTy'
import DashChartDemo from '@/components/chart/DashChartDemo' import DashChartDemo from '@/components/chart/DashChartDemo'
import BarMultid from '@/components/chart/BarMultid' import BarMultid from '@/components/chart/BarMultid'
import MiniProgress from '@/components/chart/MiniProgress'
import RankList from '@/components/chart/RankList'
import Bar from '@/components/chart/Bar' import Bar from '@/components/chart/Bar'
import Trend from '@/components/Trend'
import { getAction } from '@/api/manage' import { getAction } from '@/api/manage'
import { filterObj } from '@/utils/util' import { filterObj } from '@/utils/util'
import moment from 'dayjs' import moment from 'dayjs'
@@ -339,12 +335,8 @@ export default {
ChartCard, ChartCard,
MiniArea, MiniArea,
MiniBar, MiniBar,
MiniProgress,
RankList,
Bar, Bar,
Trend,
LineChartMultid, LineChartMultid,
AreaChartTy,
DashChartDemo, DashChartDemo,
BarMultid BarMultid
}, },
@@ -415,22 +407,22 @@ export default {
}, },
methods: { methods: {
goPage (index) { goPage (index) {
if (index == 0) { if (index === 0) {
this.$router.push({ this.$router.push({
path: '/isps/registerStepForm', path: '/isps/registerStepForm',
name: 'isps-registerStepForm' name: 'isps-registerStepForm'
}) })
} else if (index == 1) { } else if (index === 1) {
this.$router.push({ this.$router.push({
path: '/isps/registerList', path: '/isps/registerList',
name: 'isps-registerList' name: 'isps-registerList'
}) })
} else if (index == 2) { } else if (index === 2) {
this.$router.push({ this.$router.push({
path: '/isps/fileManage', path: '/isps/fileManage',
name: 'isps-fileManage' name: 'isps-fileManage'
}) })
} else if (index == 3) { } else if (index === 3) {
this.$router.push({ this.$router.push({
path: '/isps/infoSearch', path: '/isps/infoSearch',
name: 'isps-infoSearch' name: 'isps-infoSearch'
@@ -441,7 +433,7 @@ export default {
if (arg === 1) { if (arg === 1) {
this.ipagination.current = 1 this.ipagination.current = 1
} }
var params = this.getQueryParams()// 查询条件 const params = this.getQueryParams()// 查询条件
getAction(this.url.list, params).then((res) => { getAction(this.url.list, params).then((res) => {
console.log('dsdsd', res.result) console.log('dsdsd', res.result)
this.dataSource1 = res.result.data1 this.dataSource1 = res.result.data1
@@ -450,18 +442,18 @@ export default {
}) })
}, },
getQueryParams () { getQueryParams () {
var param = { flowStatus: '-3' } const param = { flowStatus: '-3' }
param.pageNo = this.ipagination.current param.pageNo = this.ipagination.current
param.pageSize = this.ipagination.pageSize param.pageSize = this.ipagination.pageSize
return filterObj(param) return filterObj(param)
}, },
formatRespectiveHoldCert (value) { formatRespectiveHoldCert (value) {
return (value == '1' || eval(value)) ? '是' : '否' return (value + '' === '1' || eval(value)) ? '是' : '否'
}, },
formatCertFormat (value) { formatCertFormat (value) {
if (value == '1') { if (value + '' === '1') {
return '单一版' return '单一版'
} else if (value == '2') { } else if (value + '' === '2') {
return '集成版' return '集成版'
} else { } else {
return value return value
@@ -471,20 +463,20 @@ export default {
return Number(value) return Number(value)
}, },
getFlowPercent (record) { getFlowPercent (record) {
if (record.flowStatus == '3') { if (record.flowStatus + '' === '3') {
return 100 return 100
} else if (record.flowStatus == '0') { } else if (record.flowStatus + '' === '0') {
return 0 return 0
} else { } else {
return record.flowRate return record.flowRate
} }
}, },
getFlowStatus (status) { getFlowStatus (status) {
if (status == '4') { if (status + '' === '4') {
return 'exception' return 'exception'
} else if (status == '0') { } else if (status + '' === '0') {
return 'normal' return 'normal'
} else if (status == '3') { } else if (status + '' === '3') {
return 'success' return 'success'
} else { } else {
return 'active' return 'active'
@@ -511,14 +503,14 @@ export default {
two = res.result[a].name two = res.result[a].name
} }
} }
const ontItem = res.result.filter((item) => { return item.name == two })[0] const ontItem = res.result.filter((item) => { return item.name + '' === two + '' })[0]
ontItem.restPPT = ontItem.restPPT / 10 ontItem.restPPT = ontItem.restPPT / 10
this.diskInfo.push(ontItem) this.diskInfo.push(ontItem)
if (res.result.length > 1) { if (res.result.length > 1) {
let one2 = 0; let two2 = '' let one2 = 0; let two2 = ''
for (const a in res.result) { for (const a in res.result) {
if (res.result[a].name == two) { if (res.result[a].name + '' === two + '') {
continue continue
} }
const tempNum = Number(res.result[a].max) const tempNum = Number(res.result[a].max)
@@ -527,7 +519,7 @@ export default {
two2 = res.result[a].name two2 = res.result[a].name
} }
} }
const one2Item = res.result.filter((item) => { return item.name == two2 })[0] const one2Item = res.result.filter((item) => { return item.name + '' === two2 + '' })[0]
one2Item.restPPT = one2Item.restPPT / 10 one2Item.restPPT = one2Item.restPPT / 10
this.diskInfo.push(one2Item) this.diskInfo.push(one2Item)
} }
@@ -540,11 +532,11 @@ export default {
getAction(this.url.countSll).then((res) => { getAction(this.url.countSll).then((res) => {
if (res.success) { if (res.success) {
const map = res.result const map = res.result
for (var key in map) { for (const key in map) {
const dataStr = key const dataStr = key
const value = map[key] const value = map[key]
const today = moment(new Date()).format('YYYY-MM-DD') const today = moment(new Date()).format('YYYY-MM-DD')
if (dataStr == today) { if (dataStr + '' === today + '') {
this.todaySll = map[today] this.todaySll = map[today]
} }
this.chartData.sll.push({ this.chartData.sll.push({
@@ -553,15 +545,15 @@ export default {
}) })
} }
} }
}), })
getAction(this.url.countBjl).then((res) => { getAction(this.url.countBjl).then((res) => {
if (res.success) { if (res.success) {
const map = res.result const map = res.result
for (var key in map) { for (const key in map) {
const dataStr = key const dataStr = key
const value = map[key] const value = map[key]
const today = moment(new Date()).format('YYYY-MM-DD') const today = moment(new Date()).format('YYYY-MM-DD')
if (dataStr == today) { if (dataStr + '' === today + '') {
this.todayBjl = map[today] this.todayBjl = map[today]
} }
this.chartData.bjl.push({ this.chartData.bjl.push({
@@ -570,15 +562,15 @@ export default {
}) })
} }
} }
}), })
getAction(this.url.countISll).then((res) => { getAction(this.url.countISll).then((res) => {
if (res.success) { if (res.success) {
const map = res.result const map = res.result
for (var key in map) { for (const key in map) {
const dataStr = key const dataStr = key
const value = map[key] const value = map[key]
const today = moment(new Date()).format('YYYY-MM-DD') const today = moment(new Date()).format('YYYY-MM-DD')
if (dataStr == today) { if (dataStr + '' === today + '') {
this.todayISll = map[today] this.todayISll = map[today]
} }
this.chartData.isll.push({ this.chartData.isll.push({
@@ -587,15 +579,15 @@ export default {
}) })
} }
} }
}), })
getAction(this.url.countIBjl).then((res) => { getAction(this.url.countIBjl).then((res) => {
if (res.success) { if (res.success) {
const map = res.result const map = res.result
for (var key in map) { for (const key in map) {
const dataStr = key const dataStr = key
const value = map[key] const value = map[key]
const today = moment(new Date()).format('YYYY-MM-DD') const today = moment(new Date()).format('YYYY-MM-DD')
if (dataStr == today) { if (dataStr + '' === today + '') {
this.todayIBjl = map[today] this.todayIBjl = map[today]
} }
this.chartData.ibjl.push({ this.chartData.ibjl.push({
@@ -88,7 +88,7 @@ export default {
this.getCabinetCountSource(res.result) this.getCabinetCountSource(res.result)
} }
} else { } else {
var that = this const that = this
that.$message.warning(res.message) that.$message.warning(res.message)
} }
}) })
@@ -188,9 +188,9 @@ export default {
// 柱状图方法 // 柱状图方法
barChart (list, countList) { barChart (list, countList) {
// console.log(list,countList) // console.log(list,countList)
var myChart = echarts.init(this.$refs.echartBar) const myChart = echarts.init(this.$refs.echartBar)
// 指定图表的配置项和数据 // 指定图表的配置项和数据
var option = { const option = {
title: { title: {
text: '档案统计' text: '档案统计'
}, },
@@ -214,9 +214,9 @@ export default {
}, },
// 饼状图方法 // 饼状图方法
TieChart (pieList) { TieChart (pieList) {
var myChart = echarts.init(this.$refs.echartPie) const myChart = echarts.init(this.$refs.echartPie)
// 指定图表的配置项和数据 // 指定图表的配置项和数据
var option = { const option = {
title: { title: {
text: '档案统计', text: '档案统计',
left: 'center' left: 'center'
@@ -310,7 +310,7 @@ export default {
<style scoped> <style scoped>
.statistic { .statistic {
padding: 0px !important; padding: 0 !important;
margin-top: 50px; margin-top: 50px;
width: 100%; width: 100%;
height: 600px height: 600px
@@ -2,7 +2,7 @@
<a-card :bordered="false"> <a-card :bordered="false">
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator" :md="24" :sm="24" style="margin: -25px 0px 10px 0px"> <div class="table-operator" :md="24" :sm="24" style="margin: -25px 0 10px 0">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0"> <a-dropdown v-if="selectedRowKeys.length > 0">
@@ -46,7 +46,7 @@
</a> </a>
<a-menu slot="overlay"> <a-menu slot="overlay">
<a-menu-item> <a-menu-item>
<a href="javascript:;" @click="handleDetail(record)">详情</a> <a href="javascript:" @click="handleDetail(record)">详情</a>
</a-menu-item> </a-menu-item>
<a-menu-item> <a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
@@ -66,7 +66,6 @@
<script> <script>
import JeroOrderCustomerModal from './form/JeroOrderCustomerModal' import JeroOrderCustomerModal from './form/JeroOrderCustomerModal'
import JeroOrderDMainList from './JeroOrderDMainList'
import { JeroListMixin } from '@/mixins/JeroListMixin' import { JeroListMixin } from '@/mixins/JeroListMixin'
import { getAction } from '@/api/manage' import { getAction } from '@/api/manage'
@@ -74,7 +73,6 @@ export default {
name: 'JeroOrderDMainModal', name: 'JeroOrderDMainModal',
mixins: [JeroListMixin], mixins: [JeroListMixin],
components: { components: {
JeroOrderDMainList,
JeroOrderCustomerModal JeroOrderCustomerModal
}, },
data () { data () {
@@ -94,9 +92,9 @@ export default {
align: 'center', align: 'center',
dataIndex: 'sex', dataIndex: 'sex',
customRender: function (text) { customRender: function (text) {
if (text == 1) { if (text + '' === '1') {
return '男' return '男'
} else if (text == 2) { } else if (text + '' === '2') {
return '女' return '女'
} else { } else {
return text return text
@@ -134,7 +132,7 @@ export default {
this.ipagination.current = 1 this.ipagination.current = 1
} }
// update-begin--Author:kangxiaolin Date:20190905 for[442]主子表分开维护,生成的代码子表的分页改为真实的分页-------------------- // update-begin--Author:kangxiaolin Date:20190905 for[442]主子表分开维护,生成的代码子表的分页改为真实的分页--------------------
var params = this.getQueryParams() const params = this.getQueryParams()
getAction(this.url.list, { getAction(this.url.list, {
orderId: params.mainId, orderId: params.mainId,
pageNo: this.ipagination.current, pageNo: this.ipagination.current,
@@ -102,16 +102,12 @@ import JeroOrderDMainModal from './form/JeroOrderDMainModal'
import JeroOrderCustomerList from './JeroOrderCustomerList' import JeroOrderCustomerList from './JeroOrderCustomerList'
import JeroOrderTicketList from './JeroOrderTicketList' import JeroOrderTicketList from './JeroOrderTicketList'
import { deleteAction } from '@/api/manage' import { deleteAction } from '@/api/manage'
import JeroOrderCustomerModal from './form/JeroOrderCustomerModal'
import JeroOrderTicketModal from './form/JeroOrderTicketModal'
import { JeroListMixin } from '@/mixins/JeroListMixin' import { JeroListMixin } from '@/mixins/JeroListMixin'
export default { export default {
name: 'JeroOrderDMainList', name: 'JeroOrderDMainList',
mixins: [JeroListMixin], mixins: [JeroListMixin],
components: { components: {
JeroOrderTicketModal,
JeroOrderCustomerModal,
JeroOrderDMainModal, JeroOrderDMainModal,
JeroOrderCustomerList, JeroOrderCustomerList,
JeroOrderTicketList JeroOrderTicketList
@@ -221,7 +217,7 @@ export default {
}, },
handleDelete: function (id) { handleDelete: function (id) {
var that = this const that = this
deleteAction(that.url.delete, { id: id }).then((res) => { deleteAction(that.url.delete, { id: id }).then((res) => {
if (res.success) { if (res.success) {
that.$message.success(res.message) that.$message.success(res.message)
@@ -2,7 +2,7 @@
<a-card :bordered="false"> <a-card :bordered="false">
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator" :md="24" :sm="24" style="margin: -25px 0px 10px 2px"> <div class="table-operator" :md="24" :sm="24" style="margin: -25px 0 10px 2px">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0"> <a-dropdown v-if="selectedRowKeys.length > 0">
@@ -46,7 +46,7 @@
</a> </a>
<a-menu slot="overlay"> <a-menu slot="overlay">
<a-menu-item> <a-menu-item>
<a href="javascript:;" @click="handleDetail(record)">详情</a> <a href="javascript:" @click="handleDetail(record)">详情</a>
</a-menu-item> </a-menu-item>
<a-menu-item> <a-menu-item>
@@ -122,7 +122,7 @@ export default {
if (arg === 1) { if (arg === 1) {
this.ipagination.current = 1 this.ipagination.current = 1
} }
var params = this.getQueryParams() const params = this.getQueryParams()
// update-begin--Author:kangxiaolin Date:20190905 for[442]主子表分开维护,生成的代码子表的分页改为真实的分页-------------------- // update-begin--Author:kangxiaolin Date:20190905 for[442]主子表分开维护,生成的代码子表的分页改为真实的分页--------------------
getAction(this.url.list, { getAction(this.url.list, {
orderId: params.mainId, orderId: params.mainId,
@@ -18,14 +18,14 @@
label="客户姓名" label="客户姓名"
prop="name" prop="name"
required required
hasFeedback> :hasFeedback="true">
<a-input placeholder="请输入客户姓名" v-model="model.name" :readOnly="disableSubmit"/> <a-input placeholder="请输入客户姓名" v-model="model.name" :readOnly="disableSubmit"/>
</a-form-model-item> </a-form-model-item>
<a-form-model-item <a-form-model-item
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
label="性别" label="性别"
hasFeedback> :hasFeedback="true">
<a-select v-model="model.sex" placeholder="请选择性别"> <a-select v-model="model.sex" placeholder="请选择性别">
<a-select-option value="1">男性</a-select-option> <a-select-option value="1">男性</a-select-option>
<a-select-option value="2">女性</a-select-option> <a-select-option value="2">女性</a-select-option>
@@ -36,14 +36,14 @@
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
label="身份证号码" label="身份证号码"
prop="idcard" prop="idcard"
hasFeedback> :hasFeedback="true">
<a-input placeholder="请输入身份证号码" v-model="model.idcard" :readOnly="disableSubmit"/> <a-input placeholder="请输入身份证号码" v-model="model.idcard" :readOnly="disableSubmit"/>
</a-form-model-item> </a-form-model-item>
<a-form-model-item <a-form-model-item
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
label="身份证扫描件" label="身份证扫描件"
hasFeedback> :hasFeedback="true">
<j-image-upload text="上传" v-model="fileList" :isMultiple="true"></j-image-upload> <j-image-upload text="上传" v-model="fileList" :isMultiple="true"></j-image-upload>
</a-form-model-item> </a-form-model-item>
<a-form-model-item <a-form-model-item
@@ -51,7 +51,7 @@
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
label="联系方式" label="联系方式"
prop="telphone" prop="telphone"
hasFeedback> :hasFeedback="true">
<a-input v-model="model.telphone" :readOnly="disableSubmit"/> <a-input v-model="model.telphone" :readOnly="disableSubmit"/>
</a-form-model-item> </a-form-model-item>
<a-form-model-item <a-form-model-item
@@ -59,7 +59,7 @@
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
label="订单号码" label="订单号码"
:hidden="hiding" :hidden="hiding"
hasFeedback> :hasFeedback="true">
<a-input v-model="model.orderId" disabled="disabled"/> <a-input v-model="model.orderId" disabled="disabled"/>
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
@@ -137,10 +137,10 @@ export default {
this.edit(record, 'd') this.edit(record, 'd')
}, },
edit (record, v) { edit (record, v) {
if (v == 'e') { if (v + '' === 'e') {
this.hiding = false this.hiding = false
this.disableSubmit = false this.disableSubmit = false
} else if (v == 'd') { } else if (v + '' === 'd') {
this.hiding = false this.hiding = false
this.disableSubmit = true this.disableSubmit = true
} else { } else {
@@ -175,13 +175,12 @@ export default {
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
if (valid) { if (valid) {
that.confirmLoading = true that.confirmLoading = true
let httpurl = '' let httpurl, method
let method = ''
if (!this.model.id) { if (!this.model.id) {
httpurl += this.url.add httpurl = this.url.add
method = 'post' method = 'post'
} else { } else {
httpurl += this.url.edit httpurl = this.url.edit
method = 'put' method = 'put'
} }
const formData = Object.assign({}, this.model) const formData = Object.assign({}, this.model)
@@ -213,14 +212,14 @@ export default {
if (!value || new RegExp(/^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\d{8}$/).test(value)) { if (!value || new RegExp(/^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\d{8}$/).test(value)) {
callback() callback()
} else { } else {
callback('您的手机号码格式不正确!') callback(new Error('您的手机号码格式不正确!'))
} }
}, },
validateIdCard (rule, value, callback) { validateIdCard (rule, value, callback) {
if (!value || new RegExp(/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/).test(value)) { if (!value || new RegExp(/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/).test(value)) {
callback() callback()
} else { } else {
callback('您的身份证号码格式不正确!') callback(new Error('您的身份证号码格式不正确!'))
} }
} }
} }
@@ -16,7 +16,7 @@
prop="orderCode" prop="orderCode"
label="订单号" label="订单号"
required required
hasFeedback> :hasFeedback="true">
<a-input placeholder="请输入订单号" v-model="orderMainModel.orderCode" /> <a-input placeholder="请输入订单号" v-model="orderMainModel.orderCode" />
</a-form-model-item> </a-form-model-item>
<a-form-model-item <a-form-model-item
@@ -53,15 +53,9 @@
<script> <script>
import { httpAction } from '@/api/manage' import { httpAction } from '@/api/manage'
import JDate from '@/components/jero/JDate'
import pick from 'lodash.pick'
import moment from 'moment'
export default { export default {
name: 'JeroOrderDMainModal', name: 'JeroOrderDMainModal',
components: {
JDate
},
data () { data () {
return { return {
title: '操作', title: '操作',
@@ -108,23 +102,22 @@ export default {
this.visible = false this.visible = false
this.$refs.form.resetFields() this.$refs.form.resetFields()
}, },
close () { // close () {
this.$emit('close') // this.$emit('close')
this.visible = false // this.visible = false
}, // },
handleOk () { handleOk () {
const that = this const that = this
// 触发表单验证 // 触发表单验证
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
if (valid) { if (valid) {
that.confirmLoading = true that.confirmLoading = true
let httpurl = '' let httpurl, method
let method = ''
if (!this.orderMainModel.id) { if (!this.orderMainModel.id) {
httpurl += this.url.add httpurl = this.url.add
method = 'post' method = 'post'
} else { } else {
httpurl += this.url.edit httpurl = this.url.edit
method = 'put' method = 'put'
} }
@@ -158,7 +151,7 @@ export default {
} }
.ant-form-item-control { .ant-form-item-control {
line-height: 0px; line-height: 0;
} }
/** 主表单行间距 */ /** 主表单行间距 */
@@ -168,6 +161,6 @@ export default {
/** Tab页面行间距 */ /** Tab页面行间距 */
.ant-tabs-content .ant-form-item { .ant-tabs-content .ant-form-item {
margin-bottom: 0px; margin-bottom: 0;
} }
</style> </style>
@@ -17,7 +17,7 @@
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
label="航班号" label="航班号"
prop="ticketCode" prop="ticketCode"
hasFeedback> :hasFeedback="true">
<a-input placeholder="请输入航班号" :readOnly="disableSubmit" v-model="model.ticketCode"></a-input> <a-input placeholder="请输入航班号" :readOnly="disableSubmit" v-model="model.ticketCode"></a-input>
</a-form-model-item> </a-form-model-item>
<a-form-model-item <a-form-model-item
@@ -25,7 +25,7 @@
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
label="航班时间" label="航班时间"
prop="tickectDate" prop="tickectDate"
hasFeedback> :hasFeedback="true">
<j-date v-model="model.tickectDate"></j-date> <j-date v-model="model.tickectDate"></j-date>
</a-form-model-item> </a-form-model-item>
<a-form-model-item <a-form-model-item
@@ -34,7 +34,7 @@
label="订单号码" label="订单号码"
v-model="this.orderId" v-model="this.orderId"
:hidden="hiding" :hidden="hiding"
hasFeedback> :hasFeedback="true">
<a-input v-model="model.orderId" disabled="disabled"/> <a-input v-model="model.orderId" disabled="disabled"/>
</a-form-model-item> </a-form-model-item>
<a-form-model-item <a-form-model-item
@@ -42,7 +42,7 @@
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
label="创建人" label="创建人"
:hidden="hiding" :hidden="hiding"
hasFeedback> :hasFeedback="true">
<a-input v-model="model.createBy" :readOnly="disableSubmit"/> <a-input v-model="model.createBy" :readOnly="disableSubmit"/>
</a-form-model-item> </a-form-model-item>
<a-form-model-item <a-form-model-item
@@ -50,7 +50,7 @@
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
label="创建时间" label="创建时间"
:hidden="hiding" :hidden="hiding"
hasFeedback> :hasFeedback="true">
<a-input v-model="model.createTime" :readOnly="disableSubmit"/> <a-input v-model="model.createTime" :readOnly="disableSubmit"/>
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
@@ -112,10 +112,10 @@ export default {
this.edit(record, 'd') this.edit(record, 'd')
}, },
edit (record, v) { edit (record, v) {
if (v == 'e') { if (v + '' === 'e') {
this.hiding = false this.hiding = false
this.disableSubmit = false this.disableSubmit = false
} else if (v == 'd') { } else if (v + '' === 'd') {
this.hiding = false this.hiding = false
this.disableSubmit = true this.disableSubmit = true
} else { } else {
@@ -136,13 +136,12 @@ export default {
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
if (valid) { if (valid) {
that.confirmLoading = true that.confirmLoading = true
let httpurl = '' let httpurl, method
let method = ''
if (!this.model.id) { if (!this.model.id) {
httpurl += this.url.add httpurl = this.url.add
method = 'post' method = 'post'
} else { } else {
httpurl += this.url.edit httpurl = this.url.edit
method = 'put' method = 'put'
} }
this.model.mainId = this.model.orderId this.model.mainId = this.model.orderId