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