From 1932843bb1d66698001a48b806e3b47ee6568412 Mon Sep 17 00:00:00 2001 From: zhangherong <571457620@qq.com> Date: 星期一, 30 六月 2025 10:57:24 +0800 Subject: [PATCH] art:删除演示代码 --- /dev/null | 173 --------------------------------------------------------- 1 files changed, 0 insertions(+), 173 deletions(-) diff --git a/src/views/jeecg/ImagCropper.vue b/src/views/jeecg/ImagCropper.vue deleted file mode 100644 index c90d4a2..0000000 --- a/src/views/jeecg/ImagCropper.vue +++ /dev/null @@ -1,613 +0,0 @@ -<template> - <div class="wrapper"> - <div class="model" v-show="model"> - <div class="model-show" @click="model = false"> - <img :src="modelSrc" alt="" @click="model = false"> - </div> - </div> - <div class="content"> - <div class="show-info"> - <div class="test test1"> - <vueCropper - ref="cropper" - :img="option.img" - :outputSize="option.size" - :outputType="option.outputType" - :info="true" - :full="option.full" - :canMove="option.canMove" - :canMoveBox="option.canMoveBox" - :fixedBox="option.fixedBox" - :original="option.original" - :autoCrop="option.autoCrop" - :autoCropWidth="option.autoCropWidth" - :autoCropHeight="option.autoCropHeight" - :centerBox="option.centerBox" - :high="option.high" - :infoTrue="option.infoTrue" - :maxImgSize="option.maxImgSize" - @realTime="realTime" - @imgLoad="imgLoad" - @cropMoving="cropMoving" - :enlarge="option.enlarge" - :mode="option.mode" - :limitMinSize="option.limitMinSize" - ></vueCropper> - </div> - <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"> - <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> - <button @click="refreshCrop" class="btn">refresh</button> - <button @click="changeScale(1)" class="btn">+</button> - <button @click="changeScale(-1)" class="btn">-</button> - <button @click="rotateLeft" class="btn">rotateLeft</button> - <button @click="rotateRight" class="btn">rotateRight</button> - <button @click="finish('base64')" class="btn">preview(base64)</button> - <button @click="finish('blob')" class="btn">preview(blob)</button> - <button @click="() => option.img = ''" class="btn">娓呴櫎鍥剧墖</button> - <a @click="down('base64')" class="btn">download(base64)</a> - <a @click="down('blob')" class="btn">download(blob)</a> - <a :href="downImg" download="demo.png" ref="downloadDom"></a> - </div> - - <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 :style="previews.div"> - <img :src="previews.url" :style="previews.img"> - </div> - </div> - </section> - - <section class="pre-item"> - <p>涓瓑澶у皬</p> - <div :style="previewStyle1"> - <div :style="previews.div"> - <img :src="previews.url" :style="previews.img"> - </div> - </div> - </section> - - <section class="pre-item"> - <p>杩蜂綘澶у皬</p> - <div :style="previewStyle2"> - <div :style="previews.div"> - <img :src="previews.url" :style="previews.img"> - </div> - </div> - </section> - - <section class="pre-item" title="zoom: (100 / previews.w)"> - <p>鍥哄畾涓�100瀹藉害</p> - <div :style="previewStyle3"> - <div :style="previews.div"> - <img :src="previews.url" :style="previews.img"> - </div> - </div> - </section> - - <section class="pre-item" title="zoom: (100 / previews.h)"> - <p>鍥哄畾涓�100楂樺害</p> - <div :style="previewStyle4"> - <div :style="previews.div"> - <img :src="previews.url" :style="previews.img"> - </div> - </div> - </section> - </div> - - <div style="display:block; width: 100%;"> - <label class="c-item"> - <span>鍥剧墖榛樿娓叉煋鏂瑰紡</span> - <select v-model="option.mode"> - <option value="contain">contain</option> - <option value="cover">cover</option> - <option value="400px auto">400px auto</option> - <option value="auto 400px">auto 400px</option> - <option value="50%">50%</option> - <option value="auto 50%">auto 50%</option> - </select> - <section> - 绫讳技css background灞炴�ц缃� 璁剧疆涓嶇鍚堣鑼冧笉鐢熸晥锛� 鍙傜収鏂囨。璇存槑 - </section> - </label> - <label class="c-item"> - <span>涓婁紶鏃跺浘鐗囨渶澶уぇ灏�(榛樿浼氬帇缂╁昂瀵稿埌杩欎釜澶у皬)</span> - <input type="nubmer" v-model="option.maxImgSize"> - </label> - <label class="c-item"> - <span>涓婁紶鍥剧墖鏄惁鏄剧ず鍘熷瀹介珮 (閽堝澶у浘 鍙互閾烘弧)</span> - <input type="checkbox" v-model="option.original"> - <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> - </label> - <label class="c-item"> - <span>鏄惁杈撳嚭鍘熷浘姣斾緥鐨勬埅鍥�</span> - <input type="checkbox" v-model="option.full"> - <span>full: {{ option.full}}</span> - </label> - <label class="c-item"> - <span>鎴浘淇℃伅灞曠ず鏄惁鏄湡瀹炵殑杈撳嚭瀹介珮</span> - <input type="checkbox" v-model="option.infoTrue"> - <span>infoTrue: {{ option.infoTrue}}</span> - </label> - <label class="c-item"> - <span>鑳藉惁鎷栧姩鍥剧墖</span> - <input type="checkbox" v-model="option.canMove"> - <span>canMove: {{ option.canMove}}</span> - </label> - <label class="c-item"> - <span>鑳藉惁鎷栧姩鎴浘妗�</span> - <input type="checkbox" v-model="option.canMoveBox"> - <span>canMoveBox: {{ option.canMoveBox}}</span> - </label> - <label class="c-item"> - <span>鎴浘妗嗗浐瀹氬ぇ灏�</span> - <input type="checkbox" v-model="option.fixedBox"> - <span>fixedBox: {{ option.fixedBox}}</span> - </label> - <label class="c-item"> - <span>鏄惁鑷姩鐢熸垚鎴浘妗�</span> - <input type="checkbox" v-model="option.autoCrop"> - <span>autoCrop: {{ option.autoCrop}}</span> - </label> - <label class="c-item"> - <span>鑷姩鐢熸垚鎴浘妗嗙殑瀹介珮</span> - <span>瀹藉害: </span><input type="number" v-model="option.autoCropWidth"> - <span>楂樺害: </span><input type="number" v-model="option.autoCropHeight"> - </label> - <label class="c-item"> - <span>鎴浘妗嗘槸鍚﹂檺鍒跺湪鍥剧墖閲�(鍙湁鍦ㄨ嚜鍔ㄧ敓鎴愭埅鍥炬鏃舵墠鑳界敓鏁�)</span> - <input type="checkbox" v-model="option.centerBox"> - <span>centerBox: {{ option.centerBox}}</span> - </label> - <label class="c-item"> - <span>鏄惁鎸夌収鎴浘妗嗘瘮渚嬭緭鍑� 榛樿涓�1 </span> - <input type="number" v-model="option.enlarge"> - </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>webp <input type="radio" name="type" value="webp" v-model="option.outputType"></label> - </label> - </div> - </div> - </div> - </div> -</template> - -<script> - import { VueCropper } from 'vue-cropper' - - export default { - name: 'ImagCropper', - components: { - VueCropper - }, - data () { - return { - model: false, - modelSrc: "", - crap: false, - previews: {}, - lists: [ - {img: "https://avatars2.githubusercontent.com/u/15681693?s=460&v=4"}, - {img: "http://cdn.xyxiao.cn/Landscape_1.jpg"}, - {img: "http://cdn.xyxiao.cn/Landscape_2.jpg"}, - {img: "http://cdn.xyxiao.cn/Landscape_3.jpg"}, - {img: "http://cdn.xyxiao.cn/Landscape_4.jpg"}, - {img: "http://cdn.xyxiao.cn/Portrait_1.jpg"}, - {img: "http://cdn.xyxiao.cn/Portrait_2.jpg"} - ], - option: { - img: "", - size: 1, - full: false, - outputType: "png", - canMove: true, - fixedBox: false, - original: false, - canMoveBox: true, - autoCrop: true, - // 鍙湁鑷姩鎴浘寮�鍚� 瀹藉害楂樺害鎵嶇敓鏁� - autoCropWidth: 200, - autoCropHeight: 150, - centerBox: false, - high: false, - cropData: {}, - enlarge: 1, - mode: 'contain', - maxImgSize: 3000, - limitMinSize: [100, 120] - }, - example2: { - img: "http://cdn.xyxiao.cn/Landscape_2.jpg", - info: true, - size: 1, - outputType: "jpeg", - canScale: true, - autoCrop: true, - // 鍙湁鑷姩鎴浘寮�鍚� 瀹藉害楂樺害鎵嶇敓鏁� - autoCropWidth: 300, - autoCropHeight: 250, - fixed: true, - // 鐪熷疄鐨勮緭鍑哄楂� - infoTrue: true, - fixedNumber: [4, 3] - }, - example3: { - img: "http://cdn.xyxiao.cn/Landscape_1.jpg", - autoCrop: true, - autoCropWidth: 200, - autoCropHeight: 200, - fixedBox: true - }, - downImg: "#", - previewStyle1: {}, - previewStyle2: {}, - previewStyle3: {}, - previewStyle4: {}, - code0: '', - code1: '', - code2: '', - code3: '', - preview3: '', - }; - }, - methods: { - changeImg() { - this.option.img = this.lists[~~(Math.random() * this.lists.length)].img; - }, - startCrop() { - // start - this.crap = true; - this.$refs.cropper.startCrop(); - }, - stopCrop() { - // stop - this.crap = false; - this.$refs.cropper.stopCrop(); - }, - clearCrop() { - // clear - this.$refs.cropper.clearCrop(); - }, - refreshCrop() { - // clear - this.$refs.cropper.refresh(); - }, - changeScale(num) { - num = num || 1; - this.$refs.cropper.changeScale(num); - }, - rotateLeft() { - this.$refs.cropper.rotateLeft(); - }, - rotateRight() { - this.$refs.cropper.rotateRight(); - }, - finish(type) { - if (type === "blob") { - this.$refs.cropper.getCropBlob(data => { - var img = window.URL.createObjectURL(data); - this.model = true; - this.modelSrc = img; - }); - } else { - this.$refs.cropper.getCropData(data => { - this.model = true; - this.modelSrc = data; - }); - } - }, - // 瀹炴椂棰勮鍑芥暟 - realTime(data) { - var previews = data; - var h = 0.5; - var w = 0.2; - - this.previewStyle1 = { - width: previews.w + "px", - height: previews.h + "px", - overflow: "hidden", - margin: "0", - zoom: h - }; - - this.previewStyle2 = { - width: previews.w + "px", - height: previews.h + "px", - overflow: "hidden", - margin: "0", - zoom: w - }; - - this.previewStyle3 = { - width: previews.w + "px", - height: previews.h + "px", - overflow: "hidden", - margin: "0", - zoom: (100 / previews.w) - }; - - this.previewStyle4 = { - width: previews.w + "px", - height: previews.h + "px", - overflow: "hidden", - margin: "0", - zoom: (100 / previews.h) - }; - - this.previews = data; - }, - - finish2(type) { - this.$refs.cropper2.getCropData(data => { - this.model = true; - this.modelSrc = data; - }); - }, - finish3(type) { - this.$refs.cropper3.getCropData(data => { - this.model = true; - this.modelSrc = data; - }); - }, - down(type) { - // 杈撳嚭 - if (type === "blob") { - this.$refs.cropper.getCropBlob(data => { - this.downImg = window.URL.createObjectURL(data); - if (window.navigator.msSaveBlob) { - var blobObject = new Blob([data]); - window.navigator.msSaveBlob(blobObject, "demo.png"); - } else { - this.$nextTick(() => { - this.$refs.downloadDom.click(); - }); - } - }); - } else { - this.$refs.cropper.getCropData(data => { - this.downImg = data; - if (window.navigator.msSaveBlob) { - var blobObject = new Blob([data]); - window.navigator.msSaveBlob(blobObject, "demo.png"); - } else { - this.$nextTick(() => { - this.$refs.downloadDom.click(); - }); - } - }); - } - }, - - uploadImg(e, num) { - //涓婁紶鍥剧墖 - // this.option.img - var 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(); - reader.onload = e => { - let data; - if (typeof e.target.result === "object") { - // 鎶夾rray Buffer杞寲涓篵lob 濡傛灉鏄痓ase64涓嶉渶瑕� - data = window.URL.createObjectURL(new Blob([e.target.result])); - } else { - data = e.target.result; - } - if (num === 1) { - this.option.img = data; - } else if (num === 2) { - this.example2.img = data; - } - this.$refs.uploadImg.value = '' - }; - // 杞寲涓篵lob - reader.readAsArrayBuffer(file); - }, - imgLoad(msg) { - console.log(msg); - }, - - cropMoving(data) { - this.option.cropData = data; - } - }, - components: { - VueCropper - }, - mounted() { - this.changeImg(); - var list = [].slice.call(document.querySelectorAll("pre code")); - list.forEach((val, index) => { - hljs.highlightBlock(val); - }); - } - }; -</script> - -<style scoped> - * { - margin: 0; - padding: 0; - } - - .content { - 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; - } - } -</style> \ No newline at end of file diff --git a/src/views/jeecg/ImagPreview.vue b/src/views/jeecg/ImagPreview.vue deleted file mode 100644 index 1254298..0000000 --- a/src/views/jeecg/ImagPreview.vue +++ /dev/null @@ -1,115 +0,0 @@ -<template> - <a-card :bordered="false"> - <a-col :span="18"> - <a-spin tip="Loading..." :spinning="spinning"> - <div> - <a-row> - <a-col :span="18"> - <p> - <a-divider orientation="left">缁勪竴</a-divider> - </p> - </a-col> - <a-col :span="6"></a-col> - <!-- 棰勮鍖哄煙 --> - <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="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"> - </div> - </div> - </div> - </template> - </a-col> - </a-row> - </div> - <div> - <a-row> - <a-col :span="18"> - <p> - <a-divider orientation="left">缁勪簩</a-divider> - </p> - </a-col> - <a-col :span="6"></a-col> - <!-- 棰勮鍖哄煙 --> - <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="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"> - </div> - </div> - </div> - </template> - </a-col> - </a-row> - </div> - </a-spin> - <p></p> - </a-col> - </a-card> -</template> - -<script> - - import ARow from 'ant-design-vue/es/grid/Row' - - export default { - name: 'ImagPreview', - components: { - ARow - }, - data() { - return { - description: '鍥剧墖棰勮椤甸潰', - spinning:false, - //鏁版嵁闆� - dataSource: [{ - key:0, - fileDetails:[ - { - imgUrl:"https://static.jeecg.com/upload/test/3a4490d5d1cd495b826e528537a47cc1.jpg" - }, - { - imgUrl:"https://static.jeecg.com/temp/鍥界偓杞欢logo_1606575029126.png" - } - ] - },{ - key:1, - fileDetails:[ - { - imgUrl:"https://static.jeecg.com/upload/test/u27356337152749454924fm27gp0_1588149731821.jpg" - }, - { - imgUrl:"https://static.jeecg.com/upload/test/1_1588149743473.jpg" - } - ] - } - ], - url: { - } - } - }, - created() { - }, - methods: { - } - } -</script> -<style scoped> - .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 .ant-tree-node-content-wrapper.ant-tree-node-selected { - background-color: #1890FF !important; - } -</style> \ No newline at end of file diff --git a/src/views/jeecg/ImgDragSort.vue b/src/views/jeecg/ImgDragSort.vue deleted file mode 100644 index 43b0a3f..0000000 --- a/src/views/jeecg/ImgDragSort.vue +++ /dev/null @@ -1,75 +0,0 @@ -<template> - <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="width: 100%;height: 100%;position: relative;padding: 8px;border: 1px solid #d9d9d9;border-radius: 4px;"> - <img style="width: 100%;" :src="data.filePath" preview="index"> - </div> - </div> - </template> - <a-button @click="sureChange" type="primary" style="margin-top: 115px">纭畾</a-button> - </draggable> - <br/> - <a-row> - <a-col :span="12"> - <p>鎷栨嫿鍓峧son鏁版嵁锛�</p> - <textarea rows="25" style="width: 780px">{{ oldDateSource }}</textarea> - </a-col> - <a-col :span="12"> - <p>鎷栨嫿鍚巎son鏁版嵁锛�</p> - <textarea rows="25" style="width: 780px">{{ newDateSource }}</textarea> - </a-col> - </a-row> - </a-card> -</template> - -<script> - import draggable from 'vuedraggable' - import ARow from 'ant-design-vue/es/grid/Row' - import ACol from 'ant-design-vue/es/grid/Col' - - export default { - name: 'ImgDragSort', - components:{ - ACol, - ARow, - draggable - }, - data() { - return { - description: '鍥剧墖鎷栨嫿鎺掑簭', - spinning: false, - //鏁版嵁闆� - dataSource: [ - {id:'000',sort: 0,filePath: 'https://static.jeecg.com/upload/test/1_1588149743473.jpg'}, - {id:'111',sort: 1,filePath: 'https://static.jeecg.com/upload/test/u27356337152749454924fm27gp0_1588149731821.jpg'}, - {id:'222',sort: 2,filePath: 'https://static.jeecg.com/upload/test/u24454681402491956848fm27gp0_1588149712663.jpg'}, - {id:'333',sort: 3,filePath: 'https://static.jeecg.com/temp/鍥界偓杞欢logo_1606575029126.png'}, - {id:'444',sort: 4,filePath: 'https://static.jeecg.com/upload/test/u8891206113801177793fm27gp0_1588149704459.jpg'} - ], - oldDateSource:[], - newDateSource:[], - } - }, - created(){ - this.oldDateSource = this.dataSource; - }, - methods:{ - end: function (evt) { - console.log("鎷栧姩鍓嶇殑浣嶇疆"+evt.oldIndex); - console.log("鎷栧姩鍚庣殑浣嶇疆"+evt.newIndex); - }, - sureChange(){ - for(var i=0;i<this.dataSource.length;i++){ - this.dataSource[i].sort = i; - } - this.newDateSource = this.dataSource; - } - } - } -</script> - -<style scoped> - -</style> \ No newline at end of file diff --git a/src/views/jeecg/ImgTurnPage.vue b/src/views/jeecg/ImgTurnPage.vue deleted file mode 100644 index 3e692bc..0000000 --- a/src/views/jeecg/ImgTurnPage.vue +++ /dev/null @@ -1,147 +0,0 @@ -<template> - <a-card title="鏍戝舰缁撴瀯鍥剧墖缈婚〉鏌ョ湅" style="min-width: 800px;overflow-x:auto "> - <a-row> - <!-- 宸︿晶鏂囦欢鏍� --> - <a-col :span="5"> - <a-tree - showLine - :treeData="treeData" - :expandedKeys="[expandedKeys[0]]" - :selectedKeys="selectedKeys" - :style="{'height':'500px','border-right':'2px solid #c1c1c1','overflow-y':'auto'}" - @expand="onExpand" - @select="this.onSelect" - > - </a-tree> - </a-col> - - <!--鍙充晶缂╃暐鍥�--> - <a-col :span="19"> - <a-row style="margin-top: 10px"> - <a-col :span="24" style="padding-left: 2%;margin-bottom: 10px"> - <a-button @click="prev" type="primary"><a-icon type="left" />涓婁竴椤�</a-button> - <a-button @click="next" type="primary" style="margin-left: 8px">涓嬩竴椤�<a-icon type="right" /></a-button> - <span style="margin-left: 15%;font-weight: bolder">{{ navName }}</span> - </a-col> - <a-col :span="24" style="padding-left: 2%;"> - <img :src="imgUrl" preview> - </a-col> - </a-row> - </a-col> - </a-row> - </a-card> -</template> - -<script> - import draggable from 'vuedraggable' - - export default { - name: 'ImgTurnPage', - components:{ - draggable - }, - data() { - return { - description: '鍥剧墖缈婚〉', - //鏁版嵁闆� - treeData: [{ - title: '绗竴椤�', - key: '0-0', - children: [{ - title: '1椤�', - key: '0-0-0', - imgUrl:'https://static.jeecg.com/upload/test/1_1588149743473.jpg' - }, { - title: '2椤�', - key: '0-0-1', - imgUrl:'https://static.jeecg.com/upload/test/u27356337152749454924fm27gp0_1588149731821.jpg' - }] - },{ - title: '绗簩椤�', - key: '0-1', - children: [{ - title: '1椤�', - key: '0-1-0', - imgUrl:'https://static.jeecg.com/upload/test/u24454681402491956848fm27gp0_1588149712663.jpg' - }, { - title: '2椤�', - key: '0-1-1', - imgUrl:'https://static.jeecg.com/upload/test/u8891206113801177793fm27gp0_1588149704459.jpg' - }] - },{ - title: '绗笁椤�', - key: '0-2', - children: [{ - title: '1椤�', - key: '0-2-0', - imgUrl:'https://static.jeecg.com/upload/test/1374962_1587621329085.jpg' - }] - }], - selectedKeys:[], - expandedKeys:[], - sort:0, - imgUrl:'', - navName:'', - imgList:[], - } - }, - created(){ - this.getImgList(); - }, - 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++){ - this.imgList.push({key:this.treeData[i].children[j].key,pkey:this.treeData[i].key,sort:count++, - imgUrl:this.treeData[i].children[j].imgUrl,navName:this.treeData[i].title+"/"+this.treeData[i].children[j].title}) - } - } - this.setValue(this.imgList[this.sort]); - }, - onSelect (selectedKeys, info) { - for(var 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]); - break; - } - } - }, - onExpand (expandedKeys) { - this.expandedKeys = []; - if(expandedKeys !== null && expandedKeys !== ''){ - this.expandedKeys[0] = expandedKeys[1]; - } - }, - prev(){ - if(this.sort === 0){ - this.sort = this.imgList.length-1; - }else{ - this.sort = this.sort - 1; - } - this.setValue(this.imgList[this.sort]); - }, - next(){ - if(this.sort === this.imgList.length-1){ - this.sort = 0; - }else{ - this.sort = this.sort + 1; - } - this.setValue(this.imgList[this.sort]); - }, - // 璁剧疆鍙楁帶鑺傜偣鍊� - setValue(value){ - this.selectedKeys = []; - this.imgUrl = value.imgUrl; - this.selectedKeys[0] = value.key; - this.expandedKeys[0] = value.pkey; - this.navName = value.navName; - } - } - } -</script> - -<style scoped> - -</style> \ No newline at end of file diff --git a/src/views/jeecg/InterfaceTest.vue b/src/views/jeecg/InterfaceTest.vue deleted file mode 100644 index 8b30f73..0000000 --- a/src/views/jeecg/InterfaceTest.vue +++ /dev/null @@ -1,92 +0,0 @@ -<template> - <a-card :bordered="false"> - <a-row style="margin-top: 20px"> - <a-col :md="2" :sm="4"> - <a-select defaultValue="POST" style="width: 90px" @change="handleChange" size="large"> - <a-select-option value="POST">POST</a-select-option> - <a-select-option value="GET">GET</a-select-option> - <a-select-option value="PUT">PUT</a-select-option> - <a-select-option value="DELETE">DELETE</a-select-option> - </a-select> - </a-col> - <a-col :md="22" :sm="20"> - <a-input-search - placeholder="input send url" - v-model="url" - @search="onSearch" - enterButton="Send" - size="large" /> - </a-col> - </a-row> - - <a-tabs defaultActiveKey="2"> - <a-tab-pane tab="params" key="2"> - <textarea style="width:100%;font-size: 16px;font-weight:500" :rows="13" @blur="changeVal"> - </textarea> - </a-tab-pane> - </a-tabs> - - <a-tabs defaultActiveKey="1"> - <a-tab-pane tab="response" key="1"> - <textarea style="width:100%;font-size: 16px;font-weight:500" :rows="10" v-html="resultJson" readOnly> - </textarea> - </a-tab-pane> - </a-tabs> - </a-card> -</template> -<script> - import { axios } from '@/utils/request' - import { ACCESS_TOKEN } from "@/store/mutation-types" - import Vue from 'vue' - export default { - name: 'FlowTest', - data(){ - return { - url:"", - paramJson:"", - resultJson:{}, - requestMethod:"POST" - } - }, - methods: { - onSearch (value) { - let that = this - if(!value){ - that.$message.error("璇峰~鍐欒矾寰�") - return false - } - this.resultJson = {}; - axios({ - url: value, - method: this.requestMethod, - data: this.paramJson - }).then((res) => { - console.log(res) - this.resultJson = res - }).catch((err) => { - that.$message.error("璇锋眰寮傚父锛�"+err) - }) - }, - changeVal(e){ - try { - let json = e.target.value; - if(json.indexOf(",}")>0){ - json = json.replace(",}","}"); - } - this.paramJson = JSON.parse(json); - }catch (e) { - console.log(e); - this.$message.error("闈炴硶鐨凧SON瀛楃涓�") - } - }, - handleChange(value) { - this.requestMethod = value; - }, - created () { - const token = Vue.ls.get(ACCESS_TOKEN); - this.headers = {"X-Access-Token":token} - - } - } - } -</script> \ No newline at end of file diff --git a/src/views/jeecg/JVXETableDemo.vue b/src/views/jeecg/JVXETableDemo.vue deleted file mode 100644 index 0453d13..0000000 --- a/src/views/jeecg/JVXETableDemo.vue +++ /dev/null @@ -1,38 +0,0 @@ -<template> - <a-card :bordered="false"> - - <a-tabs> - <a-tab-pane tab="鍩虹绀轰緥" key="1" forceRender> - <j-vxe-demo1/> - </a-tab-pane> - - <a-tab-pane tab="楂樼骇绀轰緥" key="2" forceRender> - <j-vxe-demo2/> - </a-tab-pane> - - <a-tab-pane tab="鑱斿姩绀轰緥" key="3" forceRender> - <j-vxe-demo3/> - </a-tab-pane> - - </a-tabs> - </a-card> -</template> - -<script> - import JVxeDemo1 from '@views/jeecg/JVxeDemo/JVxeDemo1' - import JVxeDemo2 from '@views/jeecg/JVxeDemo/JVxeDemo2' - import JVxeDemo3 from '@views/jeecg/JVxeDemo/JVxeDemo3' - - export default { - name: 'JVXETableDemo', - components: {JVxeDemo2, JVxeDemo1,JVxeDemo3}, - data() { - return {} - }, - methods: {}, - } -</script> - -<style scoped> - -</style> \ No newline at end of file diff --git a/src/views/jeecg/JVxeDemo/JVxeDemo1.vue b/src/views/jeecg/JVxeDemo/JVxeDemo1.vue deleted file mode 100644 index c42cc23..0000000 --- a/src/views/jeecg/JVxeDemo/JVxeDemo1.vue +++ /dev/null @@ -1,304 +0,0 @@ -<template> - <j-vxe-table - ref="vTable" - toolbar - row-number - row-selection - drag-sort - keep-source - :height="580" - :loading="loading" - :dataSource="dataSource" - :columns="columns" - style="margin-top: 8px;" - @valueChange="handleValueChange" - > - - <template v-slot:toolbarSuffix> - <a-button @click="handleTableCheck">琛ㄥ崟楠岃瘉</a-button> - <a-tooltip placement="top" title="鑾峰彇鍊硷紝蹇界暐琛ㄥ崟楠岃瘉" :autoAdjustOverflow="true"> - <a-button @click="handleTableGet">鑾峰彇鍊�</a-button> - </a-tooltip> - <a-tooltip placement="top" title="妯℃嫙鍔犺浇1000鏉℃暟鎹�" :autoAdjustOverflow="true"> - <a-button @click="handleTableSet">璁剧疆鍊�</a-button> - </a-tooltip> - </template> - - <template v-slot:action="props"> - <a @click="handleCK(props)">鏌ョ湅</a> - <a-divider type="vertical"/> - <a-popconfirm title="纭畾鍒犻櫎鍚楋紵" @confirm="handleDL(props)"> - <a>鍒犻櫎</a> - </a-popconfirm> - </template> - - </j-vxe-table> -</template> - -<script> - import moment from 'moment' - import { pushIfNotExist, randomNumber, randomUUID } from '@/utils/util' - import { JVXETypes } from '@/components/jeecg/JVxeTable' - - export default { - name: 'JVxeDemo1', - data() { - return { - loading: false, - columns: [ - { - title: '涓嶅彲缂栬緫', - key: 'normal', - type: JVXETypes.normal, - width: '180px', - fixed: 'left', - defaultValue: 'normal-new', - }, - { - title: '鍗曡鏂囨湰', - key: 'input', - type: JVXETypes.input, - width: '180px', - defaultValue: '', - placeholder: '璇疯緭鍏�${title}', - validateRules: [ - { - required: true, // 蹇呭~ - message: '璇疯緭鍏�${title}' // 鏄剧ず鐨勬枃鏈� - }, - { - pattern: /^[a-z|A-Z][a-z|A-Z\d_-]*$/, // 姝e垯 - message: '${title}蹇呴』浠ュ瓧姣嶅紑澶达紝鍙寘鍚暟瀛椼�佷笅鍒掔嚎銆佹í鏉�' - }, - { - unique: true, - message: '${title}涓嶈兘閲嶅' - }, - { - handler({cellValue, row, column}, callback, target) { - // cellValue 褰撳墠鏍¢獙鐨勫�� - // callback(flag, message) 鏂规硶蹇呴』鎵ц涓斿彧鑳芥墽琛屼竴娆� - // flag = 鏄惁閫氳繃浜嗘牎楠岋紝涓嶅~鍐欐垨鑰呭~鍐� null 浠h〃涓嶈繘琛屼换浣曟搷浣� - // message = 鎻愮ず鐨勭被鍨嬶紝榛樿浣跨敤閰嶇疆鐨� message - // target 琛岀紪杈戠殑瀹炰緥瀵硅薄 - if (cellValue === 'abc') { - callback(false, '${title}涓嶈兘鏄痑bc') // false = 鏈�氳繃鏍¢獙 - } else { - callback(true) // true = 閫氳繃楠岃瘉 - } - }, - message: '${title}榛樿鎻愮ず' - } - ] - }, - { - title: '澶氳鏂囨湰', - key: 'textarea', - type: JVXETypes.textarea, - width: '200px', - }, - { - title: '鏁板瓧', - key: 'number', - type: JVXETypes.inputNumber, - width: '80px', - defaultValue: 32, - // 銆愮粺璁″垪銆憇um = 姹傚拰銆乤verage = 骞冲潎鍊� - statistics: ['sum', 'average'], - }, - { - title: '涓嬫媺妗�', - key: 'select', - type: JVXETypes.select, - width: '180px', - // 涓嬫媺閫夐」 - options: [ - {title: 'String', value: 'string'}, - {title: 'Integer', value: 'int'}, - {title: 'Double', value: 'double'}, - {title: 'Boolean', value: 'boolean'} - ], - allowInput: true, - placeholder: '璇烽�夋嫨' - }, - { - title: '涓嬫媺妗哶瀛楀吀', - key: 'select_dict', - type: JVXETypes.select, - width: '180px', - options: [], - dictCode: 'sex', - placeholder: '璇烽�夋嫨', - }, - { - title: '涓嬫媺妗哶澶氶��', - key: 'select_multiple', - type: JVXETypes.selectMultiple, - width: '205px', - options: [ - {title: 'String', value: 'string'}, - {title: 'Integer', value: 'int'}, - {title: 'Double', value: 'double'}, - {title: 'Boolean', value: 'boolean'} - ], - defaultValue: ['int', 'boolean'], // 澶氫釜榛樿椤� - // defaultValue: 'string,double,int', // 涔熷彲浣跨敤杩欑鏂瑰紡 - placeholder: '澶氶��', - }, - - { - title: '涓嬫媺妗哶鎼滅储', - key: 'select_search', - type: JVXETypes.selectSearch, - width: '180px', - options: [ - {title: 'String', value: 'string'}, - {title: 'Integer', value: 'int'}, - {title: 'Double', value: 'double'}, - {title: 'Boolean', value: 'boolean'} - ], - }, - { - title: '鏃ユ湡鏃堕棿', - key: 'datetime', - type: JVXETypes.datetime, - width: '200px', - defaultValue: '2019-4-30 14:52:22', - placeholder: '璇烽�夋嫨', - }, - { - title: '澶嶉�夋', - key: 'checkbox', - type: JVXETypes.checkbox, - width: '100px', - customValue: ['Y', 'N'], // true ,false - defaultChecked: false, - }, - { - title: '鎿嶄綔', - key: 'action', - type: JVXETypes.slot, - fixed: 'right', - minWidth: '100px', - align: 'center', - slotName: 'action', - } - ], - dataSource: [], - } - - }, - - created() { - this.randomPage(0, 20, true) - }, - methods: { - - handleCK(props) { - this.$message.success('璇峰湪鎺у埗鍙版煡鐪嬭緭鍑�') - // 鍙傛暟浠嬬粛锛� - // props.value 褰撳墠鍗曞厓鏍肩殑鍊� - // props.row 褰撳墠琛岀殑鏁版嵁 - // props.rowId 褰撳墠琛孖D - // props.rowIndex 褰撳墠琛屼笅鏍� - // props.column 褰撳墠鍒楃殑閰嶇疆 - // props.columnIndex 褰撳墠鍒椾笅鏍� - // props.$table vxe瀹炰緥锛屽彲浠ヨ皟鐢╲xe鍐呯疆鏂规硶 - // props.target JVXE瀹炰緥锛屽彲浠ヨ皟鐢↗VXE鍐呯疆鏂规硶 - // props.caseId JVXE瀹炰緥鍞竴ID - // props.scrolling 鏄惁姝e湪婊氬姩 - // props.triggerChange 瑙﹀彂change浜嬩欢锛岀敤浜庢洿鏀箂lot鐨勫�� - console.log('鏌ョ湅: ', {props}) - }, - - handleDL(props) { - // 璋冪敤鍒犻櫎鏂规硶 - props.target.removeRows(props.row) - }, - - handleValueChange(event) { - console.log('handleValueChange.event: ', event) - }, - - /** 琛ㄥ崟楠岃瘉 */ - handleTableCheck() { - this.$refs.vTable.validateTable().then(errMap => { - if (errMap) { - console.log('琛ㄥ崟楠岃瘉鏈�氳繃锛�', {errMap}) - this.$message.error('楠岃瘉鏈�氳繃锛岃鍦ㄦ帶鍒跺彴鏌ョ湅璇︾粏') - } else { - this.$message.success('楠岃瘉閫氳繃') - } - }) - }, - - /** 鑾峰彇鍊硷紝蹇界暐琛ㄥ崟楠岃瘉 */ - handleTableGet() { - const values = this.$refs.vTable.getTableData() - console.log('鑾峰彇鍊�:', {values}) - this.$message.success('鑾峰彇鍊兼垚鍔燂紝璇风湅鎺у埗鍙拌緭鍑�') - }, - - /** 妯℃嫙鍔犺浇1000鏉℃暟鎹� */ - handleTableSet() { - this.randomPage(1, 1000, true) - }, - - /* 闅忔満鐢熸垚鏁版嵁 */ - randomPage(current, pageSize, loading = false) { - if (loading) { - this.loading = true - } - - let randomDatetime = () => { - let time = randomNumber(1000, 9999999999999) - return moment(new Date(time)).format('YYYY-MM-DD HH:mm:ss') - } - - let limit = (current - 1) * pageSize - - let options = ['string', 'int', 'double', 'boolean'] - - let begin = Date.now() - let values = [] - for (let i = 0; i < pageSize; i++) { - values.push({ - id: randomUUID(), - normal: `normal-${(limit + i) + 1}`, - input: `text-${(limit + i) + 1}`, - textarea: `textarea-${(limit + i) + 1}`, - number: randomNumber(0, 233), - select: options[randomNumber(0, 3)], - select_dict: randomNumber(1, 2).toString(), - select_multiple: (() => { - let length = randomNumber(1, 4) - let arr = [] - for (let j = 0; j < length; j++) { - pushIfNotExist(arr, options[randomNumber(0, 3)]) - } - return arr - })(), - select_search: options[randomNumber(0, 3)], - datetime: randomDatetime(), - checkbox: ['Y', 'N'][randomNumber(0, 1)] - }) - } - - this.dataSource = values - let end = Date.now() - let diff = end - begin - - if (loading && diff < pageSize) { - setTimeout(() => { - this.loading = false - }, pageSize - diff) - } - - } - } - } -</script> - -<style scoped> - -</style> \ No newline at end of file diff --git a/src/views/jeecg/JVxeDemo/JVxeDemo2.vue b/src/views/jeecg/JVxeDemo/JVxeDemo2.vue deleted file mode 100644 index 2741028..0000000 --- a/src/views/jeecg/JVxeDemo/JVxeDemo2.vue +++ /dev/null @@ -1,184 +0,0 @@ -<template> - <j-vxe-table - ref="vTable" - toolbar - row-number - row-selection - keep-source - :height="484" - :loading="loading" - :dataSource="dataSource" - :columns="columns" - :pagination="pagination" - style="margin-top: 8px;" - @pageChange="handlePageChange" - > - - <template v-slot:toolbarSuffix> - <a-button @click="handleTableGet">鑾峰彇鍊�</a-button> - </template> - - </j-vxe-table> -</template> - -<script> - import moment from 'moment' - import { randomNumber, randomUUID } from '@/utils/util' - import { JVXETypes } from '@/components/jeecg/JVxeTable' - - export default { - name: 'JVxeDemo2', - data() { - return { - loading: false, - columns: [ - { - title: '涓嬫媺妗哶瀛楀吀琛ㄦ悳绱�', - key: 'select_dict_search', - type: JVXETypes.selectDictSearch, - width: '200px', - // 銆愬瓧鍏歌〃閰嶇疆淇℃伅銆戯細鏁版嵁搴撹〃鍚�,鏄剧ず瀛楁鍚�,瀛樺偍瀛楁鍚� - dict: 'sys_user,realname,username', - }, - { - title: 'JPopup', - key: 'popup', - type: JVXETypes.popup, - width: '180px', - popupCode: 'demo', - field: 'name,sex,age', - orgFields: 'name,sex,age', - destFields: 'popup,popup_sex,popup_age' - }, - { - title: 'JP-鎬у埆', - key: 'popup_sex', - type: JVXETypes.select, - dictCode: 'sex', - disabled: true, - width: '100px', - }, - { - title: 'JP-骞撮緞', - key: 'popup_age', - type: JVXETypes.normal, - width: '80px', - }, - { - title: '杩涘害鏉�', - key: 'progress', - type: JVXETypes.progress, - minWidth: '120px' - }, - { - title: '鍗曢��', - key: 'radio', - type: JVXETypes.radio, - width: '130px', - options: [ - {text: '鐢�', value: '1'}, - {text: '濂�', value: '2'}, - ], - // 鍏佽娓呴櫎閫夋嫨锛堝啀鐐逛竴娆″彇娑堥�夋嫨锛� - allowClear: true - }, - { - title: '涓婁紶', - key: 'upload', - type: JVXETypes.upload, - width: '180px', - btnText: '鐐瑰嚮涓婁紶', - token: true, - responseName: 'message', - action: window._CONFIG['domianURL'] + '/sys/common/upload' - }, - { - title: '鍥剧墖涓婁紶', - key: 'image', - type: JVXETypes.image, - width: '180px', - token: true, - }, - { - title: '鏂囦欢涓婁紶', - key: 'file', - type: JVXETypes.file, - width: '180px', - token: true, - }, - ], - dataSource: [], - pagination: { - current: 1, - pageSize: 10, - pageSizeOptions: ['10', '20', '30', '100', '200'], - total: 1000, - }, - } - - }, - - created() { - this.randomPage(this.pagination.current, this.pagination.pageSize, true) - }, - methods: { - - // 褰撳垎椤靛弬鏁板彉鍖栨椂瑙﹀彂鐨勪簨浠� - handlePageChange(event) { - // 閲嶆柊璧嬪�� - this.pagination.current = event.current - this.pagination.pageSize = event.pageSize - // 鏌ヨ鏁版嵁 - this.randomPage(event.current, event.pageSize, true) - }, - - /** 鑾峰彇鍊硷紝蹇界暐琛ㄥ崟楠岃瘉 */ - handleTableGet() { - const values = this.$refs.vTable.getTableData() - console.log('鑾峰彇鍊�:', {values}) - this.$message.success('鑾峰彇鍊兼垚鍔燂紝璇风湅鎺у埗鍙拌緭鍑�') - }, - - /* 闅忔満鐢熸垚鏁版嵁 */ - randomPage(current, pageSize, loading = false) { - if (loading) { - this.loading = true - } - - let randomDatetime = () => { - let time = randomNumber(1000, 9999999999999) - return moment(new Date(time)).format('YYYY-MM-DD HH:mm:ss') - } - - let limit = (current - 1) * pageSize - - let begin = Date.now() - let values = [] - for (let i = 0; i < pageSize; i++) { - let radio = randomNumber(0, 2) - values.push({ - id: randomUUID(), - select_dict_search: ['', 'admin', '', 'jeecg', ''][randomNumber(0, 4)], - progress: randomNumber(0, 100), - radio: radio ? radio.toString() : null - }) - } - - this.dataSource = values - let end = Date.now() - let diff = end - begin - - if (loading && diff < pageSize) { - setTimeout(() => { - this.loading = false - }, pageSize - diff) - } - - } - } - } -</script> - -<style scoped> - -</style> \ No newline at end of file diff --git a/src/views/jeecg/JVxeDemo/JVxeDemo3.vue b/src/views/jeecg/JVxeDemo/JVxeDemo3.vue deleted file mode 100644 index 6abd376..0000000 --- a/src/views/jeecg/JVxeDemo/JVxeDemo3.vue +++ /dev/null @@ -1,164 +0,0 @@ -<template> - <j-vxe-table - ref="vTable" - toolbar - row-number - row-selection - keep-source - :height="484" - :dataSource="dataSource" - :columns="columns" - :linkage-config="linkageConfig" - /> -</template> - -<script> -import { JVXETypes } from '@/components/jeecg/JVxeTable' -import { getAction } from '@api/manage' - -export default { - name: 'JVxeDemo2', - data() { - return { - // 鑱斿姩閰嶇疆 - linkageConfig: [ - {requestData: this.requestData, key: 's1'}, - // 鍙厤缃涓仈鍔� - {requestData: this.loadMenu, key: 'menu1',}, - ], - columns: [ - { - title: '鎬у埆', - key: 'sex', - type: JVXETypes.select, - dictCode: 'sex', - width: '180px', - placeholder: '璇烽�夋嫨${title}', - }, - { - title: '鐪�/鐩磋緰甯�/鑷不鍖�', - key: 's1', - type: JVXETypes.select, - width: '180px', - placeholder: '璇烽�夋嫨${title}', - // 鑱斿姩瀛楁锛堝嵆涓嬩竴绾х殑瀛楁锛� - linkageKey: 's2', - }, - { - title: '甯�', - key: 's2', - type: JVXETypes.select, - width: '180px', - placeholder: '璇烽�夋嫨${title}', - // 鑱斿姩瀛楁锛堝嵆涓嬩竴绾х殑瀛楁锛� - linkageKey: 's3', - }, - { - title: '鍘�/鍖�', - key: 's3', - type: JVXETypes.select, - width: '180px', - options: [], - placeholder: '璇烽�夋嫨${title}', - }, - { - title: '涓�绾ц彍鍗�', - key: 'menu1', - type: JVXETypes.select, - width: '180px', - placeholder: '璇烽�夋嫨${title}', - // 鑱斿姩瀛楁锛堝嵆涓嬩竴绾х殑瀛楁锛� - linkageKey: 'menu2', - }, - { - title: '浜岀骇鑿滃崟', - key: 'menu2', - type: JVXETypes.select, - width: '180px', - placeholder: '璇烽�夋嫨${title}', - // 鑱斿姩瀛楁锛堝嵆涓嬩竴绾х殑瀛楁锛� - linkageKey: 'menu3', - }, - { - title: '涓夌骇鑿滃崟', - key: 'menu3', - type: JVXETypes.select, - width: '180px', - placeholder: '璇烽�夋嫨${title}', - } - ], - dataSource: [ - {sex: '1', s1: '110000', s2: '110100', s3: '110101'}, - {sex: '2', s1: '130000', s2: '130300', s3: '130303'}, - ], - // 妯℃嫙鏁版嵁 - mockData: [ - {text: '鍖椾含甯�', value: '110000', parent: ''}, - {text: '澶╂触甯�', value: '120000', parent: ''}, - {text: '娌冲寳鐪�', value: '130000', parent: ''}, - {text: '涓婃捣甯�', value: '310000', parent: ''}, - - {text: '鍖椾含甯�', value: '110100', parent: '110000'}, - {text: '澶╂触甯傚競', value: '120100', parent: '120000'}, - {text: '鐭冲搴勫競', value: '130100', parent: '130000'}, - {text: '鍞愬北甯�', value: '130200', parent: '130000'}, - {text: '绉︾殗宀涘競', value: '130300', parent: '130000'}, - {text: '涓婃捣甯�', value: '310100', parent: '310000'}, - - {text: '涓滃煄鍖�', value: '110101', parent: '110100'}, - {text: '瑗垮煄鍖�', value: '110102', parent: '110100'}, - {text: '鏈濋槼鍖�', value: '110105', parent: '110100'}, - {text: '鍜屽钩鍖�', value: '120101', parent: '120100'}, - {text: '娌充笢鍖�', value: '120102', parent: '120100'}, - {text: '娌宠タ鍖�', value: '120103', parent: '120100'}, - {text: '榛勬郸鍖�', value: '310101', parent: '310100'}, - {text: '寰愭眹鍖�', value: '310104', parent: '310100'}, - {text: '闀垮畞鍖�', value: '310105', parent: '310100'}, - {text: '闀垮畨鍖�', value: '130102', parent: '130100'}, - {text: '妗ヨタ鍖�', value: '130104', parent: '130100'}, - {text: '鏂板崕鍖�', value: '130105', parent: '130100'}, - {text: '璺崡鍖�', value: '130202', parent: '130200'}, - {text: '璺寳鍖�', value: '130203', parent: '130200'}, - {text: '鍙ゅ喍鍖�', value: '130204', parent: '130200'}, - {text: '娴锋腐鍖�', value: '130302', parent: '130300'}, - {text: '灞辨捣鍏冲尯', value: '130303', parent: '130300'}, - {text: '鍖楁埓娌冲尯', value: '130304', parent: '130300'}, - ], - } - }, - methods: { - /** - * 妯℃嫙浠庡悗鍙版煡璇㈡暟鎹� - */ - requestData(parent) { - return new Promise((resolve, reject) => { - let data = this.mockData.filter(i => i.parent === parent) - setTimeout(() => { - resolve(data) - }, 500) - }) - }, - - async loadMenu(parent) { - let res - // 濡傛灉parent涓虹┖锛屽垯鏌ヨ绗竴绾ц彍鍗� - if (parent === '') { - res = await getAction('/sys/permission/getSystemMenuList') - } else { - res = await getAction('/sys/permission/getSystemSubmenu', {parentId: parent}) - } - if (res.success) { - // 杩斿洖鐨勬暟鎹噷蹇呴』鍖呭惈 value 鍜� text 瀛楁 - return res.result.map(item => ({value: item.id, text: item.name})) - } - this.$message.warning('loadMenu澶辫触锛�' + res.message) - return [] - }, - - } -} -</script> - -<style scoped> - -</style> \ No newline at end of file diff --git a/src/views/jeecg/JVxeDemo/demo/JSBCDemo.vue b/src/views/jeecg/JVxeDemo/demo/JSBCDemo.vue deleted file mode 100644 index 1052e07..0000000 --- a/src/views/jeecg/JVxeDemo/demo/JSBCDemo.vue +++ /dev/null @@ -1,234 +0,0 @@ -<template> - <a-card title="鍗虫椂淇濆瓨绀轰緥" :bordered="false"> - <!-- - 銆愬嵆鏃朵繚瀛樺ぇ浣撴�濊矾銆戯細 - 1. JVxeTable 涓婂繀椤诲姞 keep-source 灞炴�� - 2. 鐩戝惉 edit-closed浜嬩欢锛岃繖涓簨浠舵槸鍦ㄧ紪杈戝畬鎴愬悗瑙﹀彂 - 3. 鍦ㄨ繖涓簨浠堕噷闈㈠垽鏂暟鎹槸鍚︽洿鏀癸紝濡傛灉鏇存敼浜嗗氨璋冪敤鎺ュ彛杩涜淇濆瓨鎿嶄綔 - --> - <j-vxe-table - toolbar - :toolbarConfig="toolbarConfig" - - row-number - row-selection - keep-source - async-remove - - :height="340" - :loading="loading" - :columns="columns" - :dataSource="dataSource" - :pagination="pagination" - - @save="handleTableSave" - @remove="handleTableRemove" - @edit-closed="handleEditClosed" - @pageChange="handlePageChange" - @selectRowChange="handleSelectRowChange" - /> - </a-card> -</template> - -<script> - import { getAction, postAction, putAction } from '@api/manage' - import { JVXETypes } from '@/components/jeecg/JVxeTable' - - // 鍗虫椂淇濆瓨绀轰緥 - export default { - name: 'JSBCDemo', - data() { - return { - // 宸ュ叿鏍忕殑鎸夐挳閰嶇疆 - toolbarConfig: { - // add 鏂板鎸夐挳锛況emove 鍒犻櫎鎸夐挳锛沜learSelection 娓呯┖閫夋嫨鎸夐挳 - btn: ['add', 'save', 'remove', 'clearSelection'] - }, - // 鏄惁姝e湪鍔犺浇 - loading: false, - // 鍒嗛〉鍣ㄥ弬鏁� - pagination: { - // 褰撳墠椤电爜 - current: 1, - // 姣忛〉鐨勬潯鏁� - pageSize: 200, - // 鍙垏鎹㈢殑鏉℃暟 - pageSizeOptions: ['10', '20', '30', '100', '200'], - // 鏁版嵁鎬绘暟锛堢洰鍓嶅苟涓嶇煡閬撶湡瀹炵殑鎬绘暟锛屾墍浠ュ厛濉啓0锛屽湪鍚庡彴鏌ュ嚭鏉ュ悗鍐嶈祴鍊硷級 - total: 0, - }, - // 閫夋嫨鐨勮 - selectedRows: [], - // 鏁版嵁婧愶紝鎺у埗琛ㄦ牸鐨勬暟鎹� - dataSource: [], - // 鍒楅厤缃紝鎺у埗琛ㄦ牸鏄剧ず鐨勫垪 - columns: [ - {key: 'num', title: '搴忓彿', width: '80px'}, - { - // 瀛楁key锛岃窡鍚庡彴鏁版嵁鐨勫瓧娈靛悕鍖归厤 - key: 'ship_name', - // 鍒楃殑鏍囬 - title: '鑸瑰悕', - // 鍒楃殑瀹藉害 - width: '180px', - // 濡傛灉鍔犱笂浜嗚灞炴�э紝灏变唬琛ㄥ綋鍓嶅崟鍏冩牸鏄彲缂栬緫鐨勶紝type灏辨槸琛ㄥ崟鐨勭被鍨嬶紝input灏辨槸绠�鍗曠殑杈撳叆妗� - type: JVXETypes.input - }, - {key: 'call', title: '鍛煎彨', width: '80px', type: JVXETypes.input}, - {key: 'len', title: '闀�', width: '80px', type: JVXETypes.input}, - {key: 'ton', title: '鍚�', width: '120px', defaultValue: 233, type: JVXETypes.input}, - {key: 'payer', title: '浠樻鏂�', width: '120px', defaultValue: '寮犱笁', type: JVXETypes.input}, - {key: 'count', title: '鏁�', width: '40px'}, - { - key: 'company', - title: '鍏徃', - // 鏈�灏忓搴︼紝涓庡搴︿笉鍚岀殑鏄紝杩欎釜涓嶆槸鍥哄畾鐨勫搴︼紝濡傛灉琛ㄦ牸鏈夊浣欑殑绌洪棿锛屼細骞冲潎鍒嗛厤缁欒缃簡 minWidth 鐨勫垪 - // 濡傛灉瑕佸仛鍗犳弧琛ㄦ牸鐨勫垪鍙互杩欎箞鍐� - minWidth: '180px', - type: JVXETypes.input - }, - {key: 'trend', title: '鍔ㄥ悜', width: '120px', type: JVXETypes.input}, - ], - // 鏌ヨurl鍦板潃 - url: { - getData: '/mock/vxe/getData', - // 妯℃嫙淇濆瓨鍗曡鏁版嵁锛堝嵆鏃朵繚瀛橈級 - saveRow: '/mock/vxe/immediateSaveRow', - // 妯℃嫙淇濆瓨鏁翠釜琛ㄦ牸鐨勬暟鎹� - saveAll: '/mock/vxe/immediateSaveAll', - }, - } - }, - created() { - this.loadData() - }, - methods: { - - // 鍔犺浇鏁版嵁 - loadData() { - // 灏佽鏌ヨ鏉′欢 - let formData = { - pageNo: this.pagination.current, - pageSize: this.pagination.pageSize - } - // 璋冪敤鏌ヨ鏁版嵁鎺ュ彛 - this.loading = true - getAction(this.url.getData, formData).then(res => { - if (res.success) { - // 鍚庡彴鏌ヨ鍥炴潵鐨� total锛屾暟鎹�绘暟閲� - this.pagination.total = res.result.total - // 灏嗘煡璇㈢殑鏁版嵁璧嬪�肩粰 dataSource - this.dataSource = res.result.records - // 閲嶇疆閫夋嫨 - this.selectedRows = [] - } else { - this.$error({title: '涓昏〃鏌ヨ澶辫触', content: res.message}) - } - }).finally(() => { - // 杩欓噷鏄棤璁烘垚鍔熸垨澶辫触閮戒細鎵ц鐨勬柟娉曪紝鍦ㄨ繖閲屽叧闂璴oading - this.loading = false - }) - }, - - // 銆愭暣浣撲繚瀛樸�戠偣鍑讳繚瀛樻寜閽椂瑙﹀彂鐨勪簨浠� - handleTableSave({$table, target}) { - // 鏍¢獙鏁翠釜琛ㄦ牸 - $table.validate().then((errMap) => { - // 鏍¢獙閫氳繃 - if (!errMap) { - // 鑾峰彇鎵�鏈夋暟鎹� - let tableData = target.getTableData() - console.log('褰撳墠淇濆瓨鐨勬暟鎹槸锛�', tableData) - // 鑾峰彇鏂板鐨勬暟鎹� - let newData = target.getNewData() - console.log('-- 鏂板鐨勬暟鎹細', newData) - // 鑾峰彇鍒犻櫎鐨勬暟鎹� - let deleteData = target.getDeleteData() - console.log('-- 鍒犻櫎鐨勬暟鎹細', deleteData) - - // 銆愭ā鎷熶繚瀛樸�� - this.loading = true - postAction(this.url.saveAll, tableData).then(res => { - if (res.success) { - this.$message.success(`淇濆瓨鎴愬姛锛乣) - } else { - this.$message.warn(`淇濆瓨澶辫触锛歚 + res.message) - } - }).finally(() => { - this.loading = false - }) - } - }) - }, - - // 瑙﹀彂鍗曞厓鏍煎垹闄や簨浠� - handleTableRemove(event) { - - // 鎶� event.deleteRows 浼犵粰鍚庡彴杩涜鍒犻櫎锛堟敞鎰忥細杩欓噷涓嶄細浼犻�掑墠绔�昏緫鏂板鐨勬暟鎹紝鍥犱负涓嶉渶瑕佽姹傚悗鍙板垹闄わ級 - console.log('寰呭垹闄ょ殑鏁版嵁: ', event.deleteRows) - // 涔熷彲浠ュ彧浼營D锛屽洜涓哄彲浠ユ牴鎹甀D鍒犻櫎 - let deleteIds = event.deleteRows.map(row => row.id) - console.log('寰呭垹闄ょ殑鏁版嵁ids: ', deleteIds) - - // 妯℃嫙璇锋眰鍚庡彴鍒犻櫎 - this.loading = true - window.setTimeout(() => { - this.loading = false - this.$message.success('鍒犻櫎鎴愬姛') - // 鍋囪鍚庡彴杩斿洖鍒犻櫎鎴愬姛锛屽繀椤昏璋冪敤 confirmRemove() 鏂规硶锛屾墠浼氱湡姝e湪琛ㄦ牸閲岀Щ闄わ紙浼氬悓鏃跺垹闄ら�変腑鐨勯�昏緫鏂板鐨勬暟鎹級 - event.confirmRemove() - }, 1000) - }, - - // 鍗曞厓鏍肩紪杈戝畬鎴愪箣鍚庤Е鍙戠殑浜嬩欢 - handleEditClosed(event) { - let {$table, row, column} = event - - let field = column.property - let cellValue = row[field] - // 鍒ゆ柇鍗曞厓鏍煎�兼槸鍚﹁淇敼 - if ($table.isUpdateByRow(row, field)) { - // 鏍¢獙褰撳墠琛� - $table.validate(row).then((errMap) => { - // 鏍¢獙閫氳繃 - if (!errMap) { - // 銆愭ā鎷熶繚瀛樸�� - let hideLoading = this.$message.loading(`姝e湪淇濆瓨"${column.title}"`, 0) - console.log('鍗虫椂淇濆瓨鏁版嵁锛�', row) - putAction(this.url.saveRow, row).then(res => { - if (res.success) { - this.$message.success(`"${column.title}"淇濆瓨鎴愬姛锛乣) - // 灞�閮ㄦ洿鏂板崟鍏冩牸涓哄凡淇濆瓨鐘舵�� - $table.reloadRow(row, null, field) - } else { - this.$message.warn(`"${column.title}"淇濆瓨澶辫触锛歚 + res.message) - } - }).finally(() => { - hideLoading() - }) - } - }) - } - }, - - // 褰撳垎椤靛弬鏁板彉鍖栨椂瑙﹀彂鐨勪簨浠� - handlePageChange(event) { - // 閲嶆柊璧嬪�� - this.pagination.current = event.current - this.pagination.pageSize = event.pageSize - // 鏌ヨ鏁版嵁 - this.loadData() - }, - - // 褰撻�夋嫨鐨勮鍙樺寲鏃惰Е鍙戠殑浜嬩欢 - handleSelectRowChange(event) { - this.selectedRows = event.selectedRows - }, - - }, - } -</script> - -<style scoped> - -</style> \ No newline at end of file diff --git a/src/views/jeecg/JVxeDemo/demo/PopupSubTable.vue b/src/views/jeecg/JVxeDemo/demo/PopupSubTable.vue deleted file mode 100644 index 2cb159f..0000000 --- a/src/views/jeecg/JVxeDemo/demo/PopupSubTable.vue +++ /dev/null @@ -1,278 +0,0 @@ -<template> - <a-card title="寮瑰嚭瀛愯〃绀轰緥" :bordered="false"> - - <!-- - 銆愬脊鍑哄瓙琛ㄥぇ浣撴�濊矾銆� - 1. 蹇呴』瑕佹湁 click-row-show-sub-form 灞炴�э紝濡傛灉璇ュ睘鎬ц涓篺alse锛岄偅涔堝氨涓嶄細寮瑰嚭瀛愯〃 - 2. 蹇呴』瑕佹湁 sub-form 鎻掓Ы锛岀敤浜庤瀹氬脊鍑哄瓙琛ㄧ殑鍐呭 - 3. highlight-current-row 灞炴�у彲鏈夊彲鏃狅紝濡傛灉鏈夊垯鐐瑰嚮涓�琛岀殑鏃跺�欙紝璇ヨ浼氳儗鏅壊浼氬父浜� - --> - - <!-- - 銆愬脊鍑鸿缁嗕俊鎭紙鏃㈡湁涓昏〃鐨勬暟鎹篃鏈夊瓙琛ㄧ殑锛夊ぇ浣撴�濊矾銆� - 1. 蹇呴』瑕佹湁 click-row-show-main-form 灞炴�э紝濡傛灉璇ュ睘鎬ц涓篺alse锛岄偅涔堝氨涓嶄細寮瑰嚭璇︾粏淇℃伅 - 2. 蹇呴』瑕佹湁 main-form 鎻掓Ы锛岀敤浜庤瀹氬脊鍑哄瓙琛ㄧ殑鍐呭 - 3. 鍙�� click-row-show-sub-form 灞炴�э紝濡傛灉鏈夎灞炴�э紝灏变細鏄剧ず瀛愯〃锛屽惁鑰呬笉鏄剧ず - --> - - <j-vxe-table - toolbar - row-number - row-selection - - highlight-current-row - click-row-show-sub-form - click-row-show-main-form - - :height="750" - :loading="loading" - :columns="columns" - :dataSource="dataSource" - @detailsConfirm="handleDetailsConfirm" - > - - <!-- 涓昏〃鍗� --> - <template v-slot:mainForm="{row}"> - <template v-if="row"> - <a-form-model - ref="form2" - :model="row" - :rules="rules" - :label-col="labelCol" - :wrapper-col="wrapperCol" - > - <a-row :gutter="8"> - <a-col :span="8"> - <a-form-model-item label="ID" prop="id"> - <a-input v-model="row.id" disabled/> - </a-form-model-item> - </a-col> - <a-col :span="8"> - <a-form-model-item label="搴忓彿" prop="num"> - <a-input v-model="row.num"/> - </a-form-model-item> - </a-col> - <a-col :span="8"> - <a-form-model-item label="鑸瑰悕" prop="ship_name"> - <a-input v-model="row.ship_name"/> - </a-form-model-item> - </a-col> - <a-col :span="8"> - <a-form-model-item label="鍛煎彨" prop="call"> - <a-input v-model="row.call"/> - </a-form-model-item> - </a-col> - <a-col :span="8"> - <a-form-model-item label="闀�" prop="len"> - <a-input v-model="row.len"/> - </a-form-model-item> - </a-col> - <a-col :span="8"> - <a-form-model-item label="鍚�" prop="ton"> - <a-input v-model="row.ton"/> - </a-form-model-item> - </a-col> - <a-col :span="8"> - <a-form-model-item label="浠樻鏂�" prop="payer"> - <a-input v-model="row.payer"/> - </a-form-model-item> - </a-col> - <a-col :span="8"> - <a-form-model-item label="鏁�" prop="count"> - <a-input v-model="row.count"/> - </a-form-model-item> - </a-col> - <a-col :span="8"> - <a-form-model-item label="鍏徃" prop="company"> - <a-input v-model="row.company"/> - </a-form-model-item> - </a-col> - <a-col :span="8"> - <a-form-model-item label="鍔ㄥ悜" prop="trend"> - <a-input v-model="row.trend"/> - </a-form-model-item> - </a-col> - </a-row> - </a-form-model> - </template> - - </template> - - <!-- 瀛愯〃鍗� --> - <template v-slot:subForm="{row}"> - <template v-if="loadSubData(row)"> - <j-vxe-table - ref="subFormTable" - height="auto" - :max-height="350" - :loading="subTable.loading" - :columns="subTable.columns" - :dataSource="subTable.dataSource" - /> - </template> - </template> - - </j-vxe-table> - - </a-card> -</template> - -<script> - import { getAction } from '@api/manage' - import { JVXETypes } from '@/components/jeecg/JVxeTable' - - // 寮瑰嚭瀛愯〃绀轰緥 - export default { - name: 'PopupSubTable', - data() { - return { - loading: false, - dataSource: [], - columns: [ - {key: 'num', title: '搴忓彿', width: '80px'}, - {key: 'ship_name', title: '鑸瑰悕', width: '180px', type: JVXETypes.input}, - {key: 'call', title: '鍛煎彨', width: '80px'}, - {key: 'len', title: '闀�', width: '80px'}, - {key: 'ton', title: '鍚�', width: '120px'}, - {key: 'payer', title: '浠樻鏂�', width: '120px'}, - {key: 'count', title: '鏁�', width: '40px'}, - { - key: 'company', - title: '鍏徃', - minWidth: '180px', - // 鏄惁鐐瑰嚮鏄剧ず璇︾粏淇℃伅 - // 鍙湁褰撳墠鍗曞厓鏍间笉鑳界紪杈戠殑鏃跺�欐墠鑳界敓鏁� - // 濡傛灉涓嶈鐨勮瘽锛岀偣鍑诲氨鍙脊鍑哄瓙琛紝涓嶄細寮瑰嚭涓昏〃鐨勮缁嗕俊鎭� - showDetails: true - }, - {key: 'trend', title: '鍔ㄥ悜', width: '120px'}, - ], - // 瀛愯〃鐨勪俊鎭� - subTable: { - currentRowId: null, - loading: false, - pagination: {current: 1, pageSize: 200, pageSizeOptions: ['100', '200'], total: 0}, - selectedRows: [], - dataSource: [], - columns: [ - {key: 'dd_num', title: '璋冨害搴忓彿', width: '120px'}, - {key: 'tug', title: '鎷栬疆', width: '180px', type: JVXETypes.input}, - {key: 'work_start_time', title: '浣滀笟寮�濮嬫椂闂�', width: '180px', type: JVXETypes.input}, - {key: 'work_stop_time', title: '浣滀笟缁撴潫鏃堕棿', width: '180px', type: JVXETypes.input}, - {key: 'type', title: '鑸硅埗鍒嗙被', width: '120px', type: JVXETypes.input}, - {key: 'port_area', title: '鎵�灞炴腐鍖�', minWidth: '120px', type: JVXETypes.input}, - ], - }, - // 鏌ヨurl鍦板潃 - url: { - getData: '/mock/vxe/getData', - }, - // 涓昏〃form琛ㄥ崟瀛楁 - mainForm: { - id: '', - num: '', - ship_name: '', - call: '', - len: '', - ton: '', - payer: '', - count: '', - company: '', - trend: '', - }, - // form琛ㄥ崟 col - labelCol: {span: 4}, - wrapperCol: {span: 20}, - rules: { - num: [ - {required: true, message: '蹇呴』杈撳叆搴忓彿'}, - ], - }, - } - }, - - created() { - this.loadData() - }, - methods: { - - log: console.log, - - // 鍔犺浇鏁版嵁 - loadData() { - // 灏佽鏌ヨ鏉′欢 - let formData = {pageNo: 1, pageSize: 30} - // 璋冪敤鏌ヨ鏁版嵁鎺ュ彛 - this.loading = true - getAction(this.url.getData, formData).then(res => { - if (res.success) { - // 灏嗘煡璇㈢殑鏁版嵁璧嬪�肩粰 dataSource - this.dataSource = res.result.records - // 閲嶇疆閫夋嫨 - this.selectedRows = [] - } else { - this.$error({title: '涓昏〃鏌ヨ澶辫触', content: res.message}) - } - }).finally(() => { - // 杩欓噷鏄棤璁烘垚鍔熸垨澶辫触閮戒細鎵ц鐨勬柟娉曪紝鍦ㄨ繖閲屽叧闂璴oading - this.loading = false - }) - }, - - // 鏌ヨ瀛愯〃鏁版嵁 - loadSubData(row) { - if (row) { - // 杩欓噷涓�瀹氳鍋氶檺鍒讹紝闄愬埗涓嶈兘閲嶅鏌ヨ锛屽惁鑰呬細鍑虹幇姝诲惊鐜� - if (this.subTable.currentRowId === row.id) { - return true - } - this.subTable.currentRowId = row.id - let formData = {pageNo: 1, pageSize: 30, parentId: row.id} - this.subTable.loading = true - getAction(this.url.getData, formData).then(res => { - if (res.success) { - // 灏嗘煡璇㈢殑鏁版嵁璧嬪�肩粰 dataSource - this.subTable.dataSource = res.result.records - } else { - this.$error({title: '涓昏〃鏌ヨ澶辫触', content: res.message}) - } - }).finally(() => { - // 杩欓噷鏄棤璁烘垚鍔熸垨澶辫触閮戒細鎵ц鐨勬柟娉曪紝鍦ㄨ繖閲屽叧闂璴oading - this.subTable.loading = false - }) - return true - } else { - return false - } - }, - - // 璇︾粏淇℃伅閲岀偣浜嗙‘璁ゆ寜閽� - handleDetailsConfirm({row, $table, callback}) { - console.log('淇濆瓨鐨勬暟鎹細', row) - // 鏍¢獙褰撳墠琛� - $table.validate(row).then((errMap) => { - // 鏍¢獙閫氳繃 - if (!errMap) { - // 鏍¢獙瀛愯〃锛屽鏋滈渶瑕佺殑璇濓紝鍙互鎿嶄綔涓嬮潰杩欎釜瀵硅薄锛� - // this.$refs.subFormTable - - callback(true) - this.loading = true - setTimeout(() => { - this.loading = false - this.$message.success('淇濆瓨鎴愬姛') - }, 1000) - } else { - callback(false) - this.$message.warn('鏍¢獙澶辫触') - } - }) - }, - - }, - } -</script> - -<style scoped> - -</style> \ No newline at end of file diff --git a/src/views/jeecg/JVxeDemo/demo/SocketReload.vue b/src/views/jeecg/JVxeDemo/demo/SocketReload.vue deleted file mode 100644 index 0d3e9ac..0000000 --- a/src/views/jeecg/JVxeDemo/demo/SocketReload.vue +++ /dev/null @@ -1,119 +0,0 @@ -<template> - <a-card title="鏃犵棔鍒锋柊绀轰緥" :bordered="false"> - - <div style="margin-bottom: 8px;"> - <span>鍚敤鏁版嵁鍙樺姩鐗规晥锛�</span> - <a-switch v-model="reloadEffect"/> - </div> - - <!-- - 銆愬嵆鏃朵繚瀛樺ぇ浣撴�濊矾銆戯細 - 1. 璇ュ姛鑳戒緷璧栦簬銆愬嵆鏃朵繚瀛樸�戝姛鑳斤紝璇峰厛鐪嬪嵆鏃朵繚瀛樼ず渚� - 2. 蹇呴』瑕佹湁 socket-reload 灞炴�э紝涓旇涓� true - 3. 蹇呴』瑕佹湁 socket-key 灞炴�э紝璇ュ睘鎬т负褰撳墠琛ㄦ牸鐨勫敮涓�鏍囪瘑锛� - 绯荤粺浼氳嚜鍔ㄦ洿鏂版墍鏈� socket-key 鐩稿悓鐨勮〃鏍� - 4. 鍦ㄥ眬閮ㄤ繚瀛� edit-closed 浜嬩欢涓紝 - 淇濆瓨鎴愬姛鍚庤皟鐢� socketSendUpdateRow 鏂规硶锛屽皢褰撳墠 row 浼犻�掕繃鍘诲嵆鍙� 锛堣绗� 108 琛岋級 - --> - <j-vxe-table - ref="table" - row-number - row-selection - - keep-source - socket-reload - socket-key="demo-socket-reload" - :reload-effect="reloadEffect" - - :height="340" - :loading="loading" - :columns="columns" - :dataSource="dataSource" - @edit-closed="handleEditClosed" - /> - </a-card> -</template> - -<script> - import { getAction } from '@api/manage' - import { JVXETypes } from '@/components/jeecg/JVxeTable' - - // 鏃犵棔鍒锋柊绀轰緥 - export default { - name: 'SocketReload', - data() { - return { - loading: false, - dataSource: [], - columns: [ - {key: 'num', title: '搴忓彿', width: '80px'}, - {key: 'ship_name', title: '鑸瑰悕', width: '180px', type: JVXETypes.input}, - {key: 'call', title: '鍛煎彨', width: '80px', type: JVXETypes.input}, - {key: 'len', title: '闀�', width: '80px', type: JVXETypes.input}, - {key: 'ton', title: '鍚�', width: '120px', type: JVXETypes.input}, - {key: 'payer', title: '浠樻鏂�', width: '120px', type: JVXETypes.input}, - {key: 'count', title: '鏁�', width: '40px'}, - {key: 'company', title: '鍏徃', minWidth: '180px', type: JVXETypes.input}, - {key: 'trend', title: '鍔ㄥ悜', width: '120px', type: JVXETypes.input}, - ], - // 鏌ヨurl鍦板潃 - url: { - getData: '/mock/vxe/getData', - }, - // 鏄惁鍚敤鏃ュ巻鍒锋柊鏁堟灉 - reloadEffect: false, - } - }, - created() { - this.loadData() - }, - methods: { - // 鍔犺浇鏁版嵁 - loadData() { - let formData = {pageNo: 1, pageSize: 200} - this.loading = true - getAction(this.url.getData, formData).then(res => { - if (res.success) { - this.dataSource = res.result.records - } else { - this.$error({title: '涓昏〃鏌ヨ澶辫触', content: res.message}) - } - }).finally(() => { - this.loading = false - }) - }, - - // 鍗曞厓鏍肩紪杈戝畬鎴愪箣鍚庤Е鍙戠殑浜嬩欢 - handleEditClosed(event) { - let {$table, row, column} = event - - let field = column.property - let cellValue = row[field] - // 鍒ゆ柇鍗曞厓鏍煎�兼槸鍚﹁淇敼 - if ($table.isUpdateByRow(row, field)) { - // 鏍¢獙褰撳墠琛� - $table.validate(row).then((errMap) => { - // 鏍¢獙閫氳繃 - if (!errMap) { - // 銆愭ā鎷熶繚瀛樸�戯紙姝ゅ闇�瑕佹浛鎹㈡垚鐪熷疄鐨勮姹傦級 - let hideLoading = this.$message.loading(`姝e湪淇濆瓨"${column.title}"`, 0) - setTimeout(() => { - hideLoading() - this.$message.success(`"${column.title}"淇濆瓨鎴愬姛锛乣) - // 灞�閮ㄦ洿鏂板崟鍏冩牸涓哄凡淇濆瓨鐘舵�� - $table.reloadRow(row, null, field) - // 鍙戦�佹洿鏂版秷鎭� - this.$refs.table.socketSendUpdateRow(row) - }, 555) - } - }) - } - }, - - }, - } -</script> - -<style scoped> - -</style> \ No newline at end of file diff --git a/src/views/jeecg/JVxeDemo/layout-demo/ErpTemplate.vue b/src/views/jeecg/JVxeDemo/layout-demo/ErpTemplate.vue deleted file mode 100644 index 532fe09..0000000 --- a/src/views/jeecg/JVxeDemo/layout-demo/ErpTemplate.vue +++ /dev/null @@ -1,308 +0,0 @@ -<template> - - <a-card :bordered="false"> - <j-vxe-table - toolbar - :toolbarConfig="toolbarConfig" - - row-number - row-selection - row-selection-type="radio" - highlight-current-row - click-select-row - :height="tableHeight" - :loading="table1.loading" - :columns="table1.columns" - :dataSource="table1.dataSource" - :pagination="table1.pagination" - :expand-config="expandConfig" - style="margin-bottom: 8px" - - @pageChange="handleTable1PageChange" - @selectRowChange="handleTable1SelectRowChange" - ></j-vxe-table> - - <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 - height="auto" - :maxHeight="350" - :loading="table2.loading" - :columns="table2.columns" - :dataSource="table2.dataSource" - :pagination="table2.pagination" - @pageChange="handleTable2PageChange" - @selectRowChange="handleTable2SelectRowChange" - /> - </a-tab-pane> - <a-tab-pane tab="瀛愯〃2" key="2"> - <h1>杩欓噷鏄瓙琛�2</h1> - <h1>杩欓噷鏄瓙琛�2</h1> - <h1>杩欓噷鏄瓙琛�2</h1> - <h1>杩欓噷鏄瓙琛�2</h1> - <h1>杩欓噷鏄瓙琛�2</h1> - <h1>杩欓噷鏄瓙琛�2</h1> - </a-tab-pane> - </a-tabs> - - </a-card> -</template> - -<script> - import { JVXETypes } from '@/components/jeecg/JVxeTable' - import { getAction } from '@api/manage' - - export default { - name: 'ErpTemplate', - data() { - return { - toolbarConfig: { - // prefix 鍓嶇紑锛泂uffix 鍚庣紑 - slot: ['prefix', 'suffix'], - // add 鏂板鎸夐挳锛況emove 鍒犻櫎鎸夐挳锛沜learSelection 娓呯┖閫夋嫨鎸夐挳 - btn: ['add', 'remove', 'clearSelection'] - }, - - expandConfig: { - // 鏄惁鍙兘鍚屾椂灞曞紑涓�琛� - accordion: true - }, - - // 瀛愯〃 tabs - subTabs: { - show: false, - // 鏄惁灞曞紑 - expand: true, - // 鏄惁鑷姩灞曞紑 - autoExpand: true, - }, - - table1: { - // 鏄惁姝e湪鍔犺浇 - loading: false, - // 鍒嗛〉鍣ㄥ弬鏁� - pagination: { - // 褰撳墠椤电爜 - current: 1, - // 姣忛〉鐨勬潯鏁� - pageSize: 200, - // 鍙垏鎹㈢殑鏉℃暟 - pageSizeOptions: ['10', '20', '30', '100', '200'], - // 鏁版嵁鎬绘暟锛堢洰鍓嶅苟涓嶇煡閬撶湡瀹炵殑鎬绘暟锛屾墍浠ュ厛濉啓0锛屽湪鍚庡彴鏌ュ嚭鏉ュ悗鍐嶈祴鍊硷級 - total: 0, - showTotal: (total, range) => { - // 姝ゅ涓� jsx 璇硶 - let text = <span>{range[0] + '-' + range[1] + ' 鍏� ' + total + ' 鏉�'}</span> - // 鍒ゆ柇瀛愯〃鏄惁鏄剧ず锛屽鏋滄樉绀哄氨娓叉煋灞曞紑鏀惰捣鎸夐挳 - if (this.subTabs.show) { - let expand = (<span> - <a-button type="link" onClick={this.handleToggleTabs}> - <a-icon type={this.subTabs.expand ? 'up' : 'down'}/> - <span>{this.subTabs.expand ? '鏀惰捣' : '灞曞紑'}</span> - </a-button> - <a-checkbox vModel={this.subTabs.autoExpand}>鑷姩灞曞紑</a-checkbox> - </span>) - // 杩斿洖澶氫釜dom鐢ㄦ暟缁� - return [expand, text] - } else { - // 鐩存帴杩斿洖鍗曚釜dom - return text - } - }, - }, - // 閫夋嫨鐨勮 - selectedRows: [], - // 鏁版嵁婧愶紝鎺у埗琛ㄦ牸鐨勬暟鎹� - dataSource: [], - // 鍒楅厤缃紝鎺у埗琛ㄦ牸鏄剧ず鐨勫垪 - columns: [ - {key: 'num', title: '搴忓彿', width: '80px'}, - { - // 瀛楁key锛岃窡鍚庡彴鏁版嵁鐨勫瓧娈靛悕鍖归厤 - key: 'ship_name', - // 鍒楃殑鏍囬 - title: '鑸瑰悕', - // 鍒楃殑瀹藉害 - width: '180px', - // 濡傛灉鍔犱笂浜嗚灞炴�э紝灏变唬琛ㄥ綋鍓嶅崟鍏冩牸鏄彲缂栬緫鐨勶紝type灏辨槸琛ㄥ崟鐨勭被鍨嬶紝input灏辨槸绠�鍗曠殑杈撳叆妗� - type: JVXETypes.input - }, - {key: 'call', title: '鍛煎彨', width: '990px', type: JVXETypes.input}, - {key: 'len', title: '闀�', width: '80px', type: JVXETypes.inputNumber}, - {key: 'ton', title: '鍚�', width: '120px', type: JVXETypes.inputNumber}, - {key: 'payer', title: '浠樻鏂�', width: '120px', type: JVXETypes.input}, - {key: 'count', title: '鏁�', width: '40px'}, - { - key: 'company', - title: '鍏徃', - // 鏈�灏忓搴︼紝涓庡搴︿笉鍚岀殑鏄紝杩欎釜涓嶆槸鍥哄畾鐨勫搴︼紝濡傛灉琛ㄦ牸鏈夊浣欑殑绌洪棿锛屼細骞冲潎鍒嗛厤缁欒缃簡 minWidth 鐨勫垪 - // 濡傛灉瑕佸仛鍗犳弧琛ㄦ牸鐨勫垪鍙互杩欎箞鍐� - minWidth: '180px', - type: JVXETypes.input - }, - {key: 'trend', title: '鍔ㄥ悜', width: '120px', type: JVXETypes.input}, - ], - }, - // 瀛愮骇琛ㄧ殑閰嶇疆淇℃伅 锛堥厤缃拰涓昏〃鐨勫畬鍏ㄤ竴鑷达紝灏变笉鍐欏啑浣欑殑娉ㄩ噴浜嗭級 - table2: { - currentRowId: null, - loading: false, - pagination: {current: 1, pageSize: 10, pageSizeOptions: ['5', '10', '20', '30'], total: 0}, - selectedRows: [], - dataSource: [], - columns: [ - {key: 'dd_num', title: '璋冨害搴忓彿', width: '120px'}, - {key: 'tug', title: '鎷栬疆', width: '180px', type: JVXETypes.input}, - {key: 'work_start_time', title: '浣滀笟寮�濮嬫椂闂�', width: '180px', type: JVXETypes.input}, - {key: 'work_stop_time', title: '浣滀笟缁撴潫鏃堕棿', width: '180px', type: JVXETypes.input}, - {key: 'type', title: '鑸硅埗鍒嗙被', width: '120px', type: JVXETypes.input}, - {key: 'port_area', title: '鎵�灞炴腐鍖�', width: '120px', type: JVXETypes.input}, - ], - }, - currentSubRow: null, - // 鏌ヨurl鍦板潃 - url: { - getData: '/mock/vxe/getData', - }, - } - }, - computed: { - tableHeight() { - let {show, expand} = this.subTabs - return show ? (expand ? 350 : 482) : 482 - }, - }, - created() { - this.loadTable1Data() - }, - methods: { - - // 鍔犺浇table1銆愪富琛ㄣ�戠殑鏁版嵁 - loadTable1Data() { - // 灏佽鏌ヨ鏉′欢 - let formData = { - pageNo: this.table1.pagination.current, - pageSize: this.table1.pagination.pageSize - } - // 璋冪敤鏌ヨ鏁版嵁鎺ュ彛 - this.table1.loading = true - getAction(this.url.getData, formData).then(res => { - if (res.success) { - // 鍚庡彴鏌ヨ鍥炴潵鐨� total锛屾暟鎹�绘暟閲� - this.table1.pagination.total = res.result.total - // 灏嗘煡璇㈢殑鏁版嵁璧嬪�肩粰 dataSource - this.table1.dataSource = res.result.records - // 閲嶇疆閫夋嫨 - this.table1.selectedRows = [] - } else { - this.$error({title: '涓昏〃鏌ヨ澶辫触', content: res.message}) - } - }).finally(() => { - // 杩欓噷鏄棤璁烘垚鍔熸垨澶辫触閮戒細鎵ц鐨勬柟娉曪紝鍦ㄨ繖閲屽叧闂璴oading - this.table1.loading = false - }) - }, - - // 鏌ヨ瀛愯〃鏁版嵁 - loadSubData(row) { - if (row) { - // 杩欓噷涓�瀹氳鍋氶檺鍒讹紝闄愬埗涓嶈兘閲嶅鏌ヨ锛屽惁鑰呬細鍑虹幇姝诲惊鐜� - if (this.table2.currentRowId === row.id) { - return true - } - this.table2.currentRowId = row.id - this.loadTable2Data() - return true - } else { - return false - } - }, - // 鏌ヨ瀛愯〃鏁版嵁 - loadTable2Data() { - let table2 = this.table2 - let formData = { - parentId: table2.currentRowId, - pageNo: this.table2.pagination.current, - pageSize: this.table2.pagination.pageSize - } - table2.loading = true - getAction(this.url.getData, formData).then(res => { - if (res.success) { - // 灏嗘煡璇㈢殑鏁版嵁璧嬪�肩粰 dataSource - table2.selectedRows = [] - table2.dataSource = res.result.records - table2.pagination.total = res.result.total - } else { - this.$error({title: '瀛愯〃鏌ヨ澶辫触', content: res.message}) - } - }).finally(() => { - // 杩欓噷鏄棤璁烘垚鍔熸垨澶辫触閮戒細鎵ц鐨勬柟娉曪紝鍦ㄨ繖閲屽叧闂璴oading - table2.loading = false - }) - }, - - - // table1銆愪富琛ㄣ�戝綋閫夋嫨鐨勮鍙樺寲鏃惰Е鍙戠殑浜嬩欢 - handleTable1SelectRowChange(event) { - this.table1.selectedRows = event.selectedRows - this.subTabs.show = true - if (this.subTabs.autoExpand) { - this.subTabs.expand = true - } - this.loadSubData(event.selectedRows[0]) - }, - // table2銆愬瓙琛ㄣ�戝綋閫夋嫨鐨勮鍙樺寲鏃惰Е鍙戠殑浜嬩欢 - handleTable2SelectRowChange(event) { - this.table2.selectedRows = event.selectedRows - }, - - handleTable1PageChange(event) { - // 閲嶆柊璧嬪�� - this.table1.pagination.current = event.current - this.table1.pagination.pageSize = event.pageSize - // 鏌ヨ鏁版嵁 - this.loadTable1Data() - }, - // 褰搕able2銆愬瓙琛ㄣ�戝垎椤靛弬鏁板彉鍖栨椂瑙﹀彂鐨勪簨浠� - handleTable2PageChange(event) { - // 閲嶆柊璧嬪�� - this.table2.pagination.current = event.current - this.table2.pagination.pageSize = event.pageSize - // 鏌ヨ鏁版嵁 - this.loadTable2Data() - }, - - // 灞曞紑鎴栨敹璧峰瓙琛╰abs - handleToggleTabs() { - this.subTabs.expand = !this.subTabs.expand - }, - - }, - - } -</script> - -<style lang="less" scoped> - .sub-tabs { - &.un-expand { - /deep/ .ant-tabs-content { - height: 0 !important; - } - - /deep/ .ant-tabs-bar { - border-color: transparent !important; - } - - /deep/ .ant-tabs-ink-bar { - background-color: transparent !important; - } - - /deep/ .ant-tabs-tab { - display: none !important; - } - } - } -</style> \ No newline at end of file diff --git a/src/views/jeecg/JVxeDemo/layout-demo/Index.vue b/src/views/jeecg/JVxeDemo/layout-demo/Index.vue deleted file mode 100644 index 09da804..0000000 --- a/src/views/jeecg/JVxeDemo/layout-demo/Index.vue +++ /dev/null @@ -1,42 +0,0 @@ -<template> - <a-card :bordered="false"> - <a-tabs> - <a-tab-pane tab="ERP甯冨眬妯℃澘" key="erp"> - <erp-template/> - </a-tab-pane> - <a-tab-pane tab="甯冨眬妯℃澘1" key="1"> - <template1/> - </a-tab-pane> - <a-tab-pane tab="甯冨眬妯℃澘2" key="2"> - <template2/> - </a-tab-pane> - <a-tab-pane tab="甯冨眬妯℃澘3" key="3"> - <template3/> - </a-tab-pane> - <a-tab-pane tab="甯冨眬妯℃澘4" key="4"> - <template4/> - </a-tab-pane> - <a-tab-pane tab="甯冨眬妯℃澘5" key="5"> - <template5/> - </a-tab-pane> - </a-tabs> - </a-card> -</template> - -<script> - import Template1 from './Template1' - import Template2 from './Template2' - import Template3 from './Template3' - import Template4 from './Template4' - import Template5 from './Template5' - import ErpTemplate from './ErpTemplate' - - export default { - name: 'LayoutDemo', - components: {Template5, Template4, Template3, Template2, Template1, ErpTemplate} - } -</script> - -<style scoped> - -</style> \ No newline at end of file diff --git a/src/views/jeecg/JVxeDemo/layout-demo/Template1.vue b/src/views/jeecg/JVxeDemo/layout-demo/Template1.vue deleted file mode 100644 index a05cf02..0000000 --- a/src/views/jeecg/JVxeDemo/layout-demo/Template1.vue +++ /dev/null @@ -1,330 +0,0 @@ -<template> - <a-card :bordered="false"> - <a-row :gutter="8"> - <!-- 杩欓噷鏄埗绾ц妭鐐� --> - <a-col :span="24" style="margin-bottom: 4px;"> - <j-vxe-table - toolbar - row-number - row-selection - click-select-row - highlight-current-row - :radio-config="{highlight: false}" - :checkbox-config="{highlight: false}" - :height="340" - :loading="table1.loading" - :columns="table1.columns" - :dataSource="table1.dataSource" - :pagination="table1.pagination" - @pageChange="handleTable1PageChange" - @selectRowChange="handleTable1SelectRowChange" - /> - </a-col> - <!-- 杩欓噷鏄瓙绾ц妭鐐� --> - <a-col :span="12"> - <j-vxe-table - toolbar - row-number - row-selection - click-select-row - highlight-current-row - :radio-config="{highlight: false}" - :checkbox-config="{highlight: false}" - :height="340" - :loading="table2.loading" - :columns="table2.columns" - :dataSource="table2.dataSource" - :pagination="table2.pagination" - @pageChange="handleTable2PageChange" - @selectRowChange="handleTable2SelectRowChange" - > - </j-vxe-table> - </a-col> - <!-- 杩欓噷鏄瓩绾ц妭鐐� --> - <a-col :span="12"> - <j-vxe-table - toolbar - row-number - row-selection - :height="340" - :loading="table3.loading" - :columns="table3.columns" - :dataSource="table3.dataSource" - :pagination="table3.pagination" - @pageChange="handleTable3PageChange" - > - </j-vxe-table> - </a-col> - </a-row> - </a-card> -</template> - -<script> - import { getAction } from '@api/manage' - import { JVXETypes } from '@/components/jeecg/JVxeTable' - - // 銆愬绉嶅竷灞�妯℃澘銆戜笂闈㈢埗銆佸乏涓嬪瓙銆佸彸涓嬪瓩 - export default { - name: 'Template1', - data() { - return { - table1: { - // 鏄惁姝e湪鍔犺浇 - loading: false, - // 鍒嗛〉鍣ㄥ弬鏁� - pagination: { - // 褰撳墠椤电爜 - current: 1, - // 姣忛〉鐨勬潯鏁� - pageSize: 200, - // 鍙垏鎹㈢殑鏉℃暟 - pageSizeOptions: ['10', '20', '30', '100', '200'], - // 鏁版嵁鎬绘暟锛堢洰鍓嶅苟涓嶇煡閬撶湡瀹炵殑鎬绘暟锛屾墍浠ュ厛濉啓0锛屽湪鍚庡彴鏌ュ嚭鏉ュ悗鍐嶈祴鍊硷級 - total: 0, - }, - // 鏈�鍚庨�変腑鐨勮 - lastRow: null, - // 閫夋嫨鐨勮 - selectedRows: [], - // 鏁版嵁婧愶紝鎺у埗琛ㄦ牸鐨勬暟鎹� - dataSource: [], - // 鍒楅厤缃紝鎺у埗琛ㄦ牸鏄剧ず鐨勫垪 - columns: [ - {key: 'num', title: '搴忓彿', width: '80px'}, - { - // 瀛楁key锛岃窡鍚庡彴鏁版嵁鐨勫瓧娈靛悕鍖归厤 - key: 'ship_name', - // 鍒楃殑鏍囬 - title: '鑸瑰悕', - // 鍒楃殑瀹藉害 - width: '180px', - // 濡傛灉鍔犱笂浜嗚灞炴�э紝灏变唬琛ㄥ綋鍓嶅崟鍏冩牸鏄彲缂栬緫鐨勶紝type灏辨槸琛ㄥ崟鐨勭被鍨嬶紝input灏辨槸绠�鍗曠殑杈撳叆妗� - type: JVXETypes.input, - formatter({cellValue, row, column}) { - let foo = '' - if (row.company === '浣т紥渚句蒋鏈夐檺鍏徃') { - foo += '-233' - } - return cellValue + foo - }, - }, - {key: 'call', title: '鍛煎彨', width: '80px', type: JVXETypes.input}, - {key: 'len', title: '闀�', width: '80px', type: JVXETypes.inputNumber}, - {key: 'ton', title: '鍚�', width: '120px', type: JVXETypes.inputNumber}, - {key: 'payer', title: '浠樻鏂�', width: '120px', type: JVXETypes.input}, - {key: 'count', title: '鏁�', width: '40px'}, - { - key: 'company', - title: '鍏徃', - // 鏈�灏忓搴︼紝涓庡搴︿笉鍚岀殑鏄紝杩欎釜涓嶆槸鍥哄畾鐨勫搴︼紝濡傛灉琛ㄦ牸鏈夊浣欑殑绌洪棿锛屼細骞冲潎鍒嗛厤缁欒缃簡 minWidth 鐨勫垪 - // 濡傛灉瑕佸仛鍗犳弧琛ㄦ牸鐨勫垪鍙互杩欎箞鍐� - minWidth: '180px', - type: JVXETypes.input - }, - {key: 'trend', title: '鍔ㄥ悜', width: '120px', type: JVXETypes.input}, - ], - }, - // 瀛愮骇琛ㄧ殑閰嶇疆淇℃伅 锛堥厤缃拰涓昏〃鐨勫畬鍏ㄤ竴鑷达紝灏变笉鍐欏啑浣欑殑娉ㄩ噴浜嗭級 - table2: { - loading: false, - pagination: {current: 1, pageSize: 200, pageSizeOptions: ['100', '200'], total: 0}, - // 鏈�鍚庨�変腑鐨勮 - lastRow: null, - selectedRows: [], - dataSource: [], - columns: [ - {key: 'dd_num', title: '璋冨害搴忓彿', width: '120px'}, - {key: 'tug', title: '鎷栬疆', width: '180px', type: JVXETypes.input}, - {key: 'work_start_time', title: '浣滀笟寮�濮嬫椂闂�', width: '180px', type: JVXETypes.input}, - {key: 'work_stop_time', title: '浣滀笟缁撴潫鏃堕棿', width: '180px', type: JVXETypes.input}, - {key: 'type', title: '鑸硅埗鍒嗙被', width: '120px', type: JVXETypes.input}, - {key: 'port_area', title: '鎵�灞炴腐鍖�', width: '120px', type: JVXETypes.input}, - ], - }, - // 瀛欑骇琛ㄧ殑閰嶇疆淇℃伅 锛堥厤缃拰涓昏〃鐨勫畬鍏ㄤ竴鑷达紝灏变笉鍐欏啑浣欑殑娉ㄩ噴浜嗭級 - table3: { - loading: false, - pagination: {current: 1, pageSize: 200, pageSizeOptions: ['100', '200'], total: 0}, - selectedRows: [], - dataSource: [], - columns: [ - {key: 'dd_num', title: '璋冨害搴忓彿', width: '120px'}, - {key: 'tug', title: '鎷栬疆', width: '120px', type: JVXETypes.input}, - {key: 'power', title: '椹姏', width: '120px', type: JVXETypes.input}, - {key: 'nature', title: '鎬ц川', width: '120px', type: JVXETypes.input}, - {key: 'departure_time', title: '鍙戣埞鏃堕棿', width: '180px', type: JVXETypes.input}, - ], - }, - // 鏌ヨurl鍦板潃 - url: { - getData: '/mock/vxe/getData', - }, - } - }, - // 鐩戝惉鍣� - watch: { - // 鐩戝惉table1 銆愪富琛ㄣ�戦�夋嫨鐨勬暟鎹彂鐢熶簡鍙樺寲 - ['table1.lastRow'](row) { - this.loadTable2Data() - }, - // 鐩戝惉table2 銆愬瓙琛ㄣ�戦�夋嫨鐨勬暟鎹彂鐢熶簡鍙樺寲 - ['table2.lastRow']() { - this.loadTable3Data() - }, - }, - created() { - this.loadTable1Data() - }, - methods: { - - // 鍔犺浇table1銆愪富琛ㄣ�戠殑鏁版嵁 - loadTable1Data() { - // 灏佽鏌ヨ鏉′欢 - let formData = { - pageNo: this.table1.pagination.current, - pageSize: this.table1.pagination.pageSize - } - // 璋冪敤鏌ヨ鏁版嵁鎺ュ彛 - this.table1.loading = true - getAction(this.url.getData, formData).then(res => { - if (res.success) { - // 鍚庡彴鏌ヨ鍥炴潵鐨� total锛屾暟鎹�绘暟閲� - this.table1.pagination.total = res.result.total - // 灏嗘煡璇㈢殑鏁版嵁璧嬪�肩粰 dataSource - this.table1.dataSource = res.result.records - // 閲嶇疆閫夋嫨 - this.table1.selectedRows = [] - } else { - this.$error({title: '涓昏〃鏌ヨ澶辫触', content: res.message}) - } - }).finally(() => { - // 杩欓噷鏄棤璁烘垚鍔熸垨澶辫触閮戒細鎵ц鐨勬柟娉曪紝鍦ㄨ繖閲屽叧闂璴oading - this.table1.loading = false - }) - }, - - // 褰搕able1銆愪富琛ㄣ�戝垎椤靛弬鏁板彉鍖栨椂瑙﹀彂鐨勪簨浠� - handleTable1PageChange(event) { - // 閲嶆柊璧嬪�� - this.table1.pagination.current = event.current - this.table1.pagination.pageSize = event.pageSize - // 鏌ヨ鏁版嵁 - this.loadTable1Data() - }, - - // table1銆愪富琛ㄣ�戝綋閫夋嫨鐨勮鍙樺寲鏃惰Е鍙戠殑浜嬩欢 - handleTable1SelectRowChange(event) { - this.handleTableSelectRowChange(this.table1, event) - }, - - // 鍔犺浇table2銆愬瓙琛ㄣ�戠殑鏁版嵁锛屾牴鎹富琛ㄧ殑id杩涜鏌ヨ - loadTable2Data() { - // 濡傛灉涓昏〃娌℃湁閫夋嫨锛屽垯涓嶆煡璇� - let selectedRows = this.table1.selectedRows - if (!selectedRows || selectedRows.length === 0) { - this.table2.pagination.total = 0 - this.table2.dataSource = [] - this.table2.selectedRows = [] - return - } else if (this.table1.lastRow == null) { - this.table1.lastRow = selectedRows[selectedRows.length - 1] - } - let formData = { - parentId: this.table1.lastRow.id, - pageNo: this.table2.pagination.current, - pageSize: this.table2.pagination.pageSize - } - this.table2.loading = true - getAction(this.url.getData, formData).then(res => { - if (res.success) { - this.table2.pagination.total = res.result.total - this.table2.dataSource = res.result.records - this.table2.selectedRows = [] - } else { - this.$error({title: '瀛愯〃鏌ヨ澶辫触', content: res.message}) - } - }).finally(() => { - this.table2.loading = false - }) - }, - - // table2銆愬瓙琛ㄣ�戝綋閫夋嫨鐨勮鍙樺寲鏃惰Е鍙戠殑浜嬩欢 - handleTable2SelectRowChange(event) { - this.handleTableSelectRowChange(this.table2, event) - }, - - // 褰搕able2銆愬瓙琛ㄣ�戝垎椤靛弬鏁板彉鍖栨椂瑙﹀彂鐨勪簨浠� - handleTable2PageChange(event) { - // 閲嶆柊璧嬪�� - this.table2.pagination.current = event.current - this.table2.pagination.pageSize = event.pageSize - // 鏌ヨ鏁版嵁 - this.loadTable2Data() - }, - - // 鍔犺浇table3銆愬瓩琛ㄣ�戠殑鏁版嵁锛屾牴鎹瓙琛ㄧ殑id杩涜鏌ヨ - loadTable3Data() { - // 濡傛灉涓昏〃娌℃湁閫夋嫨锛屽垯涓嶆煡璇� - let selectedRows = this.table2.selectedRows - if (!selectedRows || selectedRows.length === 0) { - this.table3.pagination.total = 0 - this.table3.dataSource = [] - this.table3.selectedRows = [] - return - } else if (this.table2.lastRow == null) { - this.table2.lastRow = selectedRows[selectedRows.length - 1] - } - let formData = { - parentId: this.table2.lastRow.id, - pageNo: this.table3.pagination.current, - pageSize: this.table3.pagination.pageSize - } - this.table3.loading = true - getAction(this.url.getData, formData).then(res => { - if (res.success) { - this.table3.pagination.total = res.result.total - this.table3.dataSource = res.result.records - } else { - this.$error({title: '瀛愯〃鏌ヨ澶辫触', content: res.message}) - } - }).finally(() => { - this.table3.loading = false - }) - }, - // 褰搕able3銆愬瓩琛ㄣ�戝垎椤靛弬鏁板彉鍖栨椂瑙﹀彂鐨勪簨浠� - handleTable3PageChange(event) { - // 閲嶆柊璧嬪�� - this.table3.pagination.current = event.current - this.table3.pagination.pageSize = event.pageSize - // 鏌ヨ鏁版嵁 - this.loadTable3Data() - }, - - /** 鍏叡鏂规硶锛氬鐞嗚〃鏍奸�変腑鍙樺寲浜嬩欢 */ - handleTableSelectRowChange(table, event) { - let {row, action, selectedRows, $table} = event - // 鑾峰彇鏈�鍚庝竴涓�変腑鐨� - let lastSelected = selectedRows[selectedRows.length - 1] - if (action === 'selected') { - table.lastRow = row - } else if (action === 'selected-all') { - // 鍙栨秷鍏ㄩ�� - if (selectedRows.length === 0) { - table.lastRow = null - } else if (!table.lastRow) { - table.lastRow = lastSelected - } - } else if (action === 'unselected' && row === table.lastRow) { - table.lastRow = lastSelected - } - $table.setCurrentRow(table.lastRow) - table.selectedRows = selectedRows - }, - - } - } -</script> - -<style lang="less"> - -</style> \ No newline at end of file diff --git a/src/views/jeecg/JVxeDemo/layout-demo/Template2.vue b/src/views/jeecg/JVxeDemo/layout-demo/Template2.vue deleted file mode 100644 index 803c69b..0000000 --- a/src/views/jeecg/JVxeDemo/layout-demo/Template2.vue +++ /dev/null @@ -1,260 +0,0 @@ -<template> - <a-card :bordered="false"> - <a-row :gutter="8"> - <!-- 宸︿晶鐖� --> - <a-col :span="12"> - <j-vxe-table - toolbar - row-number - row-selection - click-select-row - highlight-current-row - :radio-config="{highlight: false}" - :checkbox-config="{highlight: false}" - :height="790" - :loading="table1.loading" - :columns="table1.columns" - :dataSource="table1.dataSource" - :pagination="table1.pagination" - @pageChange="handleTable1PageChange" - @selectRowChange="handleTable1SelectRowChange" - /> - </a-col> - <a-col :span="12"> - - <!-- 宸︿晶閫夋嫨鐨勬暟鎹睍绀哄湪杩欓噷 --> - <j-vxe-table - row-number - :height="381" - - :columns="table1.columns" - :dataSource="table1.selectedRows" - style="margin: 40px 0 8px;" - /> - - <!-- 鍙充笅瀛� --> - <j-vxe-table - toolbar - row-number - row-selection - click-select-row - :height="361" - :loading="table2.loading" - :columns="table2.columns" - :dataSource="table2.dataSource" - :pagination="table2.pagination" - @pageChange="handleTable2PageChange" - @selectRowChange="handleTable2SelectRowChange" - /> - </a-col> - </a-row> - - </a-card> -</template> - -<script> - import { getAction } from '@api/manage' - import { JVXETypes } from '@/components/jeecg/JVxeTable' - - // 銆愬绉嶅竷灞�妯℃澘銆� 宸﹁竟閫夋嫨鍚庯紝璁板綍閫夊埌鍙充晶锛屽彸渚ф槸鐖躲�佸瓙 - export default { - name: 'Template2', - data() { - return { - table1: { - // 鏄惁姝e湪鍔犺浇 - loading: false, - // 鍒嗛〉鍣ㄥ弬鏁� - pagination: { - // 褰撳墠椤电爜 - current: 1, - // 姣忛〉鐨勬潯鏁� - pageSize: 200, - // 鍙垏鎹㈢殑鏉℃暟 - pageSizeOptions: ['10', '20', '30', '100', '200'], - // 鏁版嵁鎬绘暟锛堢洰鍓嶅苟涓嶇煡閬撶湡瀹炵殑鎬绘暟锛屾墍浠ュ厛濉啓0锛屽湪鍚庡彴鏌ュ嚭鏉ュ悗鍐嶈祴鍊硷級 - total: 0, - }, - // 鏈�鍚庨�変腑鐨勮 - lastRow: null, - // 閫夋嫨鐨勮 - selectedRows: [], - // 鏁版嵁婧愶紝鎺у埗琛ㄦ牸鐨勬暟鎹� - dataSource: [], - // 鍒楅厤缃紝鎺у埗琛ㄦ牸鏄剧ず鐨勫垪 - columns: [ - {key: 'num', title: '搴忓彿', width: '80px'}, - { - // 瀛楁key锛岃窡鍚庡彴鏁版嵁鐨勫瓧娈靛悕鍖归厤 - key: 'ship_name', - // 鍒楃殑鏍囬 - title: '鑸瑰悕', - // 鍒楃殑瀹藉害 - width: '180px', - // 濡傛灉鍔犱笂浜嗚灞炴�э紝灏变唬琛ㄥ綋鍓嶅崟鍏冩牸鏄彲缂栬緫鐨勶紝type灏辨槸琛ㄥ崟鐨勭被鍨嬶紝input灏辨槸绠�鍗曠殑杈撳叆妗� - type: JVXETypes.input - }, - {key: 'call', title: '鍛煎彨', width: '80px', type: JVXETypes.input}, - {key: 'len', title: '闀�', width: '80px', type: JVXETypes.input}, - {key: 'ton', title: '鍚�', width: '120px', type: JVXETypes.input}, - {key: 'payer', title: '浠樻鏂�', width: '120px', type: JVXETypes.input}, - {key: 'count', title: '鏁�', width: '40px'}, - { - key: 'company', - title: '鍏徃', - // 鏈�灏忓搴︼紝涓庡搴︿笉鍚岀殑鏄紝杩欎釜涓嶆槸鍥哄畾鐨勫搴︼紝濡傛灉琛ㄦ牸鏈夊浣欑殑绌洪棿锛屼細骞冲潎鍒嗛厤缁欒缃簡 minWidth 鐨勫垪 - // 濡傛灉瑕佸仛鍗犳弧琛ㄦ牸鐨勫垪鍙互杩欎箞鍐� - minWidth: '180px', - type: JVXETypes.input - }, - {key: 'trend', title: '鍔ㄥ悜', width: '120px', type: JVXETypes.input}, - ], - }, - // 瀛愮骇琛ㄧ殑閰嶇疆淇℃伅 锛堥厤缃拰涓昏〃鐨勫畬鍏ㄤ竴鑷达紝灏变笉鍐欏啑浣欑殑娉ㄩ噴浜嗭級 - table2: { - loading: false, - pagination: {current: 1, pageSize: 200, pageSizeOptions: ['100', '200'], total: 0}, - selectedRows: [], - dataSource: [], - columns: [ - {key: 'dd_num', title: '璋冨害搴忓彿', width: '120px'}, - {key: 'tug', title: '鎷栬疆', width: '180px', type: JVXETypes.input}, - {key: 'work_start_time', title: '浣滀笟寮�濮嬫椂闂�', width: '180px', type: JVXETypes.input}, - {key: 'work_stop_time', title: '浣滀笟缁撴潫鏃堕棿', width: '180px', type: JVXETypes.input}, - {key: 'type', title: '鑸硅埗鍒嗙被', width: '120px', type: JVXETypes.input}, - {key: 'port_area', title: '鎵�灞炴腐鍖�', width: '120px', type: JVXETypes.input}, - ], - }, - // 鏌ヨurl鍦板潃 - url: { - getData: '/mock/vxe/getData', - }, - } - }, - // 鐩戝惉鍣� - watch: { - // 鐩戝惉table1 銆愪富琛ㄣ�戦�夋嫨鐨勬暟鎹彂鐢熶簡鍙樺寲 - ['table1.lastRow']() { - this.loadTable2Data() - }, - - }, - created() { - this.loadTable1Data() - }, - methods: { - - // 鍔犺浇table1銆愪富琛ㄣ�戠殑鏁版嵁 - loadTable1Data() { - // 灏佽鏌ヨ鏉′欢 - let formData = { - pageNo: this.table1.pagination.current, - pageSize: this.table1.pagination.pageSize - } - // 璋冪敤鏌ヨ鏁版嵁鎺ュ彛 - this.table1.loading = true - getAction(this.url.getData, formData).then(res => { - if (res.success) { - // 鍚庡彴鏌ヨ鍥炴潵鐨� total锛屾暟鎹�绘暟閲� - this.table1.pagination.total = res.result.total - // 灏嗘煡璇㈢殑鏁版嵁璧嬪�肩粰 dataSource - this.table1.dataSource = res.result.records - // 閲嶇疆閫夋嫨 - this.table1.selectedRows = [] - } else { - this.$error({title: '涓昏〃鏌ヨ澶辫触', content: res.message}) - } - }).finally(() => { - // 杩欓噷鏄棤璁烘垚鍔熸垨澶辫触閮戒細鎵ц鐨勬柟娉曪紝鍦ㄨ繖閲屽叧闂璴oading - this.table1.loading = false - }) - }, - - - // 鍔犺浇table2銆愬瓙琛ㄣ�戠殑鏁版嵁锛屾牴鎹富琛ㄧ殑id杩涜鏌ヨ - loadTable2Data() { - // 濡傛灉涓昏〃娌℃湁閫夋嫨锛屽垯涓嶆煡璇� - let selectedRows = this.table1.selectedRows - if (!selectedRows || selectedRows.length === 0) { - this.table2.pagination.total = 0 - this.table2.dataSource = [] - this.table2.selectedRows = [] - return - } else if (this.table1.lastRow == null) { - this.table1.lastRow = selectedRows[selectedRows.length - 1] - } - let formData = { - parentId: this.table1.lastRow.id, - pageNo: this.table2.pagination.current, - pageSize: this.table2.pagination.pageSize - } - this.table2.loading = true - getAction(this.url.getData, formData).then(res => { - if (res.success) { - this.table2.pagination.total = res.result.total - this.table2.dataSource = res.result.records - this.table2.selectedRows = [] - } else { - this.$error({title: '瀛愯〃鏌ヨ澶辫触', content: res.message}) - } - }).finally(() => { - this.table2.loading = false - }) - }, - - // table1銆愪富琛ㄣ�戝綋閫夋嫨鐨勮鍙樺寲鏃惰Е鍙戠殑浜嬩欢 - handleTable1SelectRowChange(event) { - this.handleTableSelectRowChange(this.table1, event) - }, - - // table2銆愬瓙琛ㄣ�戝綋閫夋嫨鐨勮鍙樺寲鏃惰Е鍙戠殑浜嬩欢 - handleTable2SelectRowChange(event) { - this.table2.selectedRows = event.selectedRows - }, - - // 褰搕able1銆愪富琛ㄣ�戝垎椤靛弬鏁板彉鍖栨椂瑙﹀彂鐨勪簨浠� - handleTable1PageChange(event) { - // 閲嶆柊璧嬪�� - this.table1.pagination.current = event.current - this.table1.pagination.pageSize = event.pageSize - // 鏌ヨ鏁版嵁 - this.loadTable1Data() - }, - - // 褰搕able2銆愬瓙琛ㄣ�戝垎椤靛弬鏁板彉鍖栨椂瑙﹀彂鐨勪簨浠� - handleTable2PageChange(event) { - // 閲嶆柊璧嬪�� - this.table2.pagination.current = event.current - this.table2.pagination.pageSize = event.pageSize - // 鏌ヨ鏁版嵁 - this.loadTable2Data() - }, - - /** 鍏叡鏂规硶锛氬鐞嗚〃鏍奸�変腑鍙樺寲浜嬩欢 */ - handleTableSelectRowChange(table, event) { - let {row, action, selectedRows, $table} = event - // 鑾峰彇鏈�鍚庝竴涓�変腑鐨� - let lastSelected = selectedRows[selectedRows.length - 1] - if (action === 'selected') { - table.lastRow = row - } else if (action === 'selected-all') { - // 鍙栨秷鍏ㄩ�� - if (selectedRows.length === 0) { - table.lastRow = null - } else if (!table.lastRow) { - table.lastRow = lastSelected - } - } else if (action === 'unselected' && row === table.lastRow) { - table.lastRow = lastSelected - } - $table.setCurrentRow(table.lastRow) - table.selectedRows = selectedRows - }, - - } - } -</script> - -<style scoped> - -</style> \ No newline at end of file diff --git a/src/views/jeecg/JVxeDemo/layout-demo/Template3.vue b/src/views/jeecg/JVxeDemo/layout-demo/Template3.vue deleted file mode 100644 index 1c8a37e..0000000 --- a/src/views/jeecg/JVxeDemo/layout-demo/Template3.vue +++ /dev/null @@ -1,245 +0,0 @@ -<template> - - <a-card :bordered="false"> - <a-row :gutter="8"> - <a-col :span="12"> - <!-- 宸︿笂鐖� --> - <j-vxe-table - toolbar - row-number - row-selection - click-select-row - highlight-current-row - :radio-config="{highlight: false}" - :checkbox-config="{highlight: false}" - :height="357" - :loading="table1.loading" - :columns="table1.columns" - :dataSource="table1.dataSource" - :pagination="table1.pagination" - style="margin-bottom: 8px;" - @pageChange="handleTable1PageChange" - @selectRowChange="handleTable1SelectRowChange" - /> - - <!-- 宸︿笅瀛� --> - <j-vxe-table - toolbar - row-number - row-selection - click-select-row - :height="356" - :loading="table2.loading" - :columns="table2.columns" - :dataSource="table2.dataSource" - :pagination="table2.pagination" - @pageChange="handleTable2PageChange" - /> - </a-col> - <!-- 宸︿晶鐖堕�夋嫨鐨勬暟鎹睍绀哄湪杩欓噷 --> - <a-col :span="12"> - <j-vxe-table - row-number - :height="800" - :columns="table1.columns" - :dataSource="table1.selectedRows" - style="margin-top: 40px;" - /> - </a-col> - </a-row> - - </a-card> -</template> - -<script> - import { getAction } from '@api/manage' - import { JVXETypes } from '@/components/jeecg/JVxeTable' - - // 銆愬绉嶅竷灞�妯℃澘銆戝乏渚т笂杈规槸涓昏〃銆佷笅杈规槸瀛愯〃锛屽彸渚ф槸閫変腑鏁版嵁 - export default { - name: 'Template3', - components: {}, - data() { - return { - // 涓昏〃鐨勯厤缃俊鎭� - table1: { - // 鏄惁姝e湪鍔犺浇 - loading: false, - // 鍒嗛〉鍣ㄥ弬鏁� - pagination: { - // 褰撳墠椤电爜 - current: 1, - // 姣忛〉鐨勬潯鏁� - pageSize: 200, - // 鍙垏鎹㈢殑鏉℃暟 - pageSizeOptions: ['10', '20', '30', '100', '200'], - // 鏁版嵁鎬绘暟锛堢洰鍓嶅苟涓嶇煡閬撶湡瀹炵殑鎬绘暟锛屾墍浠ュ厛濉啓0锛屽湪鍚庡彴鏌ュ嚭鏉ュ悗鍐嶈祴鍊硷級 - total: 0, - }, - // 鏈�鍚庨�変腑鐨勮 - lastRow: null, - // 閫夋嫨鐨勮 - selectedRows: [], - // 鏁版嵁婧愶紝鎺у埗琛ㄦ牸鐨勬暟鎹� - dataSource: [], - // 鍒楅厤缃紝鎺у埗琛ㄦ牸鏄剧ず鐨勫垪 - columns: [ - {key: 'num', title: '搴忓彿', width: '80px'}, - { - // 瀛楁key锛岃窡鍚庡彴鏁版嵁鐨勫瓧娈靛悕鍖归厤 - key: 'ship_name', - // 鍒楃殑鏍囬 - title: '鑸瑰悕', - // 鍒楃殑瀹藉害 - width: '180px', - // 濡傛灉鍔犱笂浜嗚灞炴�э紝灏变唬琛ㄥ綋鍓嶅崟鍏冩牸鏄彲缂栬緫鐨勶紝type灏辨槸琛ㄥ崟鐨勭被鍨嬶紝input灏辨槸绠�鍗曠殑杈撳叆妗� - type: JVXETypes.input - }, - {key: 'call', title: '鍛煎彨', width: '80px', type: JVXETypes.input}, - {key: 'len', title: '闀�', width: '80px', type: JVXETypes.input}, - {key: 'ton', title: '鍚�', width: '120px', type: JVXETypes.input}, - {key: 'payer', title: '浠樻鏂�', width: '120px', type: JVXETypes.input}, - {key: 'count', title: '鏁�', width: '40px'}, - {key: 'company', title: '鍏徃', width: '180px', type: JVXETypes.input}, - {key: 'trend', title: '鍔ㄥ悜', width: '120px', type: JVXETypes.input}, - ], - }, - // 瀛愯〃鐨勯厤缃俊鎭� 锛堥厤缃拰涓昏〃鐨勫畬鍏ㄤ竴鑷达紝灏变笉鍐欏啑浣欑殑娉ㄩ噴浜嗭級 - table2: { - loading: false, - pagination: {current: 1, pageSize: 200, pageSizeOptions: ['100', '200'], total: 0}, - dataSource: [], - columns: [ - {key: 'dd_num', title: '璋冨害搴忓彿', width: '120px'}, - {key: 'tug', title: '鎷栬疆', width: '180px', type: JVXETypes.input}, - {key: 'work_start_time', title: '浣滀笟寮�濮嬫椂闂�', width: '180px', type: JVXETypes.input}, - {key: 'work_stop_time', title: '浣滀笟缁撴潫鏃堕棿', width: '180px', type: JVXETypes.input}, - {key: 'type', title: '鑸硅埗鍒嗙被', width: '120px', type: JVXETypes.input}, - {key: 'port_area', title: '鎵�灞炴腐鍖�', width: '120px', type: JVXETypes.input}, - ], - }, - // 鏌ヨurl鍦板潃 - url: { - getData: '/mock/vxe/getData', - }, - } - }, - - // 鐩戝惉鍣� - watch: { - // 鐩戝惉table1 銆愪富琛ㄣ�戦�夋嫨鐨勬暟鎹彂鐢熶簡鍙樺寲 - ['table1.lastRow'](row) { - this.loadTable2Data() - }, - }, - created() { - this.loadTable1Data() - }, - methods: { - - // 鍔犺浇table1锛堜富琛級鐨勬暟鎹� - loadTable1Data() { - // 灏佽鏌ヨ鏉′欢 - let formData = { - pageNo: this.table1.pagination.current, - pageSize: this.table1.pagination.pageSize - } - // 璋冪敤鏌ヨ鏁版嵁鎺ュ彛 - this.table1.loading = true - getAction(this.url.getData, formData).then(res => { - if (res.success) { - // 鍚庡彴鏌ヨ鍥炴潵鐨� total锛屾暟鎹�绘暟閲� - this.table1.pagination.total = res.result.total - // 灏嗘煡璇㈢殑鏁版嵁璧嬪�肩粰 dataSource - this.table1.dataSource = res.result.records - } else { - this.$error({title: '涓昏〃鏌ヨ澶辫触', content: res.message}) - } - }).finally(() => { - // 杩欓噷鏄棤璁烘垚鍔熸垨澶辫触閮戒細鎵ц鐨勬柟娉曪紝鍦ㄨ繖閲屽叧闂璴oading - this.table1.loading = false - }) - }, - // 鍔犺浇table2锛堝瓙琛級鐨勬暟鎹紝鏍规嵁涓昏〃鐨刬d杩涜鏌ヨ - loadTable2Data() { - // 濡傛灉涓昏〃娌℃湁閫夋嫨锛屽垯涓嶆煡璇� - let selectedRows = this.table1.selectedRows - if (!selectedRows || selectedRows.length === 0) { - this.table2.pagination.total = 0 - this.table2.dataSource = [] - return - } else if (this.table1.lastRow == null) { - this.table1.lastRow = selectedRows[selectedRows.length - 1] - } - let formData = { - parentId: this.table1.lastRow.id, - pageNo: this.table2.pagination.current, - pageSize: this.table2.pagination.pageSize - } - this.table2.loading = true - getAction(this.url.getData, formData).then(res => { - if (res.success) { - this.table2.pagination.total = res.result.total - this.table2.dataSource = res.result.records - } else { - this.$error({title: '瀛愯〃鏌ヨ澶辫触', content: res.message}) - } - }).finally(() => { - this.table2.loading = false - }) - }, - - // table1銆愪富琛ㄣ�戝綋鍒嗛〉鍙傛暟鍙樺寲鏃惰Е鍙戠殑浜嬩欢 - handleTable1PageChange(event) { - // 閲嶆柊璧嬪�� - this.table1.pagination.current = event.current - this.table1.pagination.pageSize = event.pageSize - // 鏌ヨ鏁版嵁 - this.loadTable1Data() - // 鍒嗛〉鍚庨噸缃�夋嫨 - this.table1.selectedRows = [] - this.loadTable2Data() - }, - - // table2銆愬瓙琛ㄣ�戝綋鍒嗛〉鍙傛暟鍙樺寲鏃惰Е鍙戠殑浜嬩欢 - handleTable2PageChange(event) { - // 閲嶆柊璧嬪�� - this.table1.pagination.current = event.current - this.table1.pagination.pageSize = event.pageSize - // 鏌ヨ鏁版嵁 - this.loadTable2Data() - }, - - // table1銆愪富琛ㄣ�戝綋閫夋嫨鐨勮鍙樺寲鏃惰Е鍙戠殑浜嬩欢 - handleTable1SelectRowChange(event) { - this.handleTableSelectRowChange(this.table1, event) - }, - - /** 鍏叡鏂规硶锛氬鐞嗚〃鏍奸�変腑鍙樺寲浜嬩欢 */ - handleTableSelectRowChange(table, event) { - let {row, action, selectedRows, $table} = event - // 鑾峰彇鏈�鍚庝竴涓�変腑鐨� - let lastSelected = selectedRows[selectedRows.length - 1] - if (action === 'selected') { - table.lastRow = row - } else if (action === 'selected-all') { - // 鍙栨秷鍏ㄩ�� - if (selectedRows.length === 0) { - table.lastRow = null - } else if (!table.lastRow) { - table.lastRow = lastSelected - } - } else if (action === 'unselected' && row === table.lastRow) { - table.lastRow = lastSelected - } - $table.setCurrentRow(table.lastRow) - table.selectedRows = selectedRows - }, - - }, - } -</script> - -<style scoped> - -</style> \ No newline at end of file diff --git a/src/views/jeecg/JVxeDemo/layout-demo/Template4.vue b/src/views/jeecg/JVxeDemo/layout-demo/Template4.vue deleted file mode 100644 index 8d72a3d..0000000 --- a/src/views/jeecg/JVxeDemo/layout-demo/Template4.vue +++ /dev/null @@ -1,347 +0,0 @@ -<template> - <a-card :bordered="false"> - - <a-row :gutter="8"> - <a-col :span="12"> - <!-- 宸︿笂鐖� --> - <j-vxe-table - toolbar - row-number - row-selection - click-select-row - highlight-current-row - :radio-config="{highlight: false}" - :checkbox-config="{highlight: false}" - :height="340" - :loading="table1.loading" - :columns="table1.columns" - :dataSource="table1.dataSource" - :pagination="table1.pagination" - style="margin-bottom: 8px;" - @pageChange="handleTable1PageChange" - @selectRowChange="handleTable1SelectRowChange" - /> - <!-- 宸︿笅瀛� --> - <j-vxe-table - toolbar - row-number - row-selection - click-select-row - :height="350" - :loading="table2.loading" - :columns="table2.columns" - :dataSource="table2.dataSource" - :pagination="table2.pagination" - @pageChange="handleTable2PageChange" - /> - </a-col> - <!-- 宸︿晶鐖堕�夋嫨鐨勬暟鎹睍绀哄湪杩欓噷 --> - <a-col :span="12"> - <!-- 鍙充笂鐖� --> - <j-vxe-table - row-number - row-selection - click-select-row - highlight-current-row - :radio-config="{highlight: false}" - :checkbox-config="{highlight: false}" - :height="340" - :columns="table1.columns" - :dataSource="table1.selectedRows" - style="margin: 40px 0 8px;" - @selectRowChange="handleTable3SelectRowChange" - /> - <!-- 鍙充笅瀛� --> - <j-vxe-table - toolbar - row-number - row-selection - click-select-row - :height="350" - :loading="table4.loading" - :columns="table4.columns" - :dataSource="table4.dataSource" - :pagination="table4.pagination" - style="margin: 48px 0 0;" - /> - </a-col> - </a-row> - - </a-card> -</template> - -<script> - import { getAction } from '@api/manage' - import { JVXETypes } from '@/components/jeecg/JVxeTable' - - export default { - name: 'Template4', - data() { - return { - table1: { - // 鏄惁姝e湪鍔犺浇 - loading: false, - // 鍒嗛〉鍣ㄥ弬鏁� - pagination: { - // 褰撳墠椤电爜 - current: 1, - // 姣忛〉鐨勬潯鏁� - pageSize: 200, - // 鍙垏鎹㈢殑鏉℃暟 - pageSizeOptions: ['10', '20', '30', '100', '200'], - // 鏁版嵁鎬绘暟锛堢洰鍓嶅苟涓嶇煡閬撶湡瀹炵殑鎬绘暟锛屾墍浠ュ厛濉啓0锛屽湪鍚庡彴鏌ュ嚭鏉ュ悗鍐嶈祴鍊硷級 - total: 0, - }, - // 鏈�鍚庨�変腑鐨勮 - lastRow: null, - // 閫夋嫨鐨勮 - selectedRows: [], - // 鏁版嵁婧愶紝鎺у埗琛ㄦ牸鐨勬暟鎹� - dataSource: [], - // 鍒楅厤缃紝鎺у埗琛ㄦ牸鏄剧ず鐨勫垪 - columns: [ - {key: 'num', title: '搴忓彿', width: '80px'}, - { - // 瀛楁key锛岃窡鍚庡彴鏁版嵁鐨勫瓧娈靛悕鍖归厤 - key: 'ship_name', - // 鍒楃殑鏍囬 - title: '鑸瑰悕', - // 鍒楃殑瀹藉害 - width: '180px', - // 濡傛灉鍔犱笂浜嗚灞炴�э紝灏变唬琛ㄥ綋鍓嶅崟鍏冩牸鏄彲缂栬緫鐨勶紝type灏辨槸琛ㄥ崟鐨勭被鍨嬶紝input灏辨槸绠�鍗曠殑杈撳叆妗� - type: JVXETypes.input - }, - {key: 'call', title: '鍛煎彨', width: '80px', type: JVXETypes.input}, - {key: 'len', title: '闀�', width: '80px', type: JVXETypes.input}, - {key: 'ton', title: '鍚�', width: '120px', type: JVXETypes.input}, - {key: 'payer', title: '浠樻鏂�', width: '120px', type: JVXETypes.input}, - {key: 'count', title: '鏁�', width: '40px'}, - { - key: 'company', - title: '鍏徃', - // 鏈�灏忓搴︼紝涓庡搴︿笉鍚岀殑鏄紝杩欎釜涓嶆槸鍥哄畾鐨勫搴︼紝濡傛灉琛ㄦ牸鏈夊浣欑殑绌洪棿锛屼細骞冲潎鍒嗛厤缁欒缃簡 minWidth 鐨勫垪 - // 濡傛灉瑕佸仛鍗犳弧琛ㄦ牸鐨勫垪鍙互杩欎箞鍐� - minWidth: '180px', - type: JVXETypes.input - }, - {key: 'trend', title: '鍔ㄥ悜', width: '120px', type: JVXETypes.input}, - ], - }, - // 瀛愮骇琛ㄧ殑閰嶇疆淇℃伅 锛堥厤缃拰涓昏〃鐨勫畬鍏ㄤ竴鑷达紝灏变笉鍐欏啑浣欑殑娉ㄩ噴浜嗭級 - table2: { - loading: false, - pagination: {current: 1, pageSize: 200, pageSizeOptions: ['100', '200'], total: 0}, - selectedRows: [], - dataSource: [], - columns: [ - {key: 'dd_num', title: '璋冨害搴忓彿', width: '120px'}, - {key: 'tug', title: '鎷栬疆', width: '180px', type: JVXETypes.input}, - {key: 'work_start_time', title: '浣滀笟寮�濮嬫椂闂�', width: '180px', type: JVXETypes.input}, - {key: 'work_stop_time', title: '浣滀笟缁撴潫鏃堕棿', width: '180px', type: JVXETypes.input}, - {key: 'type', title: '鑸硅埗鍒嗙被', width: '120px', type: JVXETypes.input}, - {key: 'port_area', title: '鎵�灞炴腐鍖�', width: '120px', type: JVXETypes.input}, - ], - }, - table3: { - // 鏈�鍚庨�変腑鐨勮 - lastRow: null, - // 閫夋嫨鐨勮 - selectedRows: [], - }, - table4: { - loading: false, - pagination: {current: 1, pageSize: 200, pageSizeOptions: ['100', '200'], total: 0}, - selectedRows: [], - dataSource: [], - columns: [ - {key: 'dd_num', title: '璋冨害搴忓彿', width: '120px'}, - {key: 'tug', title: '鎷栬疆', width: '180px', type: JVXETypes.input}, - {key: 'work_start_time', title: '浣滀笟寮�濮嬫椂闂�', width: '180px', type: JVXETypes.input}, - {key: 'work_stop_time', title: '浣滀笟缁撴潫鏃堕棿', width: '180px', type: JVXETypes.input}, - {key: 'type', title: '鑸硅埗鍒嗙被', width: '120px', type: JVXETypes.input}, - {key: 'port_area', title: '鎵�灞炴腐鍖�', width: '120px', type: JVXETypes.input}, - ], - }, - // 鏌ヨurl鍦板潃 - url: { - getData: '/mock/vxe/getData', - }, - } - }, - // 鐩戝惉鍣� - watch: { - // 鐩戝惉table1 宸︿笂銆愪富琛ㄣ�戦�夋嫨鐨勬暟鎹彂鐢熶簡鍙樺寲 - ['table1.lastRow']() { - this.loadTable2Data() - }, - // 鐩戝惉table3 鍙充笂銆愪富琛ㄣ�戦�夋嫨鐨勬暟鎹彂鐢熶簡鍙樺寲 - ['table3.lastRow']() { - this.loadTable4Data() - }, - - }, - created() { - this.loadTable1Data() - }, - methods: { - - // 鍔犺浇table1宸︿笂銆愪富琛ㄣ�戠殑鏁版嵁 - loadTable1Data() { - // 灏佽鏌ヨ鏉′欢 - let formData = { - pageNo: this.table1.pagination.current, - pageSize: this.table1.pagination.pageSize - } - // 璋冪敤鏌ヨ鏁版嵁鎺ュ彛 - this.table1.loading = true - getAction(this.url.getData, formData).then(res => { - if (res.success) { - // 鍚庡彴鏌ヨ鍥炴潵鐨� total锛屾暟鎹�绘暟閲� - this.table1.pagination.total = res.result.total - // 灏嗘煡璇㈢殑鏁版嵁璧嬪�肩粰 dataSource - this.table1.dataSource = res.result.records - // 閲嶇疆閫夋嫨 - this.table1.selectedRows = [] - } else { - this.$error({title: '涓昏〃鏌ヨ澶辫触', content: res.message}) - } - }).finally(() => { - // 杩欓噷鏄棤璁烘垚鍔熸垨澶辫触閮戒細鎵ц鐨勬柟娉曪紝鍦ㄨ繖閲屽叧闂璴oading - this.table1.loading = false - }) - }, - - - // 褰搕able1宸︿笂銆愪富琛ㄣ�戝垎椤靛弬鏁板彉鍖栨椂瑙﹀彂鐨勪簨浠� - handleTable1PageChange(event) { - // 閲嶆柊璧嬪�� - this.table1.pagination.current = event.current - this.table1.pagination.pageSize = event.pageSize - // 鏌ヨ鏁版嵁 - this.loadTable1Data() - }, - - - // table1宸︿笂銆愪富琛ㄣ�戝綋閫夋嫨鐨勮鍙樺寲鏃惰Е鍙戠殑浜嬩欢 - handleTable1SelectRowChange(event) { - this.handleTableSelectRowChange(this.table1, event) - }, - - - // 鍔犺浇table2宸︿笅銆愬瓙琛ㄣ�戠殑鏁版嵁锛屾牴鎹富琛ㄧ殑id杩涜鏌ヨ - loadTable2Data() { - // 濡傛灉涓昏〃娌℃湁閫夋嫨锛屽垯涓嶆煡璇� - let selectedRows = this.table1.selectedRows - if (!selectedRows || selectedRows.length === 0) { - this.table2.pagination.total = 0 - this.table2.dataSource = [] - this.table2.selectedRows = [] - return - } else if (this.table1.lastRow == null) { - this.table1.lastRow = selectedRows[selectedRows.length - 1] - } - let formData = { - parentId: this.table1.lastRow.id, - pageNo: this.table2.pagination.current, - pageSize: this.table2.pagination.pageSize - } - this.table2.loading = true - getAction(this.url.getData, formData).then(res => { - if (res.success) { - this.table2.pagination.total = res.result.total - this.table2.dataSource = res.result.records - this.table2.selectedRows = [] - } else { - this.$error({title: '瀛愯〃鏌ヨ澶辫触', content: res.message}) - } - }).finally(() => { - this.table2.loading = false - }) - }, - - // 褰搕able2宸︿笅銆愬瓙琛ㄣ�戝垎椤靛弬鏁板彉鍖栨椂瑙﹀彂鐨勪簨浠� - handleTable2PageChange(event) { - // 閲嶆柊璧嬪�� - this.table2.pagination.current = event.current - this.table2.pagination.pageSize = event.pageSize - // 鏌ヨ鏁版嵁 - this.loadTable2Data() - }, - - - // table3鍙充笂銆愪富琛ㄣ�戝綋閫夋嫨鐨勮鍙樺寲鏃惰Е鍙戠殑浜嬩欢 - handleTable3SelectRowChange(event) { - this.handleTableSelectRowChange(this.table3, event) - }, - - - // 鍔犺浇table4鍙充笅銆愬瓙琛ㄣ�戠殑鏁版嵁锛屾牴鎹富琛ㄧ殑id杩涜鏌ヨ - loadTable4Data() { - let parentIds = [] - // 濡傛灉涓昏〃娌℃湁閫夋嫨锛屽垯涓嶆煡璇� - let selectedRows = this.table3.selectedRows - if (!selectedRows || selectedRows.length === 0) { - this.table4.pagination.total = 0 - this.table4.dataSource = [] - this.table4.selectedRows = [] - return - } else if (this.table3.lastRow == null) { - this.table3.lastRow = selectedRows[selectedRows.length - 1] - } - let formData = { - parentId: this.table3.lastRow.id, - pageNo: this.table4.pagination.current, - pageSize: this.table4.pagination.pageSize - } - this.table4.loading = true - getAction(this.url.getData, formData).then(res => { - if (res.success) { - this.table4.pagination.total = res.result.total - this.table4.dataSource = res.result.records - this.table4.selectedRows = [] - } else { - this.$error({title: '瀛愯〃鏌ヨ澶辫触', content: res.message}) - } - }).finally(() => { - this.table4.loading = false - }) - }, - - - // 褰搕able4鍙充笅銆愬瓙琛ㄣ�戝垎椤靛弬鏁板彉鍖栨椂瑙﹀彂鐨勪簨浠� - handleTable4PageChange(event) { - // 閲嶆柊璧嬪�� - this.table4.pagination.current = event.current - this.table4.pagination.pageSize = event.pageSize - // 鏌ヨ鏁版嵁 - this.loadTable4Data() - }, - - /** 鍏叡鏂规硶锛氬鐞嗚〃鏍奸�変腑鍙樺寲浜嬩欢 */ - handleTableSelectRowChange(table, event) { - let {row, action, selectedRows, $table} = event - // 鑾峰彇鏈�鍚庝竴涓�変腑鐨� - let lastSelected = selectedRows[selectedRows.length - 1] - if (action === 'selected') { - table.lastRow = row - } else if (action === 'selected-all') { - // 鍙栨秷鍏ㄩ�� - if (selectedRows.length === 0) { - table.lastRow = null - } else if (!table.lastRow) { - table.lastRow = lastSelected - } - } else if (action === 'unselected' && row === table.lastRow) { - table.lastRow = lastSelected - } - $table.setCurrentRow(table.lastRow) - table.selectedRows = selectedRows - }, - - } - } -</script> - -<style scoped> - -</style> \ No newline at end of file diff --git a/src/views/jeecg/JVxeDemo/layout-demo/Template5.vue b/src/views/jeecg/JVxeDemo/layout-demo/Template5.vue deleted file mode 100644 index e78f03a..0000000 --- a/src/views/jeecg/JVxeDemo/layout-demo/Template5.vue +++ /dev/null @@ -1,224 +0,0 @@ -<template> - <a-card :bordered="false"> - - <a-row :gutter="8"> - <a-col :span="6"> - <!-- 鍔犱笂 show-line 灞炴�у悗锛屽睍寮�鏀惰捣鍥炬爣鑷姩鍙樻垚 +- 鏍峰紡 --> - <a-tree - class="template-5-tree" - :tree-data="treeData" - show-icon - show-line - :expandedKeys="treeExpandedKeys" - :selectedKeys="[pagination.current]" - @expand="handleTreeExpand" - @select="handleTreeSelect" - > - <!-- 鑷畾涔夊瓙鑺傜偣鍥炬爣 --> - <a-icon slot="myIcon" type="unordered-list" style="color:#0c8fcf;"/> - </a-tree> - </a-col> - <a-col :span="18"> - <j-vxe-table - row-number - row-selection - :height="750" - :loading="loading" - :columns="columns" - :dataSource="dataSource" - :pagination="pagination" - @pageChange="handleTablePageChange" - /> - </a-col> - </a-row> - - - </a-card> -</template> - -<script> - import { getAction } from '@api/manage' - import { JVXETypes } from '@/components/jeecg/JVxeTable' - - // 銆愬绉嶅竷灞�妯℃澘銆戝乏渚т负鏍戯紝鍙充晶涓鸿缂栬緫 - export default { - name: 'Template5', - data() { - return { - // 鏄惁姝e湪鍔犺浇 - loading: false, - // 鍒嗛〉鍣ㄥ弬鏁� - pagination: { - // 褰撳墠椤电爜 - current: 1, - // 姣忛〉鐨勬潯鏁� - pageSize: 50, - // 鍙垏鎹㈢殑鏉℃暟 - pageSizeOptions: ['50'], - // 鏁版嵁鎬绘暟锛堢洰鍓嶅苟涓嶇煡閬撶湡瀹炵殑鎬绘暟锛屾墍浠ュ厛濉啓0锛屽湪鍚庡彴鏌ュ嚭鏉ュ悗鍐嶈祴鍊硷級 - total: 0, - }, - // 閫夋嫨鐨勮 - selectedRows: [], - // 鏁版嵁婧愶紝鎺у埗琛ㄦ牸鐨勬暟鎹� - dataSource: [], - // 鍒楅厤缃紝鎺у埗琛ㄦ牸鏄剧ず鐨勫垪 - columns: [ - {key: 'num', title: '搴忓彿', width: '80px'}, - { - // 瀛楁key锛岃窡鍚庡彴鏁版嵁鐨勫瓧娈靛悕鍖归厤 - key: 'ship_name', - // 鍒楃殑鏍囬 - title: '鑸瑰悕', - // 鍒楃殑瀹藉害 - width: '180px', - // 濡傛灉鍔犱笂浜嗚灞炴�э紝灏变唬琛ㄥ綋鍓嶅崟鍏冩牸鏄彲缂栬緫鐨勶紝type灏辨槸琛ㄥ崟鐨勭被鍨嬶紝input灏辨槸绠�鍗曠殑杈撳叆妗� - type: JVXETypes.input - }, - {key: 'call', title: '鍛煎彨', width: '80px', type: JVXETypes.input}, - {key: 'len', title: '闀�', width: '80px', type: JVXETypes.input}, - {key: 'ton', title: '鍚�', width: '120px', type: JVXETypes.input}, - {key: 'payer', title: '浠樻鏂�', width: '120px', type: JVXETypes.input}, - {key: 'count', title: '鏁�', width: '40px'}, - { - key: 'company', - title: '鍏徃', - // 鏈�灏忓搴︼紝涓庡搴︿笉鍚岀殑鏄紝杩欎釜涓嶆槸鍥哄畾鐨勫搴︼紝濡傛灉琛ㄦ牸鏈夊浣欑殑绌洪棿锛屼細骞冲潎鍒嗛厤缁欒缃簡 minWidth 鐨勫垪 - // 濡傛灉瑕佸仛鍗犳弧琛ㄦ牸鐨勫垪鍙互杩欎箞鍐� - minWidth: '180px', - type: JVXETypes.input - }, - {key: 'trend', title: '鍔ㄥ悜', width: '120px', type: JVXETypes.input}, - ], - // 鏍戠殑鏁版嵁锛岃繖閲屾ā鎷熷垎椤靛浐瀹氭暟鎹紝瀹為檯鎯呭喌搴旇鏄悗鍙版煡鍑烘潵鐨勬暟鎹� - treeData: [ - // 绗�1绾ф暟鎹� - { - title: '1-10椤�', - key: '1-10', - // 绗�2绾ф暟鎹� - children: [ - {title: '绗� 1 椤�', key: 1, slots: {icon: 'myIcon'}}, - {title: '绗� 2 椤�', key: 2, slots: {icon: 'myIcon'}}, - { - title: '绗� 3 椤�', - key: 3, - slots: {icon: 'myIcon'}, - // 绗�3绾ф暟鎹� - children: [ - {title: '绗� 333 椤�', key: 333, slots: {icon: 'myIcon'}}, - {title: '绗� 444 椤�', key: 444, slots: {icon: 'myIcon'}}, - {title: '绗� 555 椤�', key: 555, slots: {icon: 'myIcon'}}, - // 绗�4绗�5绾т互姝ょ被鎺紝鍔犱笂 children 灞炴�у嵆鍙� - ], - }, - {title: '绗� 4 椤�', key: 4, slots: {icon: 'myIcon'}}, - {title: '绗� 5 椤�', key: 5, slots: {icon: 'myIcon'}}, - {title: '绗� 6 椤�', key: 6, slots: {icon: 'myIcon'}}, - {title: '绗� 7 椤�', key: 7, slots: {icon: 'myIcon'}}, - {title: '绗� 8 椤�', key: 8, slots: {icon: 'myIcon'}}, - {title: '绗� 9 椤�', key: 9, slots: {icon: 'myIcon'}}, - {title: '绗� 10 椤�', key: 10, slots: {icon: 'myIcon'}}, - ], - slots: {icon: 'myIcon'}, - }, - { - title: '11-20椤�', - key: '11-20', - children: [ - {title: '绗� 11 椤�', key: 11, slots: {icon: 'myIcon'}}, - {title: '绗� 12 椤�', key: 12, slots: {icon: 'myIcon'}}, - {title: '绗� 13 椤�', key: 13, slots: {icon: 'myIcon'}}, - {title: '绗� 14 椤�', key: 14, slots: {icon: 'myIcon'}}, - {title: '绗� 15 椤�', key: 15, slots: {icon: 'myIcon'}}, - {title: '绗� 16 椤�', key: 16, slots: {icon: 'myIcon'}}, - {title: '绗� 17 椤�', key: 17, slots: {icon: 'myIcon'}}, - {title: '绗� 18 椤�', key: 18, slots: {icon: 'myIcon'}}, - {title: '绗� 19 椤�', key: 19, slots: {icon: 'myIcon'}}, - {title: '绗� 20 椤�', key: 20, slots: {icon: 'myIcon'}}, - ], - slots: {icon: 'myIcon'}, - }, - ], - // 鏍戝睍寮�鐨勫垪锛岄粯璁� 1-10 - treeExpandedKeys: ['1-10'], - // 鏌ヨurl鍦板潃 - url: { - getData: '/mock/vxe/getData', - }, - } - }, - created() { - this.loadData() - }, - methods: { - - // 鍔犺浇琛岀紪杈戠殑鏁版嵁 - loadData() { - // 灏佽鏌ヨ鏉′欢 - let formData = { - pageNo: this.pagination.current, - pageSize: this.pagination.pageSize - } - // 璋冪敤鏌ヨ鏁版嵁鎺ュ彛 - this.loading = true - getAction(this.url.getData, formData).then(res => { - if (res.success) { - // 鍚庡彴鏌ヨ鍥炴潵鐨� total锛屾暟鎹�绘暟閲� - this.pagination.total = res.result.total - // 灏嗘煡璇㈢殑鏁版嵁璧嬪�肩粰 dataSource - this.dataSource = res.result.records - // 閲嶇疆閫夋嫨 - this.selectedRows = [] - } else { - this.$error({title: '涓昏〃鏌ヨ澶辫触', content: res.message}) - } - }).finally(() => { - // 杩欓噷鏄棤璁烘垚鍔熸垨澶辫触閮戒細鎵ц鐨勬柟娉曪紝鍦ㄨ繖閲屽叧闂璴oading - this.loading = false - }) - }, - - handleTablePageChange(event) { - // 閲嶆柊璧嬪�� - this.pagination.current = event.current - this.pagination.pageSize = event.pageSize - // 鏌ヨ鏁版嵁 - this.loadData() - // 鍒ゆ柇鏍戝睍寮�鐨刱ey - if (event.current <= 10) { - this.treeExpandedKeys = ['1-10'] - } else { - this.treeExpandedKeys = ['11-20'] - } - }, - - // 鏍戣閫夋嫨瑙﹀彂鐨勪簨浠� - handleTreeSelect(selectedKeys) { - let key = selectedKeys[0] - if (typeof key === 'string') { - // 鎺у埗鏍戝睍寮�涓哄綋鍓嶉�夋嫨鐨勫垪 - this.treeExpandedKeys = selectedKeys - } else { - this.pagination.current = key - this.loadData() - } - }, - - // 鏍戣閫夋嫨瑙﹀彂鐨勪簨浠� - handleTreeExpand(expandedKeys) { - this.treeExpandedKeys = expandedKeys - }, - - }, - } -</script> - -<style lang="less"> - /** 闅愯棌鏂囦欢灏忓浘鏍� */ - .template-5-tree.ant-tree { - li span.ant-tree-switcher.ant-tree-switcher-noop { - display: none; - } - } -</style> \ No newline at end of file diff --git a/src/views/jeecg/JeecgDemoList.vue b/src/views/jeecg/JeecgDemoList.vue deleted file mode 100644 index b4efe4f..0000000 --- a/src/views/jeecg/JeecgDemoList.vue +++ /dev/null @@ -1,371 +0,0 @@ -<template> - <a-card :bordered="false"> - - <!-- 鏌ヨ鍖哄煙 --> - <div class="table-page-search-wrapper"> - <a-form layout="inline" @keyup.enter.native="searchQuery"> - <a-row :gutter="24"> - - <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="鐢ㄦ埛鍚�"> - <j-input placeholder="璇疯緭鍏ュ悕绉版ā绯婃煡璇�" v-model="queryParam.name"></j-input> - </a-form-item> - </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="骞撮緞"> - <!-- <a-input placeholder="璇疯緭鍏ュ悕绉版煡璇�" v-model="queryParam.age"></a-input>--> - <a-input placeholder="鏈�灏忓勾榫�" type="ge" v-model="queryParam.age_begin" style="width:calc(50% - 15px);"></a-input> - <span class="group-query-strig">~</span> - <a-input placeholder="鏈�澶у勾榫�" type="le" v-model="queryParam.age_end" style="width:calc(50% - 15px);"></a-input> - </a-form-item> - </a-col> - <template v-if="toggleSearchStatus"> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="鐢熸棩"> - <a-range-picker v-model="queryParam.birthdayRange" - format="YYYY-MM-DD" - :placeholder="['寮�濮嬫椂闂�', '缁撴潫鏃堕棿']" - @change="onBirthdayChange" /> - </a-form-item> - </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="鎬у埆"> - <j-dict-select-tag v-model="queryParam.sex" placeholder="璇烽�夋嫨鎬у埆" dictCode="sex"/> - </a-form-item> - </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="閫夋嫨鐢ㄦ埛"> - <j-dict-select-tag v-model="queryParam.id" placeholder="璇烽�夋嫨鐢ㄦ埛" dictCode="demo,name,id"/> - </a-form-item> - </a-col> - </template> - <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> - <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button> - <a @click="handleToggleSearch" style="margin-left: 8px"> - {{ toggleSearchStatus ? '鏀惰捣' : '灞曞紑' }} - <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> - </a> - </a-col> - </span> - </a-row> - </a-form> - </div> - - <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> - <div class="table-operator"> - <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button> - <a-button type="primary" icon="plus" @click="jump">鍒涘缓鍗曟嵁</a-button> - <a-button type="primary" icon="plus" @click="onetomany">涓�瀵瑰</a-button> - <a-button type="primary" icon="download" @click="handleExportXls('鍗曡〃绀轰緥')">瀵煎嚭</a-button> - <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> - <a-button type="primary" icon="import">瀵煎叆</a-button> - </a-upload> - <!-- 楂樼骇鏌ヨ鍖哄煙 --> - <j-super-query :fieldList="fieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> - <a-dropdown v-if="selectedRowKeys.length > 0"> - <a-menu slot="overlay"> - <a-menu-item key="1" @click="batchDel"> - <a-icon type="delete"/> - 鍒犻櫎 - </a-menu-item> - </a-menu> - <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 - <a-icon type="down"/> - </a-button> - </a-dropdown> - </div> - - <!-- table鍖哄煙-begin --> - <div> - <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> - <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ - selectedRowKeys.length }}</a>椤� - <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a> - <span style="float:right;"> - <a @click="loadData()"><a-icon type="sync" />鍒锋柊</a> - <a-divider type="vertical" /> - <a-popover title="鑷畾涔夊垪" trigger="click" placement="leftBottom"> - <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> - </template> - </a-row> - </a-checkbox-group> - </template> - <a><a-icon type="setting" />璁剧疆</a> - </a-popover> - </span> - </div> - - <a-table - ref="table" - size="middle" - bordered - rowKey="id" - :columns="columns" - :dataSource="dataSource" - :pagination="ipagination" - :loading="loading" - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" - @change="handleTableChange"> - - <div slot="filterDropdown"> - <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> - </template> - </a-row> - </a-checkbox-group> - </a-card> - </div> - <a-icon slot="filterIcon" type='setting' :style="{ fontSize:'16px',color: '#108ee9' }" /> - - <span slot="action" slot-scope="text, record"> - <a @click="handleEdit(record)">缂栬緫</a> - - <a-divider type="vertical"/> - <a-dropdown> - <a class="ant-dropdown-link">鏇村 <a-icon type="down"/></a> - <a-menu slot="overlay"> - <a-menu-item> - <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> - <a>鍒犻櫎</a> - </a-popconfirm> - </a-menu-item> - </a-menu> - </a-dropdown> - </span> - - </a-table> - </div> - <!-- table鍖哄煙-end --> - - <!-- 琛ㄥ崟鍖哄煙 --> - <jeecgDemo-modal ref="modalForm" @ok="modalFormOk"></jeecgDemo-modal> - - <!-- 涓�瀵瑰琛ㄥ崟鍖哄煙 --> - <JeecgDemoTabsModal ref="jeecgDemoTabsModal" @ok="modalFormOk"></JeecgDemoTabsModal> - - </a-card> -</template> - -<script> - import JeecgDemoModal from './modules/JeecgDemoModal' - import JSuperQuery from '@/components/jeecg/JSuperQuery.vue'; - import JInput from '@/components/jeecg/JInput.vue'; - import JeecgDemoTabsModal from './modules/JeecgDemoTabsModal' - import {initDictOptions, filterDictText,filterDictTextByCache} from '@/components/dict/JDictSelectUtil' - import { JeecgListMixin } from '@/mixins/JeecgListMixin' - import Vue from 'vue' - import { filterObj } from '@/utils/util'; - - //楂樼骇鏌ヨmodal闇�瑕佸弬鏁� - const superQueryFieldList=[ - { - type: "string", - value: "name", - text: "鐢ㄦ埛鍚�" - }, { - type: "int", - value: "age", - text: "骞撮緞" - }, { - type: "date", - value: "birthday", - text: "鐢熸棩" - } - ] - export default { - name: "JeecgDemoList", - mixins:[JeecgListMixin], - components: { - JeecgDemoModal, - JSuperQuery, - JeecgDemoTabsModal, - JInput - }, - data() { - return { - description: '鍗曡〃绀轰緥鍒楄〃', - //瀛楀吀鏁扮粍缂撳瓨 - sexDictOptions: [], - importExcelUrl:`${window._CONFIG['domianURL']}/test/jeecgDemo/importExcel`, - //琛ㄥご - columns:[], - //鍒楄缃� - settingColumns:[], - //鍒楀畾涔� - defColumns: [ - { - title: '#', - dataIndex: '', - key: 'rowIndex', - width: 60, - align: "center", - customRender: function (t, r, index) { - return parseInt(index) + 1; - } - }, - { - title: '濮撳悕', - align: "center", - dataIndex: 'name' - }, - { - title: '鍏抽敭璇�', - align: "center", - dataIndex: 'keyWord' - }, - { - title: '鎵撳崱鏃堕棿', - align: "center", - dataIndex: 'punchTime' - }, - { - title: '鎬у埆', - align: "center", - dataIndex: 'sex', - customRender: (text) => { - //瀛楀吀鍊兼浛鎹㈤�氱敤鏂规硶 - return filterDictTextByCache('sex', text); - } - }, - { - title: '骞撮緞', - align: "center", - dataIndex: 'age' - }, - { - title: '鐢熸棩', - align: "center", - dataIndex: 'birthday' - }, - { - title: '閭', - align: "center", - dataIndex: 'email' - }, - { - title: '涓汉绠�浠�', - align: "center", - dataIndex: 'content' - }, - { - title: '鎿嶄綔', - dataIndex: 'action', - align: "center", - scopedSlots: { - filterDropdown: 'filterDropdown', - filterIcon: 'filterIcon', - customRender: 'action'}, - } - ], - url: { - list: "/test/jeecgDemo/list", - delete: "/test/jeecgDemo/delete", - deleteBatch: "/test/jeecgDemo/deleteBatch", - exportXlsUrl: "/test/jeecgDemo/exportXls" - }, - fieldList:superQueryFieldList - } - }, - methods: { - getQueryParams(){ - //楂樼骇鏌ヨ鍣� - let sqp = {} - if(this.superQueryParams){ - sqp['superQueryParams']=encodeURI(this.superQueryParams) - sqp['superQueryMatchType'] = this.superQueryMatchType - } - var param = Object.assign(sqp, this.queryParam, this.isorter ,this.filters); - - param.field = this.getQueryField(); - param.pageNo = this.ipagination.current; - param.pageSize = this.ipagination.pageSize; - delete param.birthdayRange; //鑼冨洿鍙傛暟涓嶄紶閫掑悗鍙� - return filterObj(param); - }, - initDictConfig() { - console.log("--鎴戞墠鏄湡鐨勬柟娉�!--") - //鍒濆鍖栧瓧鍏� - 鎬у埆 - initDictOptions('sex').then((res) => { - if (res.success) { - this.sexDictOptions = res.result; - } - }); - }, - onetomany: function () { - this.$refs.jeecgDemoTabsModal.add(); - this.$refs.jeecgDemoTabsModal.title = "缂栬緫"; - }, - //璺宠浆鍗曟嵁椤甸潰 - jump() { - this.$router.push({path: '/jeecg/helloworld'}) - }, - onBirthdayChange: function (value, dateString) { - console.log(dateString[0],dateString[1]); - this.queryParam.birthday_begin=dateString[0]; - this.queryParam.birthday_end=dateString[1]; - }, - //鍒楄缃洿鏀逛簨浠� - onColSettingsChange (checkedValues) { - var 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'){ - return true - } - if (this.settingColumns.includes(item.dataIndex)) { - return true - } - return false - }) - this.columns = cols; - }, - initColumns(){ - //鏉冮檺杩囨护锛堝垪鏉冮檺鎺у埗鏃舵墦寮�锛屼慨鏀圭浜屼釜鍙傛暟涓烘巿鏉冪爜鍓嶇紑锛� - //this.defColumns = colAuthFilter(this.defColumns,'testdemo:'); - - var key = this.$route.name+":colsettings"; - let colSettings= Vue.ls.get(key); - if(colSettings==null||colSettings==undefined){ - let allSettingColumns = []; - this.defColumns.forEach(function (item,i,array ) { - 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'){ - return true; - } - if (colSettings.includes(item.dataIndex)) { - return true; - } - return false; - }) - this.columns = cols; - } - } - }, - created() { - this.initColumns(); - }, - } -</script> -<style scoped> - @import '~@assets/less/common.less'; -</style> \ No newline at end of file diff --git a/src/views/jeecg/JeecgEditableTableExample.vue b/src/views/jeecg/JeecgEditableTableExample.vue deleted file mode 100644 index 18317da..0000000 --- a/src/views/jeecg/JeecgEditableTableExample.vue +++ /dev/null @@ -1,40 +0,0 @@ -<template> - <a-card :bordered="false"> - - <a-tabs> - - <a-tab-pane tab="鏅�氬垪琛�" key="1"> - <default-table/> - </a-tab-pane> - - <a-tab-pane tab="鍙鍒楄〃" key="2"> - <read-only-table/> - </a-tab-pane> - - <a-tab-pane tab="涓夌骇鑱斿姩" key="3"> - <three-linkage/> - </a-tab-pane> - - </a-tabs> - - </a-card> -</template> - -<script> - import DefaultTable from './modules/JEditableTable/DefaultTable' - import ReadOnlyTable from './modules/JEditableTable/ReadOnlyTable' - import ThreeLinkage from './modules/JEditableTable/ThreeLinkage' - - export default { - name: 'JeecgEditableTableExample', - components: { DefaultTable, ReadOnlyTable, ThreeLinkage }, - data() { - return {} - }, - methods: {} - } -</script> - -<style scoped> - -</style> \ No newline at end of file diff --git a/src/views/jeecg/JeecgOrderMainList.vue b/src/views/jeecg/JeecgOrderMainList.vue deleted file mode 100644 index e0a3952..0000000 --- a/src/views/jeecg/JeecgOrderMainList.vue +++ /dev/null @@ -1,192 +0,0 @@ -<template> - <a-card :bordered="false"> - - <!-- 鏌ヨ鍖哄煙 --> - <div class="table-page-search-wrapper"> - <a-form layout="inline"> - <a-row :gutter="24"> - - <a-col :md="6" :sm="24"> - <a-form-item label="璁㈠崟鍙�"> - <a-input placeholder="璇疯緭鍏ヨ鍗曞彿" v-model="queryParam.orderCode"></a-input> - </a-form-item> - </a-col> - <a-col :md="6" :sm="24"> - <a-form-item label="璁㈠崟绫诲瀷"> - <a-select placeholder="璇疯緭鍏ヨ鍗曠被鍨�" v-model="queryParam.ctype"> - <a-select-option value="1">鍥藉唴璁㈠崟</a-select-option> - <a-select-option value="2">鍥介檯璁㈠崟</a-select-option> - </a-select> - </a-form-item> - </a-col> - - <a-col :md="6" :sm="24" > - <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> - <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> - <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button> - </span> - </a-col> - - </a-row> - </a-form> - </div> - - <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> - <div class="table-operator"> - <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button> - <a-button type="primary" icon="download" @click="handleExportXls('涓�瀵瑰绀轰緥')">瀵煎嚭</a-button> - <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> - <a-button type="primary" icon="import">瀵煎叆</a-button> - </a-upload> - - <a-dropdown v-if="selectedRowKeys.length > 0"> - <a-menu slot="overlay"> - <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>鍒犻櫎</a-menu-item> - </a-menu> - <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 <a-icon type="down" /></a-button> - </a-dropdown> - </div> - - <!-- table鍖哄煙-begin --> - <div> - <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> - <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤� - <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a> - </div> - - <a-table - ref="table" - size="middle" - bordered - rowKey="id" - :columns="columns" - :dataSource="dataSource" - :pagination="ipagination" - :loading="loading" - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" - @change="handleTableChange"> - - <span slot="action" slot-scope="text, record"> - <a @click="handleEdit(record)">缂栬緫</a> - - <a-divider type="vertical" /> - <a-dropdown> - <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a> - <a-menu slot="overlay"> - <a-menu-item> - <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> - <a>鍒犻櫎</a> - </a-popconfirm> - </a-menu-item> - </a-menu> - </a-dropdown> - </span> - - </a-table> - </div> - <!-- table鍖哄煙-end --> - - <!-- 琛ㄥ崟鍖哄煙 --> - <jeecgOrderMain-modal ref="modalForm" @ok="modalFormOk"></jeecgOrderMain-modal> - </a-card> -</template> - -<script> - import JeecgOrderMainModal from './modules/JeecgOrderMainModal' - import { JeecgListMixin } from '@/mixins/JeecgListMixin' - - export default { - name: "JeecgOrderMainList", - mixins: [JeecgListMixin], - components: { - JeecgOrderMainModal - }, - data () { - return { - description: '璁㈠崟绠$悊椤甸潰', - importExcelUrl:`${window._CONFIG['domianURL']}/test/jeecgOrderMain/importExcel`, - // 琛ㄥご - columns: [ - { - title: '#', - dataIndex: '', - key:'rowIndex', - width:60, - align:"center", - customRender:function (t,r,index) { - return parseInt(index)+1; - } - }, - { - title: '璁㈠崟鍙�', - align:"center", - dataIndex: 'orderCode' - }, - { - title: '璁㈠崟绫诲瀷', - align:"center", - dataIndex: 'ctype', - customRender: (text, record, index) => { - let re = ""; - if (text === '1') { - re = "鍥藉唴璁㈠崟"; - } else if (text === '2') { - re = "鍥介檯璁㈠崟"; - } - return re; - } - }, - { - title: '璁㈠崟鏃ユ湡', - align:"center", - dataIndex: 'orderDate' - }, - { - title: '璁㈠崟閲戦', - align:"center", - dataIndex: 'orderMoney' - }, - { - title: '璁㈠崟澶囨敞', - align:"center", - dataIndex: 'content' - }, - { - title: '鎿嶄綔', - dataIndex: 'action', - align:"center", - scopedSlots: { customRender: 'action' }, - } - ], - - url: { - list: "/test/jeecgOrderMain/list", - delete: "/test/jeecgOrderMain/delete", - deleteBatch: "/test/jeecgOrderMain/deleteBatch", - exportXlsUrl: "/test/jeecgOrderMain/exportXls", - } - } - }, - methods: { - } - } -</script> -<style scoped> - /** Button鎸夐挳闂磋窛 */ - .ant-btn { - margin-left: 3px - } - .ant-card-body .table-operator{ - margin-bottom: 18px; - } - .ant-table-tbody .ant-table-row td{ - padding-top:15px; - padding-bottom:15px; - } - .anty-row-operator button{margin: 0 5px} - .ant-btn-danger{background-color: #ffffff} - - .ant-modal-cust-warp{height: 100%} - .ant-modal-cust-warp .ant-modal-body{height:calc(100% - 110px) !important;overflow-y: auto} - .ant-modal-cust-warp .ant-modal-content{height:90% !important;overflow-y: hidden} -</style> \ No newline at end of file diff --git a/src/views/jeecg/JeecgOrderMainListForJEditableTable.vue b/src/views/jeecg/JeecgOrderMainListForJEditableTable.vue deleted file mode 100644 index e379af5..0000000 --- a/src/views/jeecg/JeecgOrderMainListForJEditableTable.vue +++ /dev/null @@ -1,217 +0,0 @@ -<template> - <a-card :bordered="false"> - - <!-- 鏌ヨ鍖哄煙 --> - <div class="table-page-search-wrapper"> - <a-form layout="inline"> - <a-row :gutter="24"> - - <a-col :md="6" :sm="24"> - <a-form-item label="璁㈠崟鍙�"> - <a-input placeholder="璇疯緭鍏ヨ鍗曞彿" v-model="queryParam.orderCode"></a-input> - </a-form-item> - </a-col> - <a-col :md="6" :sm="24"> - <a-form-item label="璁㈠崟绫诲瀷"> - <a-select placeholder="璇疯緭鍏ヨ鍗曠被鍨�" v-model="queryParam.ctype"> - <a-select-option value="1">鍥藉唴璁㈠崟</a-select-option> - <a-select-option value="2">鍥介檯璁㈠崟</a-select-option> - </a-select> - </a-form-item> - </a-col> - - <a-col :md="6" :sm="24"> - <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> - <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> - <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button> - </span> - </a-col> - - </a-row> - </a-form> - </div> - - <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> - <div class="table-operator"> - <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button> - - <a-dropdown v-if="selectedRowKeys.length > 0"> - <a-menu slot="overlay"> - <a-menu-item key="1" @click="batchDel"> - <a-icon type="delete"/> - 鍒犻櫎 - </a-menu-item> - </a-menu> - <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 - <a-icon type="down"/> - </a-button> - </a-dropdown> - </div> - - <!-- table鍖哄煙-begin --> - <div> - <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> - <i class="anticon anticon-info-circle ant-alert-icon"></i> - <span>宸查�夋嫨</span> - <a style="font-weight: 600"> - {{ selectedRowKeys.length }} - </a> - <span>椤�</span> - <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a> - </div> - - <a-table - ref="table" - size="middle" - bordered - rowKey="id" - :columns="columns" - :dataSource="dataSource" - :pagination="ipagination" - :loading="loading" - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" - @change="handleTableChange"> - - <span slot="action" slot-scope="text, record"> - <a @click="handleEdit(record)">缂栬緫</a> - - <a-divider type="vertical"/> - <a-dropdown> - <a class="ant-dropdown-link">鏇村 <a-icon type="down"/></a> - <a-menu slot="overlay"> - <a-menu-item> - <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> - <a>鍒犻櫎</a> - </a-popconfirm> - </a-menu-item> - </a-menu> - </a-dropdown> - </span> - - </a-table> - </div> - <!-- table鍖哄煙-end --> - - <!-- 琛ㄥ崟鍖哄煙 --> - <jeecg-order-modal-for-j-editable-table ref="modalForm" @ok="modalFormOk"/> - - </a-card> -</template> - -<script> - - import { JeecgListMixin } from '@/mixins/JeecgListMixin' - import JeecgOrderModalForJEditableTable from './modules/JeecgOrderModalForJEditableTable' - - export default { - name: 'JeecgOrderMainListForJEditableTable', - mixins: [JeecgListMixin], - components: { - JeecgOrderModalForJEditableTable - }, - data() { - return { - description: '璁㈠崟绠$悊椤甸潰', - // 璇锋眰鍙傛暟 - url: { - list: '/test/jeecgOrderMain/list', - delete: '/test/jeecgOrderMain/delete', - deleteBatch: '/test/jeecgOrderMain/deleteBatch' - }, - // 琛ㄥご - columns: [ - { - title: '#', - dataIndex: '', - key: 'rowIndex', - width: 60, - align: 'center', - customRender: function(t, r, index) { - return parseInt(index) + 1 - } - }, - { - title: '璁㈠崟鍙�', - align: 'center', - dataIndex: 'orderCode' - }, - { - title: '璁㈠崟绫诲瀷', - align: 'center', - dataIndex: 'ctype', - customRender: (text) => { - let re = '' - if (text === '1') { - re = '鍥藉唴璁㈠崟' - } else if (text === '2') { - re = '鍥介檯璁㈠崟' - } - return re - } - }, - { - title: '璁㈠崟鏃ユ湡', - align: 'center', - dataIndex: 'orderDate' - }, - { - title: '璁㈠崟閲戦', - align: 'center', - dataIndex: 'orderMoney' - }, - { - title: '璁㈠崟澶囨敞', - align: 'center', - dataIndex: 'content' - }, - { - title: '鎿嶄綔', - dataIndex: 'action', - align: 'center', - scopedSlots: { customRender: 'action' } - } - ] - } - }, - methods: { - - initDictConfig() { - } - - } - } -</script> -<style scoped> - - .ant-card-body .table-operator { - margin-bottom: 18px; - } - - .ant-table-tbody .ant-table-row td { - padding-top: 15px; - padding-bottom: 15px; - } - - .anty-row-operator button { - margin: 0 5px - } - - .ant-btn-danger { - background-color: #ffffff - } - - .ant-modal-cust-warp { - height: 100% - } - - .ant-modal-cust-warp .ant-modal-body { - height: calc(100% - 110px) !important; - overflow-y: auto - } - - .ant-modal-cust-warp .ant-modal-content { - height: 90% !important; - overflow-y: hidden - } - -</style> \ No newline at end of file diff --git a/src/views/jeecg/JeecgOrderMainListForJVxeTable.vue b/src/views/jeecg/JeecgOrderMainListForJVxeTable.vue deleted file mode 100644 index 0d01143..0000000 --- a/src/views/jeecg/JeecgOrderMainListForJVxeTable.vue +++ /dev/null @@ -1,215 +0,0 @@ -<template> - <a-card :bordered="false"> - - <!-- 鏌ヨ鍖哄煙 --> - <div class="table-page-search-wrapper"> - <a-form layout="inline"> - <a-row :gutter="24"> - - <a-col :md="6" :sm="24"> - <a-form-item label="璁㈠崟鍙�"> - <a-input placeholder="璇疯緭鍏ヨ鍗曞彿" v-model="queryParam.orderCode"></a-input> - </a-form-item> - </a-col> - <a-col :md="6" :sm="24"> - <a-form-item label="璁㈠崟绫诲瀷"> - <a-select placeholder="璇疯緭鍏ヨ鍗曠被鍨�" v-model="queryParam.ctype"> - <a-select-option value="1">鍥藉唴璁㈠崟</a-select-option> - <a-select-option value="2">鍥介檯璁㈠崟</a-select-option> - </a-select> - </a-form-item> - </a-col> - - <a-col :md="6" :sm="24"> - <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> - <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> - <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button> - </span> - </a-col> - - </a-row> - </a-form> - </div> - - <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> - <div class="table-operator"> - <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button> - <a-dropdown v-if="selectedRowKeys.length > 0"> - <a-menu slot="overlay"> - <a-menu-item key="1" @click="batchDel"> - <a-icon type="delete"/> - 鍒犻櫎 - </a-menu-item> - </a-menu> - <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 - <a-icon type="down"/> - </a-button> - </a-dropdown> - </div> - - <!-- table鍖哄煙-begin --> - <div> - <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> - <i class="anticon anticon-info-circle ant-alert-icon"></i> - <span>宸查�夋嫨</span> - <a style="font-weight: 600"> - {{ selectedRowKeys.length }} - </a> - <span>椤�</span> - <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a> - </div> - - <a-table - ref="table" - size="middle" - bordered - rowKey="id" - :columns="columns" - :dataSource="dataSource" - :pagination="ipagination" - :loading="loading" - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" - @change="handleTableChange"> - - <span slot="action" slot-scope="text, record"> - <a @click="handleEdit(record)">缂栬緫</a> - <a-divider type="vertical"/> - <a-dropdown> - <a class="ant-dropdown-link">鏇村 <a-icon type="down"/></a> - <a-menu slot="overlay"> - <a-menu-item> - <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> - <a>鍒犻櫎</a> - </a-popconfirm> - </a-menu-item> - </a-menu> - </a-dropdown> - </span> - - </a-table> - </div> - <!-- table鍖哄煙-end --> - - <!-- 琛ㄥ崟鍖哄煙 --> - <jeecg-order-modal-for-j-vextable ref="modalForm" @ok="modalFormOk"></jeecg-order-modal-for-j-vextable> - - </a-card> -</template> - -<script> - - import { JeecgListMixin } from '@/mixins/JeecgListMixin' - import JeecgOrderModalForJVextable from './modules/JeecgOrderModalForJVexTable' - - export default { - name: 'JeecgOrderMainListForJVxeTable', - mixins: [JeecgListMixin], - components: { - JeecgOrderModalForJVextable - }, - data() { - return { - description: '璁㈠崟绠$悊椤甸潰', - // 璇锋眰鍙傛暟 - url: { - list: '/test/jeecgOrderMain/list', - delete: '/test/jeecgOrderMain/delete', - deleteBatch: '/test/jeecgOrderMain/deleteBatch' - }, - // 琛ㄥご - columns: [ - { - title: '#', - dataIndex: '', - key: 'rowIndex', - width: 60, - align: 'center', - customRender: function(t, r, index) { - return parseInt(index) + 1 - } - }, - { - title: '璁㈠崟鍙�', - align: 'center', - dataIndex: 'orderCode' - }, - { - title: '璁㈠崟绫诲瀷', - align: 'center', - dataIndex: 'ctype', - customRender: (text) => { - let re = '' - if (text === '1') { - re = '鍥藉唴璁㈠崟' - } else if (text === '2') { - re = '鍥介檯璁㈠崟' - } - return re - } - }, - { - title: '璁㈠崟鏃ユ湡', - align: 'center', - dataIndex: 'orderDate' - }, - { - title: '璁㈠崟閲戦', - align: 'center', - dataIndex: 'orderMoney' - }, - { - title: '璁㈠崟澶囨敞', - align: 'center', - dataIndex: 'content' - }, - { - title: '鎿嶄綔', - dataIndex: 'action', - align: 'center', - scopedSlots: { customRender: 'action' } - } - ] - } - }, - methods: { - - initDictConfig() { - } - - } - } -</script> -<style scoped> - - .ant-card-body .table-operator { - margin-bottom: 18px; - } - - .ant-table-tbody .ant-table-row td { - padding-top: 15px; - padding-bottom: 15px; - } - - .anty-row-operator button { - margin: 0 5px - } - - .ant-btn-danger { - background-color: #ffffff - } - - .ant-modal-cust-warp { - height: 100% - } - - .ant-modal-cust-warp .ant-modal-body { - height: calc(100% - 110px) !important; - overflow-y: auto - } - - .ant-modal-cust-warp .ant-modal-content { - height: 90% !important; - overflow-y: hidden - } - -</style> \ No newline at end of file diff --git a/src/views/jeecg/JeecgPdfView.vue b/src/views/jeecg/JeecgPdfView.vue deleted file mode 100644 index a2fbff5..0000000 --- a/src/views/jeecg/JeecgPdfView.vue +++ /dev/null @@ -1,122 +0,0 @@ -<template> - <a-card :bordered="false"> - <!-- 宸︿晶鏂囦欢鏍� --> - <a-col :span="4" class="clName"> - <a-tree - :treeData="treeData" - :defaultExpandAll="defaultExpandAll" - @select="this.onSelect" - style="height: 500px;overflow-y: auto;" - > - </a-tree> - </a-col> - <!-- 涓棿闈㈡澘 --> - <a-col :span="2"/> - <!--鍙充晶缂╃暐鍥�--> - <a-col :span="18"> - <a-spin tip="Loading..." :spinning="spinning"> - <div v-for="(file, key) in dataSource" :key="key"> - <a-row> - <a-col :span="24"><p><a-divider orientation="left">{{ file.fileName }}</a-divider></p></a-col> - <!-- 棰勮鍖哄煙 --> - <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="width: 100%;height: 100%;position: relative;padding: 8px;" @click="pdfPreview(file.title)"> - <img style="width: 100%;" src="~@/assets/pdf4.jpg"> - </div> - </div> - </template> - <template v-else> - (鏆傛棤鏉愭枡锛岀偣鍑�"閫夋嫨鏂囦欢"鎴�"鎵弿涓婁紶"涓婁紶鏂囦欢) - </template> - </a-col> - </a-row> - </div> - </a-spin> - </a-col> - <pdf-preview-modal ref="pdfmodal"></pdf-preview-modal > - </a-card> -</template> - -<script> - - import { getAction } from '@/api/manage' - import { ACCESS_TOKEN } from "@/store/mutation-types" - import Vue from 'vue' - import PdfPreviewModal from './modules/PdfPreviewModal' - const mockdata=[{ - "id": "1", - "key": "1", - "title": "瀹炰緥.pdf", - "fileCode": "shili", - "fileName": "瀹炰緥", - "filePdfPath": "瀹炰緥" - }] - - export default { - name: "JeecgPdfView", - components:{ - PdfPreviewModal - }, - data () { - return { - description: 'PDF棰勮椤甸潰', - // 鏂囦欢绫诲瀷闆� - treeData:[{ - title: '鎵�鏈塒DF鐢靛瓙妗�', - key: '0-0', - children: mockdata }], - // 鏂囦欢鏁版嵁闆� - dataSource: mockdata, - allData:mockdata, - // 涓婁紶鏂囦欢闆� - defaultExpandAll: true, - // 鍔犺浇涓� - spinning:false, - url: { - pdfList: "/mock/api/pdfList", - }, - } - }, - created() { - //this.loadData(); - }, - methods: { - loadData (){ - this.spinning = false; - getAction(this.url.pdfList).then((res)=>{ - if(res.length>0){ - this.allData = res; - this.dataSource = res; - this.treeData[0].children = res; - } - this.spinning = false; - }) - }, - pdfPreview:function(title){ - const token = Vue.ls.get(ACCESS_TOKEN); - this.headers = {"X-Access-Token":token} - this.$refs.pdfmodal.previewFiles(title,token); - }, - // 閫夋嫨鏂囦欢绫诲瀷 - onSelect (selectedKeys, info) { - this.dataSource = []; - if(selectedKeys[0] === undefined || selectedKeys[0] === '0-0'){ - this.dataSource = this.allData; - }else{ - this.dataSource.push(info.node._props.dataRef); - } - console.log("SELECT-->dataSource",this.dataSource ); - }, - // model鍥炶皟 - modalFormOk () { - this.loadData(); - }, - }, - } -</script> - -<style scoped> - .clName .ant-tree li span.ant-tree-switcher, .ant-tree li span.ant-tree-iconEle{width:10px} -</style> \ No newline at end of file diff --git a/src/views/jeecg/JeecgTreeTable.vue b/src/views/jeecg/JeecgTreeTable.vue deleted file mode 100644 index a0939ad..0000000 --- a/src/views/jeecg/JeecgTreeTable.vue +++ /dev/null @@ -1,80 +0,0 @@ -<template> - <a-card :bordered="false"> - <j-tree-table - :url="url" - topValue="0" - queryKey="id" - :columns="columns" - :tableProps="tableProps"> - - <template v-slot:action="props"> - <!-- 鍙娇鐢ㄧ殑鍙傛暟锛� --> - <!-- props.text --> - <!-- props.record --> - <!-- props.index --> - <a @click="()=>handleEdit(props.record)">缂栬緫</a> - </template> - - </j-tree-table> - </a-card> -</template> - -<script> - import JTreeTable from '@/components/jeecg/JTreeTable' - - export default { - name: 'JeecgTreeTable', - components: { JTreeTable }, - data() { - return { - url: '/mock/api/asynTreeList', - columns: [ - { - title: '鑿滃崟鍚嶇О', - dataIndex: 'name' - }, - { - title: '缁勪欢', - dataIndex: 'component' - }, - { - title: '鎺掑簭', - dataIndex: 'orderNum' - }, - { - title: '鎿嶄綔', - dataIndex: 'action', - scopedSlots: { customRender: 'action' } - } - ], - selectedRowKeys: [] - } - }, - computed: { - tableProps() { - let _this = this - return { - // 鍒楄〃椤规槸鍚﹀彲閫夋嫨 - // https://vue.ant.design/components/table-cn/#rowSelection - rowSelection: { - selectedRowKeys: _this.selectedRowKeys, - onChange: (selectedRowKeys) => _this.selectedRowKeys = selectedRowKeys - } - } - } - }, - methods: { - handleEdit(record) { - this.$info({ - width: 600, - title: '缂栬緫', - content: '缂栬緫ID锛�' + record.id+"锛涘悕绉帮細"+record.name, - okText: '纭畾', - maskClosable: true - }) - } - } - } -</script> - -<style scoped></style> diff --git a/src/views/jeecg/PrintDemo.vue b/src/views/jeecg/PrintDemo.vue deleted file mode 100644 index 2bd6c36..0000000 --- a/src/views/jeecg/PrintDemo.vue +++ /dev/null @@ -1,175 +0,0 @@ -<template> - <a-card :bordered="false" :class="{'abcdefg':true}"> - <div class="no-print" style="text-align: right"> - <a-button v-print="'#printContent'" ghost type="primary">鎵撳嵃</a-button> - </div> - <section ref="print" id="printContent" class="abcdefg"> - <div style="text-align: center"> - <p style="font-size: 24px;font-weight: 800">鎵撳嵃娴嬭瘯琛ㄥ崟</p> - </div> - <!--绛惧瓧--> - <a-col :md="24" :sm="24"> - <div class="sign" style="text-align: left;height: inherit"> - <a-col :span="24"> - <span> - 鎵撳嵃浜哄憳: - </span> - <a-input style="width: 30%" v-model="printer"/> - <span style="margin-left: 12.5%">鎵撳嵃鏃ユ湡:</span> - <a-input style="width: 30%" v-model="printTime"/> - </a-col> - <a-col :span="24"> - </a-col> - <a-col :span="24" style="margin-top: 20px"> - <span>鎵撳嵃鍐呭:</span> - <a-input style="width: 80%" v-model="printContent"/> - </a-col> - <a-col :span="24" style="margin-top: 20px"> - <span>鎵撳嵃鐩殑:</span> - <a-input style="width: 80%" v-model="printReason"/> - </a-col> - <a-col style="margin-top: 20px" :span="24"> - <span>鎵撳嵃鍥剧墖:</span> - <br/> - <a-upload - action="/jsonplaceholder.typicode.com/posts/" - listType="picture-card" - :fileList="fileList" - @preview="handlePreview" - @change="handleChange"> - <div v-if="fileList.length < 3"> - <a-icon type="plus" /> - <div class="ant-upload-text">Upload</div> - </div> - </a-upload> - <a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel"> - <img alt="example" style="width: 100%" :src="previewImage" /> - </a-modal> - </a-col> - </div> - </a-col> - </section> - </a-card> - <!--</page-layout>--> -</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', - props:{ - reBizCode:{ - type: String, - default: '' - } - }, - data(){ - return { - columns: [{ - } - ], - labelCol: { - xs: { span: 24 }, - sm: { span: 2 }, - }, - wrapperCol: { - xs: { span: 24 }, - sm: { span: 8 }, - }, - printer:'寮犱笁', - printTime:'2019-02-01 12:00:00', - printContent:'鎵撳嵃鍐呭灏辨槸,鍋氫竴涓墦鍗版祴璇�', - printReason:'鍋氫竴涓墦鍗版祴璇�', - previewVisible: false, - previewImage: '', - fileList: [{ - uid: '-1', - name: 'xxx.png', - status: 'done', - url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png', - }, - { - uid:'-2', - name:'pic1.png', - status:'done', - url:'https://www.gizbot.com/img/2016/11/whatsapp-error-lead-image-08-1478607387.jpg', - } - ], - url:{ - loadApplicant:"/sps/register/loadApplicants", - loadRegisterFiles:"/sps/register/getRegisterFilesConfig", - } - } - }, - created() { - this.getDate(); - }, - methods: { - loadData(){ - - }, - getDate(){ - // 褰撳墠鏃堕棿 - }, - handleCancel () { - this.previewVisible = false - }, - handlePreview (file) { - this.previewImage = file.url || file.thumbUrl - this.previewVisible = true - }, - handleChange ({ fileList }) { - this.fileList = fileList - } - } - } -</script> -<style scoped> - /*update_begin author:scott date:20191203 for:鎵撳嵃鏈烘墦鍗扮殑瀛椾綋妯$硦闂 */ - * { - color: #000000!important; - -webkit-tap-highlight-color: #000000!important; - } - /*update_end author:scott date:20191203 for:鎵撳嵃鏈烘墦鍗扮殑瀛椾綋妯$硦闂 */ - - .abcdefg .ant-card-body{ - margin-left: 0%; - margin-right: 0%; - margin-bottom: 1%; - border:0px solid black; - min-width: 800px; - color:#000000!important; - } - .explain{ - text-align: left; - margin-left: 50px; - color:#000000!important; - } - .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; - } - .explain div{ - margin-bottom: 10px; - } - /* you can make up upload button and sample style by using stylesheets */ - .ant-upload-select-picture-card i { - font-size: 32px; - color: #999; - } - - .ant-upload-select-picture-card .ant-upload-text { - margin-top: 8px; - color: #666; - } -</style> \ No newline at end of file diff --git a/src/views/jeecg/RowspanTable.vue b/src/views/jeecg/RowspanTable.vue deleted file mode 100644 index 3b27b94..0000000 --- a/src/views/jeecg/RowspanTable.vue +++ /dev/null @@ -1,285 +0,0 @@ -<template> - <a-card :bordered="false"> - <!-- table鍖哄煙-begin --> - <a-table - ref="table" - size="default" - bordered - rowKey="id" - :columns="columns" - :pagination="false" - :dataSource="dataSource"> - - </a-table> - <!-- table鍖哄煙-end --> - - - </a-card> -</template> - -<script> - - export default { - name: "RowspanTable", - components: { - }, - data() { - return { - description: '瀛樻斁浣嶇疆璁剧疆琛ㄧ鐞嗛〉闈�', - levelNum:{}, - gridNum:0, - boxNum:0, - cabinetNo:"", - // 琛ㄥご - columns: [ { - title: '鍒嗙粍涓�', - align: "center", - dataIndex: 'cabinetNo', - customRender: (value, row, index) => { - const obj = { - children: value, - attrs: {}, - }; - if(index===0){ - obj.attrs.rowSpan = this.dataSource.length; - }else{ - obj.attrs.rowSpan = 0; - } - return obj; - }, - }, - { - title: '鍒嗙粍浜�', - align: "center", - dataIndex: 'levelNo', - customRender: (value, row, index) => { - const obj = { - children: value, - attrs: {}, - }; - //褰撳墠鍒楄法琛岀殑鏉℃暟 - var a = parseInt(this.levelNum); - var b = parseInt(this.gridNum)*parseInt(this.boxNum); - console.log(a); - for(var c=0;c<=a;c++){ - if(index === (c*b)){ - console.log(1); - console.log(c*b); - obj.attrs.rowSpan = b; - break; - }else{ - obj.attrs.rowSpan = 0; - } - } - return obj; - } - }, - { - title: '鍒嗙粍涓�', - align: "center", - dataIndex: 'gridNo', - customRender: (value, row, index) => { - const obj = { - children: value, - attrs: {}, - }; - var a = parseInt(this.levelNum)*parseInt(this.gridNum); - var b = parseInt(this.boxNum); - for(var c=0;c<=a;c++){ - if(index === (c*b)){ - obj.attrs.rowSpan = b; - break; - }else{ - obj.attrs.rowSpan = 0; - } - } - return obj; - }, - }, { - title: '瀛楁涓�', - align: "center", - dataIndex: 'boxNo' - }, { - title: '瀛楁浜�', - align: 'center', - dataIndex: 'storedNum' - }, { - title: '瀛楁涓�', - align: "center", - dataIndex: 'maxNum' - },], - //鏁版嵁闆� - dataSource: [{ - "id": "cb1dfd12cbeca3f8ba121439ee7e2411", - "attributeId": "e62831f314e1390edbd884e9d9e6aca6", - "cabinetNo": "1", - "levelNo": "1", - "gridNo": "1", - "boxNo": "1", - "storedNum": 2, - "maxNum": 2, - "unitNum": 2, - "assignStatus": "1", - "storageStatus": "1", - "remark": null, - "createBy": "admin", - "createTime": "2019-04-02", - "updateBy": "admin", - "updateTime": "2019-04-02" - }, { - "id": "f903d50d02904b14175dccf2a7948777", - "attributeId": "e62831f314e1390edbd884e9d9e6aca6", - "cabinetNo": "1", - "levelNo": "1", - "gridNo": "1", - "boxNo": "2", - "storedNum": 2, - "maxNum": 2, - "unitNum": 2, - "assignStatus": "1", - "storageStatus": "1", - "remark": null, - "createBy": "admin", - "createTime": "2019-04-02", - "updateBy": "admin", - "updateTime": "2019-04-02" - }, { - "id": "4f04c0ca4202535d678871b07e706cf6", - "attributeId": "e62831f314e1390edbd884e9d9e6aca6", - "cabinetNo": "1", - "levelNo": "1", - "gridNo": "2", - "boxNo": "1", - "storedNum": 2, - "maxNum": 2, - "unitNum": 2, - "assignStatus": "1", - "storageStatus": "1", - "remark": null, - "createBy": "admin", - "createTime": "2019-04-02", - "updateBy": "admin", - "updateTime": "2019-04-02" - }, { - "id": "d0c91dabedfc03efad0126e50ea72e80", - "attributeId": "e62831f314e1390edbd884e9d9e6aca6", - "cabinetNo": "1", - "levelNo": "1", - "gridNo": "2", - "boxNo": "2", - "storedNum": 2, - "maxNum": 2, - "unitNum": 2, - "assignStatus": "1", - "storageStatus": "1", - "remark": null, - "createBy": "admin", - "createTime": "2019-04-02", - "updateBy": "admin", - "updateTime": "2019-04-08" - }, { - "id": "1e8bfcbe4352afbab8878f9fd368e007", - "attributeId": "e62831f314e1390edbd884e9d9e6aca6", - "cabinetNo": "1", - "levelNo": "2", - "gridNo": "1", - "boxNo": "1", - "storedNum": 1, - "maxNum": 2, - "unitNum": 1, - "assignStatus": "1", - "storageStatus": "0", - "remark": null, - "createBy": "admin", - "createTime": "2019-04-02", - "updateBy": "admin", - "updateTime": "2019-04-08" - }, { - "id": "d76087d8d3ebc7a59d43458588f26941", - "attributeId": "e62831f314e1390edbd884e9d9e6aca6", - "cabinetNo": "1", - "levelNo": "2", - "gridNo": "1", - "boxNo": "2", - "storedNum": 0, - "maxNum": 2, - "unitNum": 0, - "assignStatus": "1", - "storageStatus": "0", - "remark": null, - "createBy": "admin", - "createTime": "2019-04-02", - "updateBy": "admin", - "updateTime": "2019-04-02" - }, { - "id": "7bf7754f12e1bf95edcd501cc6b85e62", - "attributeId": "e62831f314e1390edbd884e9d9e6aca6", - "cabinetNo": "1", - "levelNo": "2", - "gridNo": "2", - "boxNo": "1", - "storedNum": 0, - "maxNum": 2, - "unitNum": 0, - "assignStatus": "1", - "storageStatus": "0", - "remark": null, - "createBy": "admin", - "createTime": "2019-04-02", - "updateBy": "admin", - "updateTime": "2019-04-02" - }, { - "id": "9cd08d733657d5b286bec870f12f6ecf", - "attributeId": "e62831f314e1390edbd884e9d9e6aca6", - "cabinetNo": "1", - "levelNo": "2", - "gridNo": "2", - "boxNo": "2", - "storedNum": 0, - "maxNum": 2, - "unitNum": 0, - "assignStatus": "1", - "storageStatus": "0", - "remark": null, - "createBy": "admin", - "createTime": "2019-04-02", - "updateBy": "admin", - "updateTime": "2019-04-02" - }], - isorter: { - column: 'createTime', - order: 'desc', - }, - url: { - }, - } - }, - created() { - this.loadData(); - }, - methods: { - loadData(){ - this.levelNum=4; - this.gridNum = 2; - this.boxNum = 2; - - } - } - } -</script> -<style scoped> - .ant-card-body .table-operator{ - margin-bottom: 18px; - } - .ant-table-tbody .ant-table-row td{ - padding-top:15px; - padding-bottom:15px; - } - .anty-row-operator button{margin: 0 5px} - .ant-btn-danger{background-color: #ffffff} - - .ant-modal-cust-warp{height: 100%} - .ant-modal-cust-warp .ant-modal-body{height:calc(100% - 110px) !important;overflow-y: auto} - .ant-modal-cust-warp .ant-modal-content{height:90% !important;overflow-y: hidden} -</style> - diff --git a/src/views/jeecg/SelectDemo.vue b/src/views/jeecg/SelectDemo.vue deleted file mode 100644 index 29a2cf7..0000000 --- a/src/views/jeecg/SelectDemo.vue +++ /dev/null @@ -1,691 +0,0 @@ -<template> - <a-card :bordered="false" style="height:100%;padding-bottom:200px; "> - - <div class="table-page-search-wrapper"> - <a-form-model ref="form" :model="formData" layout="inline"> - - - <!-- 瀛楀吀涓嬫媺 --> - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="鎬у埆" prop="sex"> - <j-dict-select-tag v-model="formData.sex" title="鎬у埆" dictCode="sex" placeholder="璇烽�夋嫨鎬у埆"/> - <!-- <j-dict-select-tag title="鎬у埆" dictCode="sex" disabled/>--> - </a-form-model-item> - </a-col> - <a-col :span="12">閫変腑鍊硷細{{ formData.sex}}</a-col> - </a-row> - - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="鎬у埆2" prop="sex2"> - <j-dict-select-tag v-model="formData.sex2" type="radioButton" title="鎬у埆2" dictCode="sex" placeholder="璇烽�夋嫨鎬у埆2"/> - </a-form-model-item> - </a-col> - <a-col :span="12">閫変腑鍊硷細{{ formData.sex2}}</a-col> - </a-row> - - <!-- 瀛楀吀琛ㄤ笅鎷� --> - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="瀛楀吀琛ㄤ笅鎷�" prop="user"> - <j-dict-select-tag v-model="formData.user" placeholder="璇烽�夋嫨鐢ㄦ埛" dictCode="sys_user,realname,id"/> - </a-form-model-item> - </a-col> - <a-col :span="12">閫変腑鍊硷細{{ formData.user}}</a-col> - </a-row> - - <!-- 甯︽潯浠跺瓧鍏歌〃涓嬫媺 --> - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="瀛楀吀琛ㄤ笅鎷�(甯︽潯浠�)" prop="user2"> - <j-dict-select-tag v-model="formData.user2" placeholder="璇烽�夋嫨鐢ㄦ埛" dictCode="sys_user,realname,id,username!='admin' order by create_time"/> - </a-form-model-item> - </a-col> - <a-col :span="12">閫変腑鍊硷細{{ formData.user2}}</a-col> - </a-row> - - - <!-- 瀛楀吀鎼滅储 --> - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="瀛楀吀鎼滅储(鍚屾)" prop="searchValue"> - <j-search-select-tag placeholder="璇峰仛鍑轰綘鐨勯�夋嫨" v-model="formData.searchValue" :dictOptions="searchOptions"> - </j-search-select-tag> - </a-form-model-item> - </a-col> - <a-col :span="12">閫変腑鍊硷細{{ formData.searchValue}}</a-col> - </a-row> - <!-- 瀛楀吀鎼滅储澶氶�� --> - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="瀛楀吀鎼滅储澶氶��(鍚屾)" prop="searchMultipleValue"> - <j-search-select-tag placeholder="璇峰仛鍑轰綘鐨勯�夋嫨" v-model="formData.searchMultipleValue" :dictOptions="searchOptions" mode="multiple"> - </j-search-select-tag> - </a-form-model-item> - </a-col> - <a-col :span="12">閫変腑鍊硷細{{ formData.searchMultipleValue}}</a-col> - </a-row> - - <!-- 瀛楀吀鎼滅储 寮傛鍔犺浇 --> - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="瀛楀吀鎼滅储(寮傛)" prop="asyncSelectValue"> - <j-search-select-tag - placeholder="璇峰仛鍑轰綘鐨勯�夋嫨" - v-model="formData.asyncSelectValue" - dict="sys_depart,depart_name,id" - :pageSize="6" - :async="true"> - </j-search-select-tag> - </a-form-model-item> - </a-col> - <a-col :span="12">閫変腑鍊硷細{{ formData.asyncSelectValue}}</a-col> - </a-row> - <!-- 瀛楀吀鎼滅储澶氶�� 寮傛鍔犺浇 --> - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="瀛楀吀鎼滅储澶氶��(寮傛)" prop="asyncMultipleValue"> - <j-search-select-tag - placeholder="璇峰仛鍑轰綘鐨勯�夋嫨" - v-model="formData.asyncMultipleValue" - dict="sys_depart,depart_name,id" - :pageSize="6" - :async="true" - mode="multiple"> - </j-search-select-tag> - </a-form-model-item> - </a-col> - <a-col :span="12">閫変腑鍊硷細{{ formData.asyncMultipleValue}}</a-col> - </a-row> - - <!-- JMultiSelectTag --> - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="瀛楀吀涓嬫媺(澶氶��)" prop="selMuti"> - <j-multi-select-tag - v-model="formData.selMuti" - dictCode="sex" - placeholder="璇烽�夋嫨"> - </j-multi-select-tag> - </a-form-model-item> - </a-col> - <a-col :span="12">澶氶�夌粍鍚�(v-model)锛歿{ formData.selMuti }}</a-col> - </a-row> - - <!-- 閮ㄩ棬閫夋嫨鎺т欢 --> - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="閫夋嫨閮ㄩ棬 鑷畾涔夎繑鍥炲��" prop="orgCodes"> - <j-select-depart v-model="formData.orgCodes" :trigger-change="true" customReturnField="orgCode" :multi="true"></j-select-depart> - </a-form-model-item> - </a-col> - <a-col :span="12">閫変腑鐨勯儴闂–ode(v-model):{{ formData.orgCodes }}</a-col> - </a-row> - - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="閫夋嫨閮ㄩ棬" prop="departId"> - <j-select-depart v-model="formData.departId" :multi="true"></j-select-depart> - </a-form-model-item> - </a-col> - <a-col :span="12">閫変腑鐨勯儴闂↖D(v-model):{{ formData.departId }}</a-col> - </a-row> - - <!-- 閫氳繃閮ㄩ棬閫夋嫨鐢ㄦ埛鎺т欢 --> - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="閫夋嫨鐢ㄦ埛" prop="userIds"> - <j-select-user-by-dep v-model="formData.userIds" :multi="true"></j-select-user-by-dep> - </a-form-model-item> - </a-col> - <a-col :span="12">閫変腑鐨勭敤鎴�(v-model):{{ formData.userIds }}</a-col> - </a-row> - - <!-- 鐢ㄦ埛閫夋嫨鎺т欢 --> - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="閫夋嫨鐢ㄦ埛" prop="multiUser"> - <j-select-multi-user v-model="formData.multiUser" :query-config="selectUserQueryConfig"/> - </a-form-model-item> - </a-col> - <a-col :span="12">閫変腑鐨勭敤鎴�(v-model):{{ formData.multiUser }}</a-col> - </a-row> - - <!-- 瑙掕壊閫夋嫨 --> - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="閫夋嫨瑙掕壊" prop="selectRole"> - <j-select-role v-model="formData.selectRole" @change="changeMe"/> - </a-form-model-item> - </a-col> - <a-col :span="12">閫変腑鍊硷細{{ formData.selectRole}}</a-col> - </a-row> - - <!-- 鑱屽姟閫夋嫨 --> - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="閫夋嫨鑱屽姟" prop="selectPosition"> - <j-select-position :buttons="false" v-model="formData.selectPosition" /> - </a-form-model-item> - </a-col> - <a-col :span="12">閫変腑鍊硷細{{ formData.selectPosition}}</a-col> - </a-row> - - <!-- JCheckbox --> - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="澶氶�夌粍鍚�" prop="jCheckbox"> - <j-checkbox - v-model="formData.jCheckbox" - :options="jCheckboxOptions" - /> - </a-form-model-item> - </a-col> - <a-col :span="12">澶氶�夌粍鍚�(v-model)锛歿{ formData.jCheckbox }}</a-col> - </a-row> - - <!-- JCodeEditor --> - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="浠g爜杈撳叆妗�" style="min-height: 120px" prop="jCodeEditor"> - <j-code-editor - language="javascript" - v-model="formData.jCodeEditor" - :fullScreen="true" - style="min-height: 100px"/> - </a-form-model-item> - </a-col> - <a-col :span="12">浠g爜杈撳叆妗�(v-model)锛歿{ formData.jCodeEditor }}</a-col> - </a-row> - - <!-- JDate --> - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="鏃ユ湡閫夋嫨妗�" prop="jDate"> - <j-date v-model="formData.jDate" :showTime="true" dateFormat="YYYY-MM-DD HH:mm:ss"/> - </a-form-model-item> - </a-col> - <a-col :span="12">鏃ユ湡閫夋嫨妗�(v-model)锛歿{ formData.jDate }}</a-col> - </a-row> - - <!-- JEditor --> - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="瀵屾枃鏈紪杈戝櫒" style="min-height: 300px" prop="jEditor"> - <j-editor v-model="formData.jEditor"/> - </a-form-model-item> - </a-col> - <a-col :span="12">瀵屾枃鏈紪杈戝櫒(v-model)锛歿{ formData.jEditor }}</a-col> - </a-row> - - <!-- JEllipsis --> - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="杩囬暱鍓垏" prop="jEllipsis"> - <j-ellipsis :value="formData.jEllipsis" :length="30"/> - </a-form-model-item> - </a-col> - <a-col :span="12">杩囬暱鍓垏锛歿{ formData.jEllipsis }}</a-col> - </a-row> - - <!-- JSlider --> - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="婊戝潡楠岃瘉鐮�" prop="jSlider"> - <j-slider @onSuccess="handleJSliderSuccess"/> - </a-form-model-item> - </a-col> - <a-col :span="12">婊戝潡楠岃瘉鐮侀獙璇侀�氳繃锛歿{ formData.jSlider }}</a-col> - </a-row> - - <!-- JSelectMultiple --> - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="澶氶�変笅鎷夋" prop="jSelectMultiple"> - <j-select-multiple v-model="formData.jSelectMultiple" :options="jSelectMultipleOptions"/> - </a-form-model-item> - </a-col> - <a-col :span="12">澶氶�変笅鎷夋(v-model)锛歿{ formData.jSelectMultiple }}</a-col> - </a-row> - - <!-- JSelectMultiple --> - <a-row :gutter="24"> - <a-col> - - <a-form-model-item label="JModal寮圭獥"> - <a-button style="margin-right: 8px;" @click="()=>modal.visible=true">鐐瑰嚮寮瑰嚭JModal</a-button> - <span style="margin-right: 8px;">鍏ㄥ睆鍖栵細<a-switch v-model="modal.fullscreen"/></span> - <span style="margin-right: 8px;">鍏佽鍒囨崲鍏ㄥ睆锛�<a-switch v-model="modal.switchFullscreen"/></span> - - </a-form-model-item> - - <j-modal - :visible.sync="modal.visible" - :width="1200" - :title="modal.title" - :fullscreen.sync="modal.fullscreen" - :switchFullscreen="modal.switchFullscreen" - > - - <template v-for="(i,k) of 30"> - <p :key="k">杩欐槸涓讳綋鍐呭锛岄珮搴︽槸鑷�傚簲鐨�</p> - </template> - - </j-modal> - - </a-col> - </a-row> - - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="鏍戝瓧鍏�" prop="treeDict"> - <j-tree-dict v-model="formData.treeDict" placeholder="璇烽�夋嫨鏍戝瓧鍏�" parentCode="B01" /> - </a-form-model-item> - </a-col> - <a-col :span="12">閫変腑鐨勫��(v-model)锛歿{ formData.treeDict }}</a-col> - </a-row> - - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="涓嬫媺鏍戦�夋嫨" prop="treeSelect"> - <j-tree-select - v-model="formData.treeSelect" - placeholder="璇烽�夋嫨鑿滃崟" - dict="sys_permission,name,id" - pidField="parent_id" - hasChildField="is_leaf" - pidValue="" - /> - </a-form-model-item> - </a-col> - <a-col :span="12">閫変腑鐨勫��(v-model)锛歿{ formData.treeSelect }}</a-col> - </a-row> - - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="涓嬫媺鏍戝閫�" prop="treeSelectMultiple"> - <j-tree-select - v-model="formData.treeSelectMultiple" - placeholder="璇烽�夋嫨鑿滃崟" - dict="sys_permission,name,id" - pidField="parent_id" - hasChildField="is_leaf" - pidValue="" - multiple - /> - </a-form-model-item> - </a-col> - <a-col :span="12">閫変腑鐨勫��(v-model)锛歿{ formData.treeSelectMultiple }}</a-col> - </a-row> - - <!-- 鍒嗙被瀛楀吀鏍� --> - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="鍒嗙被瀛楀吀鏍�" prop="selectCategory"> - <j-category-select v-model="formData.selectCategory" pcode="B01" :multiple="true"/> - </a-form-model-item> - </a-col> - <a-col :span="12">閫変腑鐨勫��(v-model)锛歿{ formData.selectCategory }}</a-col> - </a-row> - - <!-- VueCron --> - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="cron琛ㄨ揪寮�" prop="cronExpression"> - <j-easy-cron v-model="formData.cronExpression"></j-easy-cron> - </a-form-model-item> - </a-col> - </a-row> - - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="楂樼骇鏌ヨ"> - <j-super-query :fieldList="superQuery.fieldList" /> - </a-form-model-item> - </a-col> - </a-row> - - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="楂樼骇鏌ヨ锛堣嚜瀹氫箟鎸夐挳锛�"> - <j-super-query :fieldList="superQuery.fieldList"> - <!-- - v-slot:button 鍙互鏇撮珮鑷敱鐨勫畾鍒舵寜閽� - 鍙傛暟浠嬬粛锛� - isActive: 鏄惁鏄縺娲荤姸鎬侊紙宸叉湁楂樼骇鏌ヨ鏉′欢鐢熸晥锛� - isMobile: 褰撳墠鏄惁鏄Щ鍔ㄧ锛屽彲閽堝绉诲姩绔睍绀轰笉鍚岀殑鏍峰紡 - open: 鎵撳紑寮圭獥锛屼竴涓柟娉曪紝鍙粦瀹氱偣鍑讳簨浠� - reset: 閲嶇疆鎵�鏈夋煡璇㈡潯浠讹紝涓�涓柟娉曪紝鍙粦瀹氱偣鍑讳簨浠� - --> - <template v-slot:button="{isActive,isMobile,open,reset}"> - <!-- 瀹氫箟鐨勬槸鏅�氱姸鎬佷笅鐨勬寜閽� --> - <a-button v-if="!isActive" type="primary" ghost icon="clock-circle" @click="open()">楂樼骇鏌ヨ</a-button> - <!-- 瀹氫箟鐨勫綋鏈夐珮绾ф煡璇㈡潯浠剁敓鏁堢姸鎬佷笅鐨勬寜閽� --> - <a-button-group v-else> - <a-button type="primary" ghost @click="open()"> - <a-icon type="plus-circle" spin/> - <span>楂樼骇鏌ヨ</span> - </a-button> - <a-button v-if="isMobile" type="primary" ghost icon="delete" @click="reset()"/> - </a-button-group> - </template> - </j-super-query> - </a-form-model-item> - </a-col> - </a-row> - - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="鍥剧墖涓婁紶" prop="imgList"> - <j-image-upload bizPath="scott/pic" v-model="formData.imgList"></j-image-upload> - </a-form-model-item> - </a-col> - <a-col :span="12">閫変腑鐨勫��(v-model)锛歿{ formData.imgList }}</a-col> - </a-row> - <a-row :gutter="24" style="margin-top: 65px;margin-bottom:50px;"> - <a-col :span="12"> - <a-form-model-item label="鏂囦欢涓婁紶" prop="fileList"> - <j-upload v-model="formData.fileList"></j-upload> - </a-form-model-item> - </a-col> - <a-col :span="12"> - 閫変腑鐨勫��(v-model)锛� - <j-ellipsis :value="formData.fileList" :length="30" v-if="formData.fileList.length>0"/> - </a-col> - </a-row> - - <!-- 鐗规畩鏌ヨ缁勪欢 --> - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="鐗规畩鏌ヨ缁勪欢" prop="jInput"> - <a-row> - <a-col :span="15"> - <j-input v-model="formData.jInput" :type="jInput.type"/> - </a-col> - <a-col :span="4" style="text-align: right;" >鏌ヨ绫诲瀷锛�</a-col> - <a-col :span="5"> - <a-select v-model="jInput.type" :options="jInput.options"></a-select> - </a-col> - </a-row> - </a-form-model-item> - </a-col> - <a-col :span="12">杈撳叆鐨勫��(v-model)锛歿{ formData.jInput }}</a-col> - </a-row> - <a-row :gutter="24"> - <a-col :span="15"> - <a-form-model-item label="MarkdownEditor" prop="content" style="min-height: 300px"> - <j-markdown-editor v-model="formData.content"></j-markdown-editor> - </a-form-model-item> - </a-col> - <a-col :span="9"> - 杈撳叆鐨勫��(v-model)锛歿{ formData.content }} - </a-col> - </a-row> - - <!-- 鐪佸競鍘跨骇鑱� --> - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="鐪佸競鍘跨骇鑱�" prop="areaLinkage1"> - <j-area-linkage v-model="formData.areaLinkage1" type="cascader"/> - </a-form-model-item> - </a-col> - <a-col :span="12">杈撳叆鐨勫��(v-model)锛歿{ formData.areaLinkage1 }}</a-col> - </a-row> - - - <!-- 鐪佸競鍘跨骇鑱� --> - <a-row :gutter="24"> - <a-form-model-item label="鐪佸競鍘跨骇鑱�" prop="areaLinkage2"> - <j-area-linkage v-model="formData.areaLinkage2" type="select" style="float: left"/> - <span style="margin-left: 25px">杈撳叆鐨勫��(v-model)锛歿{ formData.areaLinkage2 }}</span> - </a-form-model-item> - </a-row> - <!-- 鍔熻兘绀轰緥锛氬叧闂綋鍓嶉〉闈� --> - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="鍔熻兘绀轰緥锛氬叧闂綋鍓嶉〉闈�"> - <a-button type="primary" @click="handleCloseCurrentPage">鐐瑰嚮鍏抽棴褰撳墠椤甸潰</a-button> - </a-form-model-item> - </a-col> - </a-row> - - <!-- JPopup绀轰緥 --> - <a-row :gutter="24"> - <a-col :span="12"> - <a-form-model-item label="JPopup绀轰緥" prop="jPopup"> - <j-popup v-model="formData.jPopup" code="demo" field="name" orgFields="name" destFields="name" :multi="true"/> - </a-form-model-item> - </a-col> - <a-col :span="12">閫夋嫨鐨勫��(v-model)锛歿{ formData.jPopup }}</a-col> - </a-row> - - </a-form-model> - </div> - - </a-card> -</template> - -<script> - - import JDictSelectTag from '../../components/dict/JDictSelectTag.vue' - import JSelectDepart from '@/components/jeecgbiz/JSelectDepart' - import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep' - import JSelectMultiUser from '@/components/jeecgbiz/JSelectMultiUser' - import JSelectRole from '@/components/jeecgbiz/JSelectRole' - import JCheckbox from '@/components/jeecg/JCheckbox' - import JCodeEditor from '@/components/jeecg/JCodeEditor' - import JDate from '@/components/jeecg/JDate' - import JEditor from '@/components/jeecg/JEditor' - import JEllipsis from '@/components/jeecg/JEllipsis' - import JSlider from '@/components/jeecg/JSlider' - import JSelectMultiple from '@/components/jeecg/JSelectMultiple' - import JTreeDict from "../../components/jeecg/JTreeDict.vue"; - import JCron from "@/components/jeecg/JCron.vue"; - import JEasyCron from "@/components/jeecg/JEasyCron"; - import JTreeSelect from '@/components/jeecg/JTreeSelect' - import JSuperQuery from '@/components/jeecg/JSuperQuery' - import JUpload from '@/components/jeecg/JUpload' - import JImageUpload from '@/components/jeecg/JImageUpload' - import JSelectPosition from '@comp/jeecgbiz/JSelectPosition' - import JCategorySelect from '@comp/jeecg/JCategorySelect' - import JMultiSelectTag from '@comp/dict/JMultiSelectTag' - import JInput from '@comp/jeecg/JInput' - import JAreaLinkage from '@comp/jeecg/JAreaLinkage' - import JMarkdownEditor from '@/components/jeecg/JMarkdownEditor/index' - import JSearchSelectTag from '@/components/dict/JSearchSelectTag' - - export default { - name: 'SelectDemo', - inject:['closeCurrent'], - components: { - JMarkdownEditor, - JAreaLinkage, - JInput, - JCategorySelect, - JSelectPosition, - JImageUpload, - JUpload, - JTreeDict, - JDictSelectTag, - JSelectDepart, - JSelectUserByDep, - JSelectMultiUser, - JSelectRole, - JCheckbox, - JCodeEditor, - JDate, JEditor, JEllipsis, JSlider, JSelectMultiple, - JCron, JEasyCron,JTreeSelect, JSuperQuery, JMultiSelectTag, - JSearchSelectTag - }, - data() { - return { - selectList: [], - selectedDepUsers: '', - formData: { - areaLinkage1: '110105', - areaLinkage2: '140221', - sex: 1, - orgCodes: 'A02A01,A02A02', - departId: '57197590443c44f083d42ae24ef26a2c,a7d7e77e06c84325a40932163adcdaa6', - userIds: 'admin', - multiUser: 'admin,jeecg', - jCheckbox: 'spring,jeecgboot', - jCodeEditor: `function sayHi(word) {\n alert(word)\n}\nsayHi('hello, world!')`, - jDate: '2019-5-10 15:33:06', - jEditor: '<h2 style="text-align: center;">瀵屾枃鏈紪杈戝櫒</h2> <p>杩欓噷鏄瘜鏂囨湰缂栬緫鍣ㄣ��</p>', - jEllipsis: '杩欐槸涓�涓插緢闀垮緢闀跨殑鏂囧瓧娈佃惤銆傝繖鏄竴涓插緢闀垮緢闀跨殑鏂囧瓧娈佃惤銆傝繖鏄竴涓插緢闀垮緢闀跨殑鏂囧瓧娈佃惤銆傝繖鏄竴涓插緢闀垮緢闀跨殑鏂囧瓧娈佃惤銆�', - jSlider: false, - jSelectMultiple: 'Integer,Boolean', - imgList:[], - fileList:[], - content: '', - cronExpression: '* * * * * ? *', - }, - jCheckboxOptions: [ - {label: 'Jeecg', value: 'jeecg'}, - {label: 'Jeecg-Boot', value: 'jeecgboot'}, - {label: 'Spring', value: 'spring', disabled: true}, - {label: 'MyBaits', value: 'mybatis'} - ], - jSelectMultipleOptions: [ - {text: '瀛楃涓�', value: 'String'}, - {text: '鏁存暟鍨�', value: 'Integer'}, - {text: '娴偣鍨�', value: 'Double'}, - {text: '甯冨皵鍨�', value: 'Boolean'} - ], - modal: { - title: '杩欓噷鏄爣棰�', - visible: false, - fullscreen: true, - switchFullscreen: true, - }, - cron: '', - superQuery: { - fieldList: [ - { type: 'input', value: 'name', text: '濮撳悕', }, - { type: 'switch', value: 'switch', text: '寮�鍏�', }, - { type: 'select', value: 'sex', text: '鎬у埆', dictCode: 'sex' }, - { type: 'number', value: 'age', text: '骞撮緞', }, - { - type: 'select', value: 'hobby', text: '鐖卞ソ', - options: [ - { label: '闊充箰', value: '1' }, - { label: '娓告垙', value: '2' }, - { label: '鐢靛奖', value: '3' }, - { label: '璇讳功', value: '4' }, - ] - }, - ] - }, - jInput: { - type: 'like', - options: [ - { value: 'like', label: '妯$硦锛坙ike锛�' }, - { value: 'ne', label: '涓嶇瓑浜庯紙ne锛�' }, - { value: 'ge', label: '澶т簬绛変簬锛坓e锛�' }, - { value: 'le', label: '灏忎簬绛変簬锛坙e)' }, - ], - }, - searchOptions:[{ - text:"閫夐」涓�", - value:"1" - },{ - text:"閫夐」浜�", - value:"2" - },{ - text:"閫夐」涓�", - value:"3" - }], - - // 閫夋嫨鐢ㄦ埛鏌ヨ鏉′欢閰嶇疆 - selectUserQueryConfig: [ - {key: 'phone', label: '鐢佃瘽'}, - ], - } - }, - computed: { - nameList: function() { - - var names = [] - for (var a = 0; a < this.selectList.length; a++) { - names.push(this.selectList[a].name) - } - return names - } - }, - methods: { - handleChange() { - }, - getDepartIdValue() { - return this.formData.departId - }, - getOrgCodesValue() { - return this.formData.orgCodes - }, - changeMe() { - console.log('you so ... , change Me') - }, - selectOK: function(data) { - this.selectList = data - }, - handleSelect: function() { - this.$refs.selectDemoModal.add() - }, - selectReset() { - this.selectList = [] - }, - //閫氳繃缁勭粐鏈烘瀯绛涢�夐�夋嫨鐢ㄦ埛 - onSearchDepUser() { - this.$refs.JSearchUserByDep.showModal() - this.selectedDepUsers = '' - this.$refs.JSearchUserByDep.title = '鏍规嵁閮ㄩ棬鏌ヨ鐢ㄦ埛' - }, - onSearchDepUserCallBack(selectedDepUsers) { - this.selectedDepUsers = selectedDepUsers - }, - handleJSliderSuccess(value) { - this.formData.jSlider = value - }, - - handleCloseCurrentPage() { - // 娉ㄦ剰锛氫互涓嬩唬鐮佸繀椤诲瓨鍦� - // inject:['closeCurrent'], - this.closeCurrent() - }, - - } - } -</script> -<style lang="less" scoped> - .ant-card-body .table-operator { - margin-bottom: 18px; - } - - .ant-table-tbody .ant-table-row td { - padding-top: 15px; - padding-bottom: 15px; - } - - .anty-row-operator button { - margin: 0 5px - } - - .ant-btn-danger { - background-color: #ffffff - } - - .ant-modal-cust-warp { - height: 100% - } - - .ant-modal-cust-warp .ant-modal-body { - height: calc(100% - 110px) !important; - overflow-y: auto - } - - .ant-modal-cust-warp .ant-modal-content { - height: 90% !important; - overflow-y: hidden - } -</style> \ No newline at end of file diff --git a/src/views/jeecg/SplitPanel.vue b/src/views/jeecg/SplitPanel.vue deleted file mode 100644 index 8d128fb..0000000 --- a/src/views/jeecg/SplitPanel.vue +++ /dev/null @@ -1,32 +0,0 @@ -<template> - <a-card> - <a-button @click="splitPane" type="primary" icon="desktop">鐐规垜鍒嗗睆</a-button> - - <split-panel-modal ref="splitPanelModal"></split-panel-modal> - </a-card> -</template> - -<script> - import SplitPanelModal from './modules/SplitPanelModal' - - export default { - name: 'SplitPanel', - components:{ - SplitPanelModal, - }, - data() { - return { - description: '鍒嗗睆', - } - }, - methods:{ - splitPane(){ - this.$refs.splitPanelModal.show(); - } - } - } -</script> - -<style scoped> - -</style> \ No newline at end of file diff --git a/src/views/jeecg/TableExpandeSub.vue b/src/views/jeecg/TableExpandeSub.vue deleted file mode 100644 index d9ca621..0000000 --- a/src/views/jeecg/TableExpandeSub.vue +++ /dev/null @@ -1,266 +0,0 @@ -<template> - <a-card :bordered="false"> - - <!-- 鏌ヨ鍖哄煙 --> - <div class="table-page-search-wrapper"> - <a-form layout="inline"> - <a-row :gutter="24"> - - <a-col :md="6" :sm="24"> - <a-form-item label="璁㈠崟鍙�"> - <a-input placeholder="璇疯緭鍏ヨ鍗曞彿" v-model="queryParam.orderCode"></a-input> - </a-form-item> - </a-col> - <a-col :md="6" :sm="24"> - <a-form-item label="璁㈠崟绫诲瀷"> - <a-select placeholder="璇疯緭鍏ヨ鍗曠被鍨�" v-model="queryParam.ctype"> - <a-select-option value="1">鍥藉唴璁㈠崟</a-select-option> - <a-select-option value="2">鍥介檯璁㈠崟</a-select-option> - </a-select> - </a-form-item> - </a-col> - - <a-col :md="6" :sm="24"> - <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> - <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> - <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button> - </span> - </a-col> - - </a-row> - </a-form> - </div> - - <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> - <div class="table-operator"> - <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button> - - <a-dropdown v-if="selectedRowKeys.length > 0"> - <a-menu slot="overlay"> - <a-menu-item key="1" @click="batchDel"> - <a-icon type="delete"/> - 鍒犻櫎 - </a-menu-item> - </a-menu> - <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 - <a-icon type="down"/> - </a-button> - </a-dropdown> - </div> - - <!-- table鍖哄煙-begin --> - <div> - <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> - <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤� - <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a> - </div> - - <a-table - ref="table" - bordered - rowKey="id" - :columns="columns" - :dataSource="dataSource" - :pagination="false" - :expandedRowKeys= "expandedRowKeys" - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" - @change="handleTableChange" - @expand="handleExpand" - > - - <span slot="action" slot-scope="text, record"> - <a @click="handleEdit(record)">缂栬緫</a> - <a-divider type="vertical"/> - <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> - <a>鍒犻櫎</a> - </a-popconfirm> - </span> - <a-table - slot="expandedRowRender" - slot-scope="text" - :columns="innerColumns" - :dataSource="innerData" - size="middle" - bordered - rowKey="id" - :pagination="false" - :loading="loading" - > - </a-table> - </a-table> - </div> - <!-- table鍖哄煙-end --> - - <!-- 琛ㄥ崟鍖哄煙 --> - <jeecgOrderDMain-modal ref="modalForm" @ok="modalFormOk"></jeecgOrderDMain-modal> - </a-card> -</template> - -<script> - import { getAction } from '@/api/manage' - import JeecgOrderDMainModal from '@/views/jeecg/tablist/form/JeecgOrderDMainModal' - import {JeecgListMixin} from '@/mixins/JeecgListMixin' - - export default { - name: "TableDemo", - mixins: [JeecgListMixin], - components: { - JeecgOrderDMainModal - }, - data() { - return { - // 瀛愯〃琛ㄥご - innerColumns: [ - { - title: '瀹㈡埛鍚�', - align: "center", - width: 100, - dataIndex: 'name', - key: 'name', - }, - { - title: '鎬у埆', - align: "center", - dataIndex: 'sex', - customRender: function (text) { - if (text == 1) { - return "鐢�"; - } else if (text == 2) { - return "濂�"; - } else { - return text; - } - } - }, - { - title: '韬唤璇佸彿鐮�', - align: "center", - dataIndex: 'idcard', - }, - { - title: '鐢佃瘽', - dataIndex: 'telphone', - align: "center", - }, - - ], - innerData: [], - expandedRowKeys: [], - id: ' ', - description: '鍒楄〃灞曞紑瀛愯〃Demo', - // 鍒楄〃琛ㄥご - columns: [{ - title: '#', - dataIndex: '', - key: 'rowIndex', - width: 60, - align: "center", - customRender: function (t, r, index) { - return parseInt(index) + 1; - } - }, - { - title: '璁㈠崟鍙�', - align: "center", - dataIndex: 'orderCode' - }, - { - title: '璁㈠崟绫诲瀷', - align: "center", - dataIndex: 'ctype', - customRender: (text) => { - let re = ""; - if (text === '1') { - re = "鍥藉唴璁㈠崟"; - } else if (text === '2') { - re = "鍥介檯璁㈠崟"; - } - return re; - } - }, - { - title: '璁㈠崟鏃ユ湡', - align: "center", - dataIndex: 'orderDate' - }, - { - title: '璁㈠崟閲戦', - align: "center", - dataIndex: 'orderMoney' - }, - { - title: '璁㈠崟澶囨敞', - align: "center", - dataIndex: 'content' - }, - { - title: '鎿嶄綔', - dataIndex: 'action', - align: "center", - scopedSlots: {customRender: 'action'}, - }], - // 鍒嗛〉鍙傛暟 - type: "radio", - url: { - list: "/test/order/orderList", - delete: "/test/order/delete", - deleteBatch: "/test/order/deleteBatch", - customerListByMainId: "/test/order/listOrderCustomerByMainId", - }, - } - }, - computed: { - currentId(){ - return this.id; - } - }, - methods: { - handleExpand(expanded, record){ - this.expandedRowKeys=[]; - this.innerData=[]; - if(expanded===true){ - this.loading = true; - this.expandedRowKeys.push(record.id); - getAction(this.url.customerListByMainId, {mainId: record.id}).then((res) => { - if (res.success) { - this.loading = false; - this.innerData = res.result.records; - } - }); - } - }, - } - } -</script> -<style scoped> - .ant-card-body .table-operator { - margin-bottom: 18px; - } - - .ant-table-tbody .ant-table-row td { - padding-top: 15px; - padding-bottom: 15px; - } - - .anty-row-operator button { - margin: 0 5px - } - - .ant-btn-danger { - background-color: #ffffff - } - - .ant-modal-cust-warp { - height: 100% - } - - .ant-modal-cust-warp .ant-modal-body { - height: calc(100% - 110px) !important; - overflow-y: auto - } - - .ant-modal-cust-warp .ant-modal-content { - height: 90% !important; - overflow-y: hidden - } -</style> \ No newline at end of file diff --git a/src/views/jeecg/TableOrderTotal.vue b/src/views/jeecg/TableOrderTotal.vue deleted file mode 100644 index 78cb6b3..0000000 --- a/src/views/jeecg/TableOrderTotal.vue +++ /dev/null @@ -1,231 +0,0 @@ -<template> - <a-card :bordered="false"> - <a-row> - <a-col> - <a-switch v-bind="pageSwitchProps" v-model="pageSwitch"/> - </a-col> - <a-col> - <a-table - v-bind="tableProps" - @change="handleTableChange" - style="margin-top: 20px" - > - </a-table> - </a-col> - </a-row> - </a-card> -</template> - -<script> - export default { - name: 'TableTotal', - data() { - return { - columns: [ - { - title: '#', - width: '180px', - align: 'center', - dataIndex: 'rowIndex', - customRender: function (text, r, index) { - return (text !== '鎬昏') ? (parseInt(index) + 1) : text - } - }, - { - title: '濮撳悕', - dataIndex: 'name', - width: 180, - }, - { - title: '璐$尞鐐�', - dataIndex: 'point', - width: 180, - }, - { - title: '绛夌骇', - dataIndex: 'level', - width: 180, - }, - { - title: '鏇存柊鏃堕棿', - dataIndex: 'updateTime', - width: 180, - }, - ], - /* 鍒嗛〉鍙傛暟 */ - ipagination:{ - current: 1, - pageSize: 10, - }, - dataSource: [ - { id:"1",name: '寮犱笁', point: 23, level: 3, updateTime: '2019-8-14' }, - { name: '灏忕帇', point: 6, level: 1, updateTime: '2019-8-13' }, - { name: '鏉庡洓', point: 53, level: 8, updateTime: '2019-8-12' }, - { name: '灏忕孩', point: 44, level: 5, updateTime: '2019-8-11' }, - { name: '鐜嬩簲', point: 97, level: 10, updateTime: '2019-8-10' }, - { name: '灏忔槑', point: 33, level: 2, updateTime: '2019-8-10' }, - { name: '灏忓紶', point: 33, level: 2, updateTime: '2019-8-10' }, - { name: '灏忓叚', point: 33, level: 2, updateTime: '2019-8-10' }, - { name: '灏忎簲', point: 33, level: 2, updateTime: '2019-8-10' }, - { name: '灏忚档', point: 33, level: 2, updateTime: '2019-8-10' }, - { name: '鏉庡崕', point: 33, level: 2, updateTime: '2019-8-10' }, - { name: '灏忓悍', point: 33, level: 2, updateTime: '2019-8-10' }, - { name: '灏忛箍', point: 33, level: 2, updateTime: '2019-8-10' }, - ], - newArr:[], - newDataSource:[], - footerDataSource: [], - pageSwitch:true - } - }, - computed:{ - // 鏁版嵁琛ㄦ牸鐨勫浐瀹氬睘鎬� - tableProps(){ - let tableProps = { - size: 'middle', - rowKey:'rowIndex', - columns: this.columns, - scroll: {x: true}, - } - let renderFooter = this.footerDataSource.length === 0 ? null : () => this.renderTableFooter(tableProps) - return { - ...tableProps, - ref: 'table', - class: 'chart-data-list', - pagination:this.pageSwitch?this.ipagination:false, - columns: this.columns, - dataSource: this.dataSource, - footer: renderFooter, - } - }, - pageSwitchProps() { - return { - checkedChildren: '鍒嗛〉', - unCheckedChildren: '鍒嗛〉', - style: { - position: 'absolute', - right: '0px', - top: '-10px' - } - } - }, - }, - mounted() { - // this.tableAddTotalRow(this.columns, this.dataSource) - /*鏂板鍒嗛〉鍚堣鏂规硶*/ - this.newDataSource=this.dataSource - this.dataHandling(1,this.ipagination.pageSize) - }, - watch:{ - //update-begin---author:wangshuai ---date:20220209 for锛歔JTC-494]甯哥敤绀轰緥->琛ㄦ牸鍚堣鍐欐硶鏀规垚鏂扮殑鍐欐硶------------ - 'pageSwitch':function(val){ - if(!val){ - this.dataHandling('-1',0) - }else{ - this.dataHandling(1,this.ipagination.pageSize) - } - }, - 'ipagination.current':function(val) { - this.dataHandling(val,this.ipagination.pageSize) - }, - //褰撳悎璁¤鍙樺寲鏃讹紝缁戝畾婊氬姩鏉� - 'footerDataSource': { - async handler(dataSource) { - // 褰撳簳閮ㄥ悎璁¤鏈夊�硷紝骞朵笖鏄剧ず鍑烘潵鏃讹紝鍐嶅悓姝ユ粴鍔ㄦ潯 - if (dataSource && dataSource.length > 0) { - await this.$nextTick() - // 鍚屾琛ㄤ笌footer婊氬姩 - let dom = this.$refs.table.$el.querySelectorAll('.ant-table-body')[0] - let footerDom = this.$refs.footerTable.$el.querySelectorAll('.ant-table-body')[0] - dom.addEventListener( - 'scroll', - () => { - footerDom.scrollLeft = dom.scrollLeft - }, - true, - ) - } - }, - //update-end---author:wangshuai ---date:20220209 for锛歔JTC-494]甯哥敤绀轰緥->琛ㄦ牸鍚堣鍐欐硶鏀规垚鏂扮殑鍐欐硶------------ - } - }, - methods: { - /** 琛ㄦ牸澧炲姞鍚堣琛� */ - tableAddTotalRow(columns, dataSource) { - let numKey = 'rowIndex' - let totalRow = { [numKey]: '鍚堣' } - columns.forEach(column => { - let { key, dataIndex } = column - if (![key, dataIndex].includes(numKey)) { - - let total = 0 - dataSource.forEach(data => { - total += /^\d+\.?\d?$/.test(data[dataIndex]) ? Number.parseInt(data[dataIndex]) : Number.NaN - console.log(data[dataIndex], ':', (/^\d+\.?\d?$/.test(data[dataIndex]) ? Number.parseInt(data[dataIndex]) : Number.NaN)) - }) - - if (Number.isNaN(total)) { - total = '-' - } - totalRow[dataIndex] = total - } - }) - - dataSource.push(totalRow) - }, - handleTableChange(pagination, filters, sorter) { - this.ipagination = pagination; - }, - //update-begin---author:wangshuai ---date:20220209 for锛歔JTC-494]甯哥敤绀轰緥->琛ㄦ牸鍚堣鍐欐硶鏀规垚鏂扮殑鍐欐硶------------ - /*濡傛灉鍒嗛〉璧拌繖涓柟娉�*/ - dataHandling(pageNo,pageSize) { - //鏍规嵁褰撳墠椤垫暟鍜屾瘡椤垫樉绀烘潯鏁板垎鍓叉暟缁� - let arrs = []; - //濡傛灉pageNo涓嶆槸-1锛堜笉鍒嗛〉锛�,閭d箞闇�瑕佸鏁版嵁杩涜鍒嗛〉璁$畻 - if(pageNo!=-1){ - arrs = this.newDataSource.slice((pageNo-1)*pageSize,pageNo*pageSize) - }else{ - arrs = this.newDataSource - } - let newDataSource=[]; - let newArr= { }; - newArr.rowIndex="鎬昏" - let level=0; - let point=0; - //姣忎竴椤圭殑鏁板�肩浉鍔� - for (let j=0;j<arrs.length;j++){ - level+=arrs[j].level; - point+=arrs[j].point; - } - newArr.level=level; - newArr.point=point; - newDataSource.push(newArr); - //缁檉oot搴曢儴鏁扮粍璧嬪�� - this.footerDataSource = newDataSource; - }, - // 娓叉煋琛ㄦ牸搴曢儴鍚堣琛� - renderTableFooter(tableProps) { - let h = this.$createElement - return h('a-table', { - ref: 'footerTable', - props: { - ...tableProps, - pagination: false, - dataSource: this.footerDataSource, - showHeader: false, - }, - }) - //update-end---author:wangshuai ---date:20220209 for锛歔JTC-494]甯哥敤绀轰緥->琛ㄦ牸鍚堣鍐欐硶鏀规垚鏂扮殑鍐欐硶------------ - } - } - } -</script> - -<style scoped lang="less"> -/deep/ .chart-data-list .ant-table-footer .ant-table-body{ - overflow: hidden !important; -} -/deep/ .ant-table-footer{ - padding:0; -} -</style> \ No newline at end of file diff --git a/src/views/jeecg/TableTotal.vue b/src/views/jeecg/TableTotal.vue deleted file mode 100644 index f7d0bd4..0000000 --- a/src/views/jeecg/TableTotal.vue +++ /dev/null @@ -1,164 +0,0 @@ -<template> - <a-card :bordered="false"> - <a-table - rowKey="rowIndex" - bordered - :columns="columns" - :dataSource="dataSource" - :pagination="ipagination" - @change="handleTableChange" - > - </a-table> - </a-card> -</template> - -<script> - export default { - name: 'TableTotal', - data() { - return { - columns: [ - { - title: '#', - width: '180px', - align: 'center', - dataIndex: 'rowIndex', - customRender: function (text, r, index) { - return (text !== '鍚堣') ? (parseInt(index) + 1) : text - } - }, - { - title: '濮撳悕', - dataIndex: 'name', - }, - { - title: '璐$尞鐐�', - dataIndex: 'point', - }, - { - title: '绛夌骇', - dataIndex: 'level', - }, - { - title: '鏇存柊鏃堕棿', - dataIndex: 'updateTime', - }, - ], - /* 鍒嗛〉鍙傛暟 */ - ipagination:{ - current: 1, - pageSize: 10, - pageSizeOptions: ['10', '20', '30'], - showTotal: (total, range) => { - return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�" - }, - showQuickJumper: true, - showSizeChanger: true, - total: 0 - }, - dataSource: [ - { id:"1",name: '寮犱笁', point: 23, level: 3, updateTime: '2019-8-14' }, - { name: '灏忕帇', point: 6, level: 1, updateTime: '2019-8-13' }, - { name: '鏉庡洓', point: 53, level: 8, updateTime: '2019-8-12' }, - { name: '灏忕孩', point: 44, level: 5, updateTime: '2019-8-11' }, - { name: '鐜嬩簲', point: 97, level: 10, updateTime: '2019-8-10' }, - { name: '灏忔槑', point: 33, level: 2, updateTime: '2019-8-10' }, - { name: '灏忓紶', point: 33, level: 2, updateTime: '2019-8-10' }, - { name: '灏忓叚', point: 33, level: 2, updateTime: '2019-8-10' }, - { name: '灏忎簲', point: 33, level: 2, updateTime: '2019-8-10' }, - { name: '灏忚档', point: 33, level: 2, updateTime: '2019-8-10' }, - { name: '鏉庡崕', point: 33, level: 2, updateTime: '2019-8-10' }, - { name: '灏忓悍', point: 33, level: 2, updateTime: '2019-8-10' }, - { name: '灏忛箍', point: 33, level: 2, updateTime: '2019-8-10' }, - ], - newArr:[], - newDataSource:[], - } - }, - mounted() { - // this.tableAddTotalRow(this.columns, this.dataSource) - /*鏂板鍒嗛〉鍚堣鏂规硶*/ - this.newDataSource=this.dataSource - this.dataHandling(this.ipagination.pageSize-1) - }, - watch:{ - 'ipagination.pageSize':function(val) { - this.dataHandling(val-1) - } - }, - methods: { - /** 琛ㄦ牸澧炲姞鍚堣琛� */ - tableAddTotalRow(columns, dataSource) { - let numKey = 'rowIndex' - let totalRow = { [numKey]: '鍚堣' } - columns.forEach(column => { - let { key, dataIndex } = column - if (![key, dataIndex].includes(numKey)) { - - let total = 0 - dataSource.forEach(data => { - total += /^\d+\.?\d?$/.test(data[dataIndex]) ? Number.parseInt(data[dataIndex]) : Number.NaN - console.log(data[dataIndex], ':', (/^\d+\.?\d?$/.test(data[dataIndex]) ? Number.parseInt(data[dataIndex]) : Number.NaN)) - }) - - if (Number.isNaN(total)) { - total = '-' - } - totalRow[dataIndex] = total - } - }) - - dataSource.push(totalRow) - }, - handleTableChange(pagination, filters, sorter) { - this.ipagination = pagination; - }, - /*濡傛灉鍒嗛〉璧拌繖涓柟娉�*/ - dataHandling(num) { - this.newArr=[]; - let arrLength = this.newDataSource.length; // 鏁扮粍闀垮害; - let index = 0; - for (let i = 0; i < arrLength; i++) { - if (i % num === 0 && i !== 0) { - this.newArr.push(this.newDataSource.slice(index, i)); - index = i; - } - if ((i + 1) === arrLength) { - this.newArr.push(this.newDataSource.slice(index, (i + 1))); - } - } - var arrs=this.newArr; - for (let i =0;i<arrs.length;i++){ - let arr = arrs[i]; - let newArr= { }; - newArr.name="-"; - newArr.updateTime="-"; - newArr.rowIndex="鍚堣" - var level=0; - var point=0; - for (let j=0;j<arr.length;j++){ - level+=arr[j].level; - point+=arr[j].point; - } - newArr.level=level; - newArr.point=point; - arrs[i].push(newArr); - } - var newDataSource=[]; - for (let i =0;i<arrs.length;i++){ - let arr = arrs[i]; - for(var j in arr){ - newDataSource.push(arr[j]); - } - } - console.log(this.dataSource) - this.dataSource = Object.values(newDataSource); - console.log(this.dataSource) - } - } - } -</script> - -<style scoped> - -</style> \ No newline at end of file diff --git a/src/views/jeecg/ThirdAppMessageTest.vue b/src/views/jeecg/ThirdAppMessageTest.vue deleted file mode 100644 index 1f2f134..0000000 --- a/src/views/jeecg/ThirdAppMessageTest.vue +++ /dev/null @@ -1,208 +0,0 @@ -<template> - <a-card :bordered="false"> - <a-spin :spinning="loading"> - <a-form-model ref="form" :model="model" :rules="rules"> - <a-tabs> - <a-tab-pane tab="娑堟伅閫夐」" key="1"> - <a-form-model-item label="娴嬭瘯APP" prop="app" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-select v-model="model.app" placeholder="璇烽�夋嫨娴嬭瘯APP" :options="appOptions"/> - </a-form-model-item> - <a-form-model-item label="鍙戦�佺粰鎵�鏈変汉" prop="sendAll" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-switch checkedChildren="鏄�" unCheckedChildren="鍚�" v-model="model.sendAll" @change="onSendAllChange"/> - </a-form-model-item> - <a-form-model-item label="鎺ユ敹浜�" prop="receiver" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <j-select-multi-user v-model="model.receiver" :disabled="model.sendAll" placeholder="璇烽�夋嫨鎺ユ敹浜�"/> - </a-form-model-item> - <a-form-model-item label="娑堟伅鍐呭" prop="content" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-textarea :rows="5" v-model="model.content" placeholder="璇疯緭鍏ユ秷鎭唴瀹�"/> - </a-form-model-item> - <div style="text-align: center;"> - <a-button type="primary" size="large" @click="onSend" style="width: 120px;">鍙戦��</a-button> - </div> - </a-tab-pane> - </a-tabs> - - <a-tabs> - <a-tab-pane tab="娴嬭瘯缁撴灉锛堝埛鏂拌嚜鍔ㄦ竻绌猴級" key="1"> - <a-table - rowKey="id" - bordered - size="middle" - :columns="columns" - :dataSource="dataSource" - > - <div slot="action" slot-scope="text, record"> - <template v-if="record.app==='DINGTALK'"> - <a-popconfirm v-if="!record.recalled" title="纭畾鍚楋紵" @confirm="handleRecall(record)"> - <a @click="">鎾ゅ洖</a> - </a-popconfirm> - <span v-else>宸叉挙鍥�</span> - </template> - <template v-else>-</template> - </div> - </a-table> - - </a-tab-pane> - </a-tabs> - </a-form-model> - </a-spin> - </a-card> -</template> - -<script> -import { loadEnabledTypes } from '@/components/jeecgbiz/thirdApp/JThirdAppButton' -import { postAction } from '@/api/manage' -import { randomUUID } from '@/utils/util' - -export default { - name: 'ThirdAppMessageTest', - data() { - return { - loading: false, - labelCol: {span: 6}, - wrapperCol: {span: 12}, - model: { - sendAll: false, - }, - enabledTypes: {}, - columns: [ - { - title: '#', - dataIndex: '', - key: 'rowIndex', - width: 60, - align: 'center', - customRender: (t, r, index) => { - return this.dataSource.length - index - } - }, - { - title: '娴嬭瘯APP', - align: 'center', - dataIndex: 'app', - customRender: (t, r, index) => { - if (t === 'WECHAT_ENTERPRISE') { - return '浼佷笟寰俊' - } - if (t === 'DINGTALK') { - return '閽夐拤' - } else { - return t - } - } - }, - { - title: '鎺ユ敹浜�', - align: 'center', - dataIndex: 'receiver', - customRender: (t, r, index) => { - return r.sendAll ? '銆愬叏浣撱��' : t - } - }, - { - title: '娑堟伅鍐呭', - align: 'center', - dataIndex: 'content' - }, - { - title: 'response', - align: 'center', - dataIndex: 'response' - }, - { - title: '鎿嶄綔', - dataIndex: 'action', - align: 'center', - fixed: 'right', - width: 80, - scopedSlots: {customRender: 'action'} - } - ], - dataSource: [], - } - }, - computed: { - rules() { - return { - app: [{required: true, message: '璇烽�夋嫨娴嬭瘯APP'}], - url: [{required: this.show, message: '璇疯緭鍏ヨ彍鍗曡矾寰�!'}], - receiver: [{required: !this.model.sendAll, message: '璇烽�夋嫨鎺ユ敹浜�'}], - content: [{required: true, message: '娑堟伅鍐呭涓嶈兘涓虹┖'}] - } - }, - appOptions() { - return [ - { - label: `浼佷笟寰俊${this.enabledTypes.wechatEnterprise ? '' : '锛堝凡绂佺敤锛�'}`, - value: 'WECHAT_ENTERPRISE', - disabled: !this.enabledTypes.wechatEnterprise - }, - { - label: `閽夐拤${this.enabledTypes.dingtalk ? '' : '锛堝凡绂佺敤锛�'}`, - value: 'DINGTALK', - disabled: !this.enabledTypes.dingtalk - }, - ] - }, - }, - created() { - this.loadEnabledTypes() - }, - methods: { - - // 鑾峰彇鍚敤鐨勭涓夋柟App - async loadEnabledTypes() { - this.enabledTypes = await loadEnabledTypes() - }, - - onSendAllChange() { - this.$refs.form.clearValidate('receiver') - }, - - onSend() { - this.$refs.form.validate((ok, err) => { - if (ok) { - this.loading = true - postAction('/sys/thirdApp/sendMessageTest', this.model).then(({success, result, message}) => { - if (success) { - let response = '' - try { - response = JSON.stringify(result) - } catch (e) { - response = result - } - this.dataSource.unshift(Object.assign({id: randomUUID()}, this.model, {response})) - } else { - this.$message.warning(message) - } - }).finally(() => this.loading = false) - } - }) - }, - - handleRecall(record) { - try { - let response = JSON.parse(record.response) - postAction('/sys/thirdApp/recallMessageTest', { - app: record.app, - msg_task_id: response.result - }).then(res => { - if (res.success) { - this.$set(record, 'recalled', true) - this.$message.success(res.message) - } else { - this.$message.warning(res.message) - } - }).catch(e => this.$message.warning(e.message || e)) - } catch (e) { - this.$message.warning(e.message || e) - } - }, - - }, -} -</script> - -<style scoped> - -</style> \ No newline at end of file diff --git a/src/views/jeecg/helloworld.vue b/src/views/jeecg/helloworld.vue deleted file mode 100644 index 4e19b90..0000000 --- a/src/views/jeecg/helloworld.vue +++ /dev/null @@ -1,97 +0,0 @@ -<template> - <a-card :bordered="false"> - <a-form-model ref="form" :model="model" :rules="rules" @submit="handleSubmit"> - <a-row> - <a-col :md="24" :sm="24"> - <a-form-model-item label="Note" prop="note" :labelCol="{ span: 7 }" :wrapperCol="{ span: 15 }"> - <a-input v-model="model.note"/> - </a-form-model-item> - </a-col> - </a-row> - <a-row> - <a-col :md="24" :sm="24"> - <a-form-model-item label="Gender" prop="gender" :labelCol="{ span: 7 }" :wrapperCol="{ span: 15 }"> - <a-select v-model="model.gender" placeholder="Select a option and change input text above" @change="handleSelectChange"> - <a-select-option value="male">male</a-select-option> - <a-select-option value="female">female</a-select-option> - </a-select> - </a-form-model-item> - </a-col> - </a-row> - <a-row> - <a-col :md="24" :sm="24"> - <a-form-model-item label="Gender" prop="cascader" :labelCol="{ span: 7 }" :wrapperCol="{ span: 15 }"> - <a-cascader :options="areaOptions" @change="onChange" :showSearch="{filter}" placeholder="Please select" /> - </a-form-model-item> - </a-col> - </a-row> - <a-form-model-item :wrapperCol="{ span: 12, offset: 5 }"> - <a-col :md="24" :sm="24"> - <a-form-model-item :wrapperCol="{ span: 12, offset: 5 }"> - <a-button type="primary" htmlType="submit">Submit</a-button> - </a-form-model-item> - </a-col> - </a-form-model-item> - </a-form-model> - </a-card> -</template> - -<script> - import { getAction } from '@/api/manage' - export default { - props: ['sex','name'], - data () { - return { - formLayout: 'horizontal', - model: {}, - rules: { - note: [{required: true, message: 'Please input your note!'}], - gender:[{ required: true, message: 'Please select your gender!' }] - }, - areaOptions:[] - } - }, - methods: { - handleSubmit (e) { - e.preventDefault() - this.$refs.form.validate((ok, err) => { - if (ok) { - console.log('Received values of form: ', this.model) - this.$message.success('succeed!') - } - }) - }, - handleSelectChange (value) { - console.log(value) - this.model.note = `Hi, ${value === 'male' ? 'man' : 'lady'}!` - }, - onChange(value, selectedOptions) { - console.log(value, selectedOptions); - }, - filter(inputValue, path) { - return (path.some(option => (option.label).toLowerCase().indexOf(inputValue.toLowerCase()) > -1)); - }, - }, - created (){ - console.log('============= online href common props ============= '); - console.log('props sex: ',this.sex); - console.log('props name: ',this.name); - - getAction('/mock/api/area').then((res) => { - console.log("------------") - console.log(res) - this.areaOptions = res; - }) - }, - watch: { - $route: { - immediate: true, - handler() { - console.log('============= online href $route props ============= '); - let sex = this.$route.query.sex - console.log('$route sex: ', sex); - } - } - }, - } -</script> \ No newline at end of file diff --git a/src/views/jeecg/helloworld2.vue b/src/views/jeecg/helloworld2.vue deleted file mode 100644 index 3f567ef..0000000 --- a/src/views/jeecg/helloworld2.vue +++ /dev/null @@ -1,31 +0,0 @@ -<template> - <div> - hello world! - </div> -</template> -<script> - export default { - data () { - return { - description: '琛ㄥ崟椤电敤浜庡悜鐢ㄦ埛鏀堕泦鎴栭獙璇佷俊鎭紝鍩虹琛ㄥ崟甯歌浜庢暟鎹」杈冨皯鐨勮〃鍗曞満鏅��', - value: 1, - - // form - form: this.$form.createForm(this), - - } - }, - methods: { - // handler - handleSubmit (e) { - e.preventDefault() - this.form.validateFields((err, values) => { - if (!err) { - // eslint-disable-next-line no-console - console.log('Received values of form: ', values) - } - }) - } - } - } -</script> \ No newline at end of file diff --git a/src/views/jeecg/modules/JEditableTable/DefaultTable.vue b/src/views/jeecg/modules/JEditableTable/DefaultTable.vue deleted file mode 100644 index 9035721..0000000 --- a/src/views/jeecg/modules/JEditableTable/DefaultTable.vue +++ /dev/null @@ -1,299 +0,0 @@ -<template> - - <div> - <a-button @click="handleTableCheck" type="primary">琛ㄥ崟楠岃瘉</a-button> - <span style="padding-left:8px;"></span> - <a-tooltip placement="top" title="鑾峰彇鍊硷紝蹇界暐琛ㄥ崟楠岃瘉" :autoAdjustOverflow="true"> - <a-button @click="handleTableGet" type="primary">鑾峰彇鍊�</a-button> - </a-tooltip> - <span style="padding-left:8px;"></span> - <a-tooltip placement="top" title="妯℃嫙鍔犺浇1000鏉℃暟鎹�" :autoAdjustOverflow="true"> - <a-button @click="handleTableSet" type="primary">璁剧疆鍊�</a-button> - </a-tooltip> - - - <j-editable-table - ref="editableTable" - :loading="loading" - :columns="columns" - :dataSource="dataSource" - :rowNumber="true" - :rowSelection="true" - :actionButton="true" - :dragSort="true" - style="margin-top: 8px;" - @selectRowChange="handleSelectRowChange"> - - <template v-slot:action="props"> - <a @click="handleDelete(props)">鍒犻櫎</a> - </template> - - </j-editable-table> - </div> - -</template> - -<script> - import moment from 'moment' - import { FormTypes } from '@/utils/JEditableTableUtil' - import { randomUUID, randomNumber } from '@/utils/util' - import JEditableTable from '@/components/jeecg/JEditableTable' - - export default { - name: 'DefaultTable', - components: { JEditableTable }, - data() { - return { - loading: false, - columns: [ - { - title: '瀛楁鍚嶇О', - key: 'dbFieldName', - // width: '19%', - width: '300px', - type: FormTypes.input, - defaultValue: '', - placeholder: '璇疯緭鍏�${title}', - validateRules: [ - { - required: true, // 蹇呭~ - message: '璇疯緭鍏�${title}' // 鏄剧ず鐨勬枃鏈� - }, - { - pattern: /^[a-z|A-Z][a-z|A-Z\d_-]{0,}$/, // 姝e垯 - message: '${title}蹇呴』浠ュ瓧姣嶅紑澶达紝鍙寘鍚暟瀛椼�佷笅鍒掔嚎銆佹í鏉�' - }, - { - unique: true, - message: '${title}涓嶈兘閲嶅' - }, - { - handler(type, value, row, column, callback, target) { - // type 瑙﹀彂鏍¢獙鐨勭被鍨嬶紙input銆乧hange銆乥lur锛� - // value 褰撳墠鏍¢獙鐨勫�� - // callback(flag, message) 鏂规硶蹇呴』鎵ц涓斿彧鑳芥墽琛屼竴娆� - // flag = 鏄惁閫氳繃浜嗘牎楠岋紝涓嶅~鍐欐垨鑰呭~鍐� null 浠h〃涓嶈繘琛屼换浣曟搷浣� - // message = 鎻愮ず鐨勭被鍨嬶紝榛樿浣跨敤閰嶇疆鐨� message - // target 琛岀紪杈戠殑瀹炰緥瀵硅薄 - - if (type === 'blur') { - if (value === 'abc') { - callback(false, '${title}涓嶈兘鏄痑bc') // false = 鏈�氳繃鏍¢獙 - } else { - callback(true) // true = 閫氳繃楠岃瘉 - } - } else { - callback(true) // 涓嶅~鍐欐垨鑰呭~鍐� null 浠h〃涓嶈繘琛屼换浣曟搷浣� - } - }, - message: '${title}榛樿鎻愮ず' - } - ] - }, - { - title: '鏂囦欢鍩�', - key: 'upload', - type: FormTypes.upload, - // width: '19%', - width: '300px', - placeholder: '鐐瑰嚮涓婁紶', - token: true, - responseName: 'message', - action: window._CONFIG['domianURL'] + '/sys/common/upload', - data: { - biz: 'temp', - // 鏇村鎵╁睍鍙傛暟 - }, - }, - { - title: '瀛楁绫诲瀷', - key: 'dbFieldType', - // width: '18%', - width: '300px', - type: FormTypes.select, - options: [ // 涓嬫媺閫夐」 - { title: 'String', value: 'string' }, - { title: 'Integer', value: 'int' }, - { title: 'Double', value: 'double' }, - { title: 'Boolean', value: 'boolean' } - ], - allowInput: true, - defaultValue: '', - placeholder: '璇烽�夋嫨${title}', - validateRules: [{ required: true, message: '璇烽�夋嫨${title}' }] - }, - { - title: '鎬у埆锛堝瓧鍏革級', - key: 'sex_dict', - width: '300px', - type: FormTypes.select, - options: [], - dictCode: 'sex', - placeholder: '璇烽�夋嫨${title}', - validateRules: [{ required: true, message: '璇烽�夋嫨${title}' }] - }, - { - title: '澶氶�夋祴璇�', - key: 'multipleSelect', - // width: '18%', - width: '300px', - type: FormTypes.select, - props: { 'mode': 'multiple' }, // 鏀寔澶氶�� - options: [ - { title: 'String', value: 'string' }, - { title: 'Integer', value: 'int' }, - { title: 'Double', value: 'double' }, - { title: 'Boolean', value: 'boolean' } - ], - defaultValue: ['int', 'boolean'], // 澶氫釜榛樿椤� - // defaultValue: 'string,double,int', // 涔熷彲浣跨敤杩欑鏂瑰紡 - placeholder: '杩欓噷鍙互澶氶��', - validateRules: [{ required: true, message: '璇烽�夋嫨${title}' }] - }, - { - title: '瀛楁闀垮害', - key: 'dbLength', - // width: '8%', - width: '100px', - type: FormTypes.inputNumber, - defaultValue: 32, - placeholder: '${title}', - // 鏄惁鏄粺璁″垪锛屽彧鏈� inputNumber 鎵嶈兘璁剧疆缁熻鍒� - statistics: true, - validateRules: [{ required: true, message: '璇疯緭鍏�${title}' }] - }, - { - title: '鏃ユ湡', - key: 'datetime', - // width: '22%', - width: '320px', - type: FormTypes.datetime, - defaultValue: '2019-4-30 14:52:22', - placeholder: '璇烽�夋嫨${title}', - validateRules: [{ required: true, message: '璇烽�夋嫨${title}' }] - }, - { - title: '鏁板瓧', - key: 'money', - width: '320px', - type: FormTypes.inputNumber, - defaultValue: '100.32', - placeholder: '璇烽�夋嫨${title}', - validateRules: [{ required: true, message: '璇烽�夋嫨${title}' }] - }, - { - title: '鍙互涓虹┖', - key: 'isNull', - // width: '8%', - width: '100px', - type: FormTypes.checkbox, - customValue: ['Y', 'N'], // true ,false - defaultChecked: false - }, - { - type: FormTypes.popup, - key: 'popup', - title: 'JPopup', - width: '180px', - popupCode: 'demo', - field: 'name', - orgFields: 'name', - destFields: 'name' - }, - { - title: '鎿嶄綔', - key: 'action', - // width: '8%', - width: '100px', - type: FormTypes.slot, - slotName: 'action', - } - - ], - dataSource: [], - selectedRowIds: [] - } - }, - mounted() { - this.randomData(23, false) - }, - methods: { - - /** 琛ㄥ崟楠岃瘉 */ - handleTableCheck() { - this.$refs.editableTable.getValues((error) => { - if (error === 0) { - this.$message.success('楠岃瘉閫氳繃') - } else { - this.$message.error('楠岃瘉鏈�氳繃') - } - }) - }, - /** 鑾峰彇鍊硷紝蹇界暐琛ㄥ崟楠岃瘉 */ - handleTableGet() { - this.$refs.editableTable.getValues((error, values) => { - console.log('values:', values) - }, false) - console.log('deleteIds:', this.$refs.editableTable.getDeleteIds()) - - this.$message.info('鑾峰彇鍊兼垚鍔燂紝璇风湅鎺у埗鍙拌緭鍑�') - - }, - /** 妯℃嫙鍔犺浇1000鏉℃暟鎹� */ - handleTableSet() { - this.randomData(1000, true) - }, - - handleSelectRowChange(selectedRowIds) { - this.selectedRowIds = selectedRowIds - }, - - /* 闅忔満鐢熸垚鏁版嵁 */ - randomData(size, loading = false) { - if (loading) { - this.loading = true - } - - let randomDatetime = () => { - let time = parseInt(randomNumber(1000, 9999999999999)) - return moment(new Date(time)).format('YYYY-MM-DD HH:mm:ss') - } - - let begin = Date.now() - let values = [] - for (let i = 0; i < size; i++) { - values.push({ - id: randomUUID(), - dbFieldName: `name_${i + 1}`, - // dbFieldTxt: randomString(10), - multipleSelect: ['string', ['int', 'double', 'boolean'][randomNumber(0, 2)]], - dbFieldType: ['string', 'int', 'double', 'boolean'][randomNumber(0, 3)], - dbLength: randomNumber(0, 233), - datetime: randomDatetime(), - isNull: ['Y', 'N'][randomNumber(0, 1)] - }) - } - - this.dataSource = values - let end = Date.now() - let diff = end - begin - - if (loading && diff < size) { - setTimeout(() => { - this.loading = false - }, size - diff) - } - - }, - - handleDelete(props) { - let { rowId, target } = props - target.removeRows(rowId) - } - } - } -</script> - -<style scoped> - -</style> \ No newline at end of file diff --git a/src/views/jeecg/modules/JEditableTable/ReadOnlyTable.vue b/src/views/jeecg/modules/JEditableTable/ReadOnlyTable.vue deleted file mode 100644 index 1360554..0000000 --- a/src/views/jeecg/modules/JEditableTable/ReadOnlyTable.vue +++ /dev/null @@ -1,70 +0,0 @@ -<template> - <j-editable-table - :columns="columns" - :dataSource="dataSource" - :rowNumber="true" - :rowSelection="true" - :maxHeight="400" - :disabled="true" - /> -</template> - -<script> - import { FormTypes } from '@/utils/JEditableTableUtil' - import JEditableTable from '@/components/jeecg/JEditableTable' - - export default { - name: 'ReadOnlyTable', - components: { JEditableTable }, - data() { - return { - - columns: [ - { - title: '杈撳叆妗�', - key: 'input', - type: FormTypes.input, - placeholder: '娓呰緭鍏�' - }, - { - title: '涓嬫媺妗�', - key: 'select', - type: FormTypes.select, - options: [ - { title: 'String', value: 'string' }, - { title: 'Integer', value: 'int' }, - { title: 'Double', value: 'double' }, - { title: 'Boolean', value: 'boolean' } - ], - placeholder: '璇烽�夋嫨' - }, - { - title: '澶氶�夋', - key: 'checkbox', - type: FormTypes.checkbox, - customValue: [true, false] - }, - { - title: '鏃ユ湡', - key: 'datetime', - type: FormTypes.datetime - } - ], - dataSource: [ - { input: 'hello', select: 'int', checkbox: true, datetime: '2019-6-17 14:50:48' }, - { input: 'world', select: 'string', checkbox: false, datetime: '2019-6-16 14:50:48' }, - { input: 'one', select: 'double', checkbox: true, datetime: '2019-6-17 15:50:48' }, - { input: 'two', select: 'boolean', checkbox: false, datetime: '2019-6-14 14:50:48' }, - { input: 'three', select: '', checkbox: false, datetime: '2019-6-13 14:50:48' } - ] - } - }, - mounted() { - - } - } -</script> - -<style scoped> - -</style> \ No newline at end of file diff --git a/src/views/jeecg/modules/JEditableTable/ThreeLinkage.vue b/src/views/jeecg/modules/JEditableTable/ThreeLinkage.vue deleted file mode 100644 index 3b7fbcf..0000000 --- a/src/views/jeecg/modules/JEditableTable/ThreeLinkage.vue +++ /dev/null @@ -1,129 +0,0 @@ -<template> - <j-editable-table - :columns="columns" - :dataSource="dataSource" - :rowNumber="true" - :actionButton="true" - :rowSelection="true" - :maxHeight="400" - @valueChange="handleValueChange" - /> -</template> - -<script> - import { FormTypes } from '@/utils/JEditableTableUtil' - import JEditableTable from '@/components/jeecg/JEditableTable' - - export default { - name: 'ThreeLinkage', - components: { JEditableTable }, - data() { - return { - columns: [ - { - title: '鐪�/鐩磋緰甯�/鑷不鍖�', - key: 's1', - type: FormTypes.select, - width: '240px', - options: [], - placeholder: '璇烽�夋嫨${title}' - }, - { - title: '甯�', - key: 's2', - type: FormTypes.select, - width: '240px', - options: [], - placeholder: '璇烽�夋嫨${title}' - }, - { - title: '鍘�/鍖�', - key: 's3', - type: FormTypes.select, - width: '240px', - options: [], - placeholder: '璇烽�夋嫨${title}' - } - ], - dataSource: [], - - mockData: [ - { label: '鍖椾含甯�', value: '110000', parent: null }, - { label: '澶╂触甯�', value: '120000', parent: null }, - { label: '娌冲寳鐪�', value: '130000', parent: null }, - { label: '涓婃捣甯�', value: '310000', parent: null }, - - { label: '鍖椾含甯�', value: '110100', parent: '110000' }, - { label: '澶╂触甯傚競', value: '120100', parent: '120000' }, - { label: '鐭冲搴勫競', value: '130100', parent: '130000' }, - { label: '鍞愬北甯�', value: '130200', parent: '130000' }, - { label: '绉︾殗宀涘競', value: '130300', parent: '130000' }, - { label: '涓婃捣甯�', value: '310100', parent: '310000' }, - - { label: '涓滃煄鍖�', value: '110101', parent: '110100' }, - { label: '瑗垮煄鍖�', value: '110102', parent: '110100' }, - { label: '鏈濋槼鍖�', value: '110105', parent: '110100' }, - { label: '鍜屽钩鍖�', value: '120101', parent: '120000' }, - { label: '娌充笢鍖�', value: '120102', parent: '120000' }, - { label: '娌宠タ鍖�', value: '120103', parent: '120000' }, - { label: '榛勬郸鍖�', value: '310101', parent: '310100' }, - { label: '寰愭眹鍖�', value: '310104', parent: '310100' }, - { label: '闀垮畞鍖�', value: '310105', parent: '310100' }, - { label: '闀垮畨鍖�', value: '130102', parent: '130100' }, - { label: '妗ヨタ鍖�', value: '130104', parent: '130100' }, - { label: '鏂板崕鍖�', value: '130105', parent: '130100' }, - { label: '璺崡鍖�', value: '130202', parent: '130200' }, - { label: '璺寳鍖�', value: '130203', parent: '130200' }, - { label: '鍙ゅ喍鍖�', value: '130204', parent: '130200' }, - { label: '娴锋腐鍖�', value: '130302', parent: '130300' }, - { label: '灞辨捣鍏冲尯', value: '130303', parent: '130300' }, - { label: '鍖楁埓娌冲尯', value: '130304', parent: '130300' }, - ] - } - }, - mounted() { - // 鍒濆鍖栨暟鎹� - this.columns[0].options = this.request(null) - }, - methods: { - - request(parentId) { - return this.mockData.filter(i => i.parent === parentId) - }, - - /** 褰撻�夐」琚敼鍙樻椂锛岃仈鍔ㄥ叾浠栫粍浠� */ - handleValueChange(event) { - const { type, row, column, value, target } = event - - if (type === FormTypes.select) { - - // 绗竴鍒� - if (column.key === 's1') { - // 璁剧疆绗簩鍒楃殑 options - this.columns[1].options = this.request(value) - // 娓呯┖鍚庝袱鍒楃殑鏁版嵁 - target.setValues([{ - rowKey: row.id, - values: { s2: '', s3: '' } - }]) - this.columns[2].options = [] - } else - // 绗簩鍒� - if (column.key === 's2') { - this.columns[2].options = this.request(value) - target.setValues([{ - rowKey: row.id, - values: { s3: '' } - }]) - } - } - - } - - } - } -</script> - -<style scoped> - -</style> \ No newline at end of file diff --git a/src/views/jeecg/modules/JeecgDemoModal.vue b/src/views/jeecg/modules/JeecgDemoModal.vue deleted file mode 100644 index 9b97d8f..0000000 --- a/src/views/jeecg/modules/JeecgDemoModal.vue +++ /dev/null @@ -1,141 +0,0 @@ -<template> - <a-modal - :title="title" - :width="800" - :visible="visible" - :confirmLoading="confirmLoading" - @ok="handleOk" - @cancel="handleCancel" - cancelText="鍏抽棴"> - <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-input v-model="model.name" placeholder="璇疯緭鍏ュ鍚�"/> - </a-form-model-item> - - <a-form-model-item label="鍏抽敭璇�" prop="keyWord" hasFeedback> - <a-input v-model="model.keyWord" placeholder="璇疯緭鍏ュ叧閿瘝"/> - </a-form-model-item> - - <a-form-model-item label="鎵撳崱鏃堕棿" prop="punchTime" hasFeedback> - <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> - <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-input placeholder="璇疯緭鍏ュ勾榫�" v-model="model.age"/> - </a-form-model-item> - - <a-form-model-item label="鐢熸棩" prop="age" hasFeedback> - <a-date-picker valueFormat="YYYY-MM-DD" v-model="model.birthday"/> - </a-form-model-item> - - <a-form-model-item label="閭" prop="email" hasFeedback > - <a-input placeholder="璇疯緭鍏ラ偖绠�" v-model="model.email"/> - </a-form-model-item> - - <a-form-model-item label="涓汉绠�浠�" prop="content" hasFeedback> - <a-input type="textarea" placeholder="璇疯緭鍏ヤ釜浜虹畝浠�" v-model="model.content"/> - </a-form-model-item> - - </a-form-model> - </a-spin> - </a-modal> -</template> - -<script> - import { httpAction } from '@/api/manage' - - export default { - name: "JeecgDemoModal", - data () { - return { - title:"鎿嶄綔", - visible: false, - model: {}, - layout: { - labelCol: { span: 3 }, - wrapperCol: { span: 14 }, - }, - labelCol: { - xs: { span: 24 }, - sm: { span: 3 }, - }, - wrapperCol: { - xs: { span: 24 }, - sm: { span: 16 }, - }, - confirmLoading: false, - form: this.$form.createForm(this), - validatorRules:{ - name: [ - { required: true, message: '璇疯緭鍏ュ鍚�!' }, - { min: 2, max: 30, message: '闀垮害鍦� 2 鍒� 30 涓瓧绗�', trigger: 'blur' } - ], - email: [ - { required: false, type: 'email', message: '閭鏍煎紡涓嶆纭�', trigger: 'blur' } - ] - }, - url: { - add: "/test/jeecgDemo/add", - edit: "/test/jeecgDemo/edit", - }, - } - }, - created () { - }, - methods: { - add () { - this.edit({}); - }, - edit (record) { - this.model = Object.assign({}, record); - this.visible = true; - }, - close () { - this.$refs.form.resetFields(); - this.$emit('close'); - this.visible = false; - }, - handleOk () { - const that = this; - // 瑙﹀彂琛ㄥ崟楠岃瘉 - this.$refs.form.validate(valid => { - if (valid) { - that.confirmLoading = true; - let httpurl = ''; - let method = ''; - if(!this.model.id){ - httpurl+=this.url.add; - method = 'post'; - }else{ - httpurl+=this.url.edit; - method = 'put'; - } - httpAction(httpurl,this.model,method).then((res)=>{ - if(res.success){ - that.$message.success(res.message); - that.$emit('ok'); - }else{ - that.$message.warning(res.message); - } - }).finally(() => { - that.confirmLoading = false; - that.close(); - }) - } - }) - }, - handleCancel () { - this.close() - } - } - } -</script> - -<style scoped> - -</style> \ No newline at end of file diff --git a/src/views/jeecg/modules/JeecgDemoTabsModal.vue b/src/views/jeecg/modules/JeecgDemoTabsModal.vue deleted file mode 100644 index c3e09f5..0000000 --- a/src/views/jeecg/modules/JeecgDemoTabsModal.vue +++ /dev/null @@ -1,285 +0,0 @@ -<template> - <a-modal - :title="title" - :width="1200" - :visible="visible" - :confirmLoading="confirmLoading" - @ok="handleOk" - @cancel="handleCancel" - cancelText="鍏抽棴"> - - <a-spin :spinning="confirmLoading"> - <a-form :form="form"> - - <a-card class="card" :bordered="false"> - <a-row class="form-row" :gutter="16"> - <a-col :lg="8"> - <a-form-item label="浠诲姟鍚�"> - <a-input placeholder="璇疯緭鍏ヤ换鍔″悕绉�" v-decorator="[ 'task.name', {rules: [{ required: true, message: '璇疯緭鍏ヤ换鍔″悕绉�', whitespace: true}]} ]"/> - </a-form-item> - </a-col> - <a-col :lg="8"> - <a-form-item label="浠诲姟鎻忚堪"> - <a-input placeholder="璇疯緭鍏ヤ换鍔℃弿杩�" v-decorator="['task.description', {rules: [{ required: true, message: '璇疯緭鍏ヤ换鍔℃弿杩�', whitespace: true}]} ]"/> - </a-form-item> - </a-col> - <a-col :lg="8"> - <a-form-item label="鎵ц浜�"> - <a-select placeholder="璇烽�夋嫨鎵ц浜�" v-decorator="['task.executor',{rules: [{ required: true, message: '璇烽�夋嫨鎵ц浜�'}]} ]"> - <a-select-option value="榛勪附涓�">榛勪附涓�</a-select-option> - <a-select-option value="鏉庡ぇ鍒�">鏉庡ぇ鍒�</a-select-option> - </a-select> - </a-form-item> - </a-col> - </a-row> - <a-row class="form-row" :gutter="16"> - <a-col :lg="8"> - <a-form-item label="璐d换浜�"> - <a-select placeholder="璇烽�夋嫨璐d换浜�" v-decorator="['task.manager', {rules: [{ required: true, message: '璇烽�夋嫨璐d换浜�'}]} ]"> - <a-select-option value="鐜嬩紵">鐜嬩紵</a-select-option> - <a-select-option value="鏉庣孩鍐�">鏉庣孩鍐�</a-select-option> - </a-select> - </a-form-item> - </a-col> - <a-col :lg="8"> - <a-form-item label="鎻愰啋鏃堕棿"> - <a-time-picker style="width: 100%" v-decorator="['task.time', {rules: [{ required: true, message: '璇烽�夋嫨鎻愰啋鏃堕棿'}]} ]"/> - </a-form-item> - </a-col> - <a-col :lg="8"> - <a-form-item - label="浠诲姟绫诲瀷"> - <a-select placeholder="璇烽�夋嫨浠诲姟绫诲瀷" v-decorator="['task.type', {rules: [{ required: true, message: '璇烽�夋嫨浠诲姟绫诲瀷'}]} ]"> - <a-select-option value="瀹氭椂鎵ц">瀹氭椂鎵ц</a-select-option> - <a-select-option value="鍛ㄦ湡鎵ц">鍛ㄦ湡鎵ц</a-select-option> - </a-select> - </a-form-item> - </a-col> - </a-row> - </a-card> - - <a-tabs defaultActiveKey="1" > - <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' }"> - <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 v-if="record.editable"> - <span v-if="record.isNew"> - <a @click="saveRow(record.key)">娣诲姞</a> - <a-divider type="vertical"/> - <a-popconfirm title="鏄惁瑕佸垹闄ゆ琛岋紵" @confirm="removeRow(record.key)"><a>鍒犻櫎</a></a-popconfirm> - </span> - <span v-else> - <a @click="saveRow(record.key)">淇濆瓨</a> - <a-divider type="vertical"/> - <a @click="cancelEditRow(record.key)">鍙栨秷</a> - </span> - </template> - <span v-else> - <a @click="editRow(record.key)">缂栬緫</a> - <a-divider type="vertical"/> - <a-popconfirm title="鏄惁瑕佸垹闄ゆ琛岋紵" @confirm="removeRow(record.key)"><a>鍒犻櫎</a></a-popconfirm> - </span> - </template> - </a-table> - - <a-button style="width: 100%; margin-top: 16px; margin-bottom: 8px" type="dashed" icon="plus" @click="newRow">鏂板鎴愬憳</a-button> - </a-tab-pane> - <a-tab-pane tab="Tab 2" key="2" forceRender> - Content of Tab Pane 2 - </a-tab-pane> - <a-tab-pane tab="Tab 3" key="3">Content of Tab Pane 3</a-tab-pane> - </a-tabs> - - </a-form> - </a-spin> - </a-modal> -</template> - -<script> - import {httpAction} from '@/api/manage' - import pick from 'lodash.pick' - import moment from "moment" - - export default { - name: "JeecgDemoTabsModal", - data() { - return { - title: "鎿嶄綔", - visible: false, - model: {}, - // table - columns: [ - { - title: '鎴愬憳濮撳悕', - dataIndex: 'name', - key: 'name', - width: '20%', - scopedSlots: {customRender: 'name'} - }, - { - title: '宸ュ彿', - dataIndex: 'workId', - key: 'workId', - width: '20%', - scopedSlots: {customRender: 'workId'} - }, - { - title: '鎵�灞為儴闂�', - dataIndex: 'department', - key: 'department', - width: '40%', - scopedSlots: {customRender: 'department'} - }, - { - title: '鎿嶄綔', - key: 'action', - scopedSlots: {customRender: 'operation'} - } - ], - data: [ - { - key: '1', - name: '灏忔槑', - workId: '001', - editable: false, - department: '琛屾斂閮�' - }, - { - key: '2', - name: '鏉庤帀', - workId: '002', - editable: false, - department: 'IT閮�' - }, - { - key: '3', - name: '鐜嬪皬甯�', - workId: '003', - editable: false, - department: '璐㈠姟閮�' - } - ], - - confirmLoading: false, - form: this.$form.createForm(this), - validatorRules: {}, - url: { - add: "/test/jeecgDemo/add", - edit: "/test/jeecgDemo/edit", - }, - } - }, - created() { - }, - methods: { - add() { - this.edit({}); - }, - edit(record) { - this.form.resetFields(); - this.model = Object.assign({}, record); - this.visible = true; - this.$nextTick(() => { - this.form.setFieldsValue(pick(this.model, 'name', 'keyWord', 'sex', 'age', 'email', 'content')) - //鏃堕棿鏍煎紡鍖� - this.form.setFieldsValue({punchTime: this.model.punchTime ? moment(this.model.punchTime, 'YYYY-MM-DD HH:mm:ss') : null}) - this.form.setFieldsValue({birthday: this.model.birthday ? moment(this.model.birthday) : null}) - }); - - }, - close() { - this.$emit('close'); - this.visible = false; - }, - handleOk() { - const that = this; - // 瑙﹀彂琛ㄥ崟楠岃瘉 - this.form.validateFields((err, values) => { - if (!err) { - that.confirmLoading = true; - let httpurl = ''; - let method = ''; - if (!this.model.id) { - httpurl += this.url.add; - method = 'post'; - } else { - httpurl += this.url.edit; - method = 'put'; - } - let formData = Object.assign(this.model, values); - //鏃堕棿鏍煎紡鍖� - formData.punchTime = formData.punchTime ? formData.punchTime.format('YYYY-MM-DD HH:mm:ss') : null; - formData.birthday = formData.birthday ? formData.birthday.format() : null; - - console.log(formData) - httpAction(httpurl, formData, method).then((res) => { - if (res.success) { - that.$message.success(res.message); - that.$emit('ok'); - } else { - that.$message.warning(res.message); - } - }).finally(() => { - that.confirmLoading = false; - that.close(); - }) - } - }) - }, - handleCancel() { - this.close() - }, - newRow () { - // 閫氳繃鏃堕棿鎴崇敓鎴� UUID - let uuid = Math.round(new Date().getTime()).toString(); - console.log('uuid: '+ uuid) - this.data.push({ - key: uuid, - name: '', - workId: '', - department: '', - editable: true, - isNew: true - }) - }, - removeRow (key) { - const newData = this.data.filter(item => item.key !== key) - this.data = newData - }, - saveRow (key) { - let target = this.data.filter(item => item.key === key)[0] - target.editable = false - target.isNew = false - }, - handlerRowChange (value, key, column) { - const newData = [...this.data] - const target = newData.filter(item => key === item.key)[0] - if (target) { - target[column] = value - this.data = newData - } - }, - editRow (key) { - let target = this.data.filter(item => item.key === key)[0] - target.editable = !target.editable - }, - cancelEditRow (key) { - let target = this.data.filter(item => item.key === key)[0] - target.editable = false - }, - } - } -</script> - -<style scoped> - .ant-modal-body { - padding: 8px!important; - } -</style> \ No newline at end of file diff --git a/src/views/jeecg/modules/JeecgOrderMainModal.vue b/src/views/jeecg/modules/JeecgOrderMainModal.vue deleted file mode 100644 index ae77184..0000000 --- a/src/views/jeecg/modules/JeecgOrderMainModal.vue +++ /dev/null @@ -1,289 +0,0 @@ -<template> - <a-modal - :title="title" - :width="1200" - :visible="visible" - :confirmLoading="confirmLoading" - @ok="handleOk" - @cancel="handleCancel"> - - <a-spin :spinning="confirmLoading"> - <a-form-model ref="form" :label-col="labelCol" :wrapper-col="wrapperCol" :model="orderMainModel" :rules="validatorRules"> - <!-- 涓昏〃鍗曞尯鍩� --> - <a-row class="form-row" :gutter="16"> - <a-col :lg="8"> - <a-form-model-item label="璁㈠崟鍙�" required prop="orderCode"> - <a-input v-model="orderMainModel.orderCode" placeholder="璇疯緭鍏ヨ鍗曞彿"/> - </a-form-model-item> - </a-col> - <a-col :lg="8"> - <a-form-model-item label="璁㈠崟绫诲瀷" prop="ctype"> - <a-select placeholder="璇烽�夋嫨璁㈠崟绫诲瀷" v-model="orderMainModel.ctype" > - <a-select-option value="1">鍥藉唴璁㈠崟</a-select-option> - <a-select-option value="2">鍥介檯璁㈠崟</a-select-option> - </a-select> - </a-form-model-item> - </a-col> - <a-col :lg="8"> - <a-form-model-item label="璁㈠崟鏃ユ湡" prop="orderDate"> - <a-date-picker showTime valueFormat="YYYY-MM-DD HH:mm:ss" v-model="orderMainModel.orderDate"/> - </a-form-model-item> - </a-col> - </a-row> - <a-row class="form-row" :gutter="16"> - <a-col :lg="8"> - <a-form-model-item label="璁㈠崟閲戦" prop="orderMoney"> - <a-input-number style="width: 200px" v-model="orderMainModel.orderMoney"/> - </a-form-model-item> - </a-col> - <a-col :lg="8"> - <a-form-model-item label="璁㈠崟澶囨敞" prop="content"> - <a-input placeholder="璇疯緭鍏ヨ鍗曞娉�" v-model="orderMainModel.content" /> - </a-form-model-item> - </a-col> - </a-row> - - <!-- 瀛愯〃鍗曞尯鍩� --> - <a-tabs defaultActiveKey="1" > - <a-tab-pane tab="瀹㈡埛淇℃伅" key="1"> - <div> - <a-row type="flex" style="margin-bottom:10px" :gutter="16"> - <a-col :span="5">瀹㈡埛鍚�</a-col> - <a-col :span="5">鎬у埆</a-col> - <a-col :span="6">韬唤璇佸彿鐮�</a-col> - <a-col :span="6">鎵嬫満鍙�</a-col> - <a-col :span="2">鎿嶄綔</a-col> - </a-row> - - <a-row type="flex" style="margin-bottom:10px" :gutter="16" v-for="(item, index) in orderMainModel.jeecgOrderCustomerList" :key="index"> - <a-col :span="6" style="display: none"> - <a-form-model-item> - <a-input placeholder="id" v-model="item.id" /> - </a-form-model-item> - </a-col> - <a-col :span="5"> - <a-form-model-item> - <a-input placeholder="瀹㈡埛鍚�" v-model="item.name" /> - </a-form-model-item> - </a-col> - <a-col :span="5"> - <a-form-model-item> - <a-select placeholder="鎬у埆" v-model="item.sex" > - <a-select-option value="1">鐢�</a-select-option> - <a-select-option value="2">濂�</a-select-option> - </a-select> - </a-form-model-item> - </a-col> - <a-col :span="6"> - <a-form-model-item :prop="'jeecgOrderCustomerList.' + index + '.idcard'" :rules="[{required: true,message: '璇疯緭鍏ヨ韩浠借瘉鍙�',trigger: 'blur'},{ pattern: rules.IDCard, message: '韬唤璇佸彿鏍煎紡涓嶅!' }]"> - <a-input placeholder="韬唤璇佸彿" v-model="item.idcard" /> - </a-form-model-item> - </a-col> - <a-col :span="6"> - <a-form-model-item :prop="'jeecgOrderCustomerList.' + index + '.telphone'" :rules="rules.mobile"> - <a-input placeholder="鎵嬫満鍙�" v-model="item.telphone"/> - </a-form-model-item> - </a-col> - <a-col :span="2"> - <a-form-model-item> - <a-icon type="minus-circle" @click="delRowCustom(index)" style="fontSize :20px"/> - </a-form-model-item> - </a-col> - </a-row> - <a-button type="dashed" style="width: 98%;margin-top: 10px" @click="addRowCustom"> - <a-icon type="plus" /> 娣诲姞瀹㈡埛淇℃伅 - </a-button> - </div> - </a-tab-pane> - - <a-tab-pane tab="鏈虹エ淇℃伅" key="2" forceRender> - <div> - <a-row type="flex" style="margin-bottom:10px" :gutter="16"> - <a-col :span="6">鑸彮鍙�</a-col> - <a-col :span="6">鑸彮鏃堕棿</a-col> - <a-col :span="6">鎿嶄綔</a-col> - </a-row> - <a-row type="flex" style="margin-bottom:10px" :gutter="16" v-for="(item, index) in orderMainModel.jeecgOrderTicketList" :key="index"> - <a-col :span="6" style="display: none"> - <a-form-model-item> - <a-input placeholder="id" v-model="item.id" /> - </a-form-model-item> - </a-col> - <a-col :span="6"> - <a-form-model-item :prop="'jeecgOrderTicketList.' + index + '.ticketCode'" :rules="{required: true,message: '璇疯緭鍏ヨ埅鐝彿',trigger: 'blur'}"> - <a-input placeholder="鑸彮鍙�" v-model="item.ticketCode"/> - </a-form-model-item> - </a-col> - <a-col :span="6"> - <a-form-model-item> - <a-date-picker placeholder="鑸彮鏃堕棿" valueFormat="YYYY-MM-DD" v-model="item.tickectDate" /> - </a-form-model-item> - </a-col> - <a-col :span="6"> - <a-form-model-item> - <a-icon type="minus-circle" @click="delRowTicket(index)" style="fontSize :20px"/> - </a-form-model-item> - </a-col> - </a-row> - <a-button type="dashed" style="width: 98%;margin-top: 10px" @click="addRowTicket"> - <a-icon type="plus" /> 娣诲姞鏈虹エ淇℃伅 - </a-button> - </div> - </a-tab-pane> - </a-tabs> - - </a-form-model> - </a-spin> - </a-modal> -</template> - -<script> - import { httpAction,getAction } from '@/api/manage' - import JDate from '@/components/jeecg/JDate' - export default { - name: "JeecgOrderMainModal", - components: { - JDate - }, - data () { - return { - title:"鎿嶄綔", - visible: false, - orderMainModel: { - jeecgOrderCustomerList: [{}], - jeecgOrderTicketList: [{}] - }, - labelCol: { - xs: { span: 24 }, - sm: { span: 5 }, - }, - wrapperCol: { - xs: { span: 24 }, - sm: { span: 16 }, - }, - confirmLoading: false, - validatorRules:{ - orderCode: [ - { required: true, message: '璁㈠崟鍙蜂笉鑳戒负绌�', trigger: 'blur' } - ] - }, - url: { - add: "/test/jeecgOrderMain/add", - edit: "/test/jeecgOrderMain/edit", - orderCustomerList: "/test/jeecgOrderMain/queryOrderCustomerListByMainId", - orderTicketList: "/test/jeecgOrderMain/queryOrderTicketListByMainId", - }, - } - }, - created () { - }, - methods: { - add () { - this.edit({}); - }, - edit (record) { - this.orderMainModel = Object.assign({ - jeecgOrderCustomerList: [{}], - jeecgOrderTicketList: [{}] - }, record); - //-------------------------------------------------------- - //鍒濆鍖栨槑缁嗚〃鏁版嵁 - console.log(this.orderMainModel.id) - if(this.orderMainModel.id){ - let params = {id:this.orderMainModel.id} - //鍒濆鍖栬鍗曟満绁ㄥ垪琛� - getAction(this.url.orderCustomerList,params).then((res)=>{ - if(res.success){ - this.orderMainModel.jeecgOrderCustomerList = res.result; - this.$forceUpdate() - } - }) - //鍒濆鍖栬鍗曞鎴峰垪琛� - getAction(this.url.orderTicketList,params).then((res)=>{ - if(res.success){ - this.orderMainModel.jeecgOrderTicketList = res.result; - this.$forceUpdate() - } - }) - } - this.visible = true; - }, - 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 = ''; - if(!this.orderMainModel.id){ - httpurl+=this.url.add; - method = 'post'; - }else{ - httpurl+=this.url.edit; - method = 'put'; - } - httpAction(httpurl,this.orderMainModel,method).then((res)=>{ - if(res.success){ - that.$message.success(res.message); - that.$emit('ok'); - }else{ - that.$message.warning(res.message); - } - }).finally(() => { - that.confirmLoading = false; - that.close(); - }) - - } - }) - }, - handleCancel () { - this.close() - }, - addRowCustom () { - this.orderMainModel.jeecgOrderCustomerList.push({}); - this.$forceUpdate(); - }, - delRowCustom (index) { - console.log(index) - this.orderMainModel.jeecgOrderCustomerList.splice(index,1); - this.$forceUpdate(); - }, - addRowTicket () { - this.orderMainModel.jeecgOrderTicketList.push({}); - console.log(this.orderMainModel.jeecgOrderTicketList) - this.$forceUpdate(); - }, - delRowTicket (index) { - console.log(index) - this.orderMainModel.jeecgOrderTicketList.splice(index,1); - this.$forceUpdate(); - }, - - - } - } -</script> - -<style scoped> - .ant-btn { - padding: 0 10px; - margin-left: 3px; - } - .ant-form-item-control { - line-height: 0px; - } - /** 涓昏〃鍗曡闂磋窛 */ - .ant-form .ant-form-item { - margin-bottom: 10px; - } - /** Tab椤甸潰琛岄棿璺� */ - .ant-tabs-content .ant-form-item { - margin-bottom: 0px; - } -</style> diff --git a/src/views/jeecg/modules/JeecgOrderModalForJEditableTable.vue b/src/views/jeecg/modules/JeecgOrderModalForJEditableTable.vue deleted file mode 100644 index 941095e..0000000 --- a/src/views/jeecg/modules/JeecgOrderModalForJEditableTable.vue +++ /dev/null @@ -1,311 +0,0 @@ -<template> - <a-modal - :title="title" - :width="1200" - :visible="visible" - :maskClosable="false" - :confirmLoading="confirmLoading" - @ok="handleOk" - @cancel="handleCancel"> - - <a-spin :spinning="confirmLoading"> - <a-form-model ref="form" :label-col="labelCol" :wrapper-col="wrapperCol" :model="model" > - <!-- 涓昏〃鍗曞尯鍩� --> - <a-row class="form-row" :gutter="0"> - <a-col :lg="8"> - <a-form-model-item label="璁㈠崟鍙�" prop="orderCode" :rules="[{ required: true, message: '璇疯緭鍏ヨ鍗曞彿!' }]"> - <a-input placeholder="璇疯緭鍏ヨ鍗曞彿" v-model="model.orderCode"/> - </a-form-model-item> - </a-col> - <a-col :lg="8"> - <a-form-model-item label="璁㈠崟绫诲瀷"> - <a-select placeholder="璇烽�夋嫨璁㈠崟绫诲瀷" v-model="model.ctype"> - <a-select-option value="1">鍥藉唴璁㈠崟</a-select-option> - <a-select-option value="2">鍥介檯璁㈠崟</a-select-option> - </a-select> - </a-form-model-item> - </a-col> - <a-col :lg="8"> - <a-form-model-item label="璁㈠崟鏃ユ湡"> - <a-date-picker showTime valueFormat="YYYY-MM-DD HH:mm:ss" style="width: 100%" v-model="model.orderDate"/> - </a-form-model-item> - </a-col> - </a-row> - <a-row class="form-row" :gutter="0"> - <a-col :lg="8"> - <a-form-model-item label="璁㈠崟閲戦"> - <a-input-number placeholder="璇疯緭鍏ヨ鍗曢噾棰�" style="width: 100%" v-model="model.orderMoney"/> - </a-form-model-item> - </a-col> - <a-col :lg="8"> - <a-form-model-item label="璁㈠崟澶囨敞"> - <a-input placeholder="璇疯緭鍏ヨ鍗曞娉�" v-model="model.content"/> - </a-form-model-item> - </a-col> - </a-row> - </a-form-model> - - <!-- 瀛愯〃鍗曞尯鍩� --> - <a-tabs v-model="activeKey" @change="handleChangeTabs"> - <a-tab-pane tab="瀹㈡埛淇℃伅" key="1" :forceRender="true"> - - <j-editable-table - ref="editableTable1" - :loading="table1.loading" - :columns="table1.columns" - :dataSource="table1.dataSource" - :maxHeight="300" - :rowNumber="true" - :rowSelection="true" - :actionButton="true"/> - - </a-tab-pane> - - <a-tab-pane tab="鏈虹エ淇℃伅" key="2" :forceRender="true"> - - <j-editable-table - ref="editableTable2" - :loading="table2.loading" - :columns="table2.columns" - :dataSource="table2.dataSource" - :maxHeight="300" - :rowNumber="true" - :rowSelection="true" - :actionButton="true"/> - - </a-tab-pane> - </a-tabs> - - </a-spin> - </a-modal> -</template> - -<script> - - import JEditableTable from '@/components/jeecg/JEditableTable' - import { FormTypes, VALIDATE_NO_PASSED, getRefPromise, validateFormModelAndTables } from '@/utils/JEditableTableUtil' - import { httpAction, getAction } from '@/api/manage' - import JDate from '@/components/jeecg/JDate' - - export default { - name: 'JeecgOrderModalForJEditableTable', - components: { - JDate, JEditableTable - }, - data() { - return { - title: '鎿嶄綔', - visible: false, - confirmLoading: false, - model: {}, - labelCol: { - xs: { span: 24 }, - sm: { span: 6 } - }, - wrapperCol: { - xs: { span: 24 }, - sm: { span: 24 - 6 } - }, - activeKey: '1', - // 瀹㈡埛淇℃伅 - table1: { - loading: false, - dataSource: [], - columns: [ - { - title: '瀹㈡埛鍚�', - key: 'name', - width: '24%', - type: FormTypes.input, - defaultValue: '', - placeholder: '璇疯緭鍏�${title}', - validateRules: [{ required: true, message: '${title}涓嶈兘涓虹┖' }] - }, - { - title: '鎬у埆', - key: 'sex', - width: '18%', - type: FormTypes.select, - options: [ // 涓嬫媺閫夐」 - { title: '鐢�', value: '1' }, - { title: '濂�', value: '2' } - ], - defaultValue: '', - placeholder: '璇烽�夋嫨${title}' - }, - { - title: '韬唤璇佸彿', - key: 'idcard', - width: '24%', - type: FormTypes.input, - defaultValue: '', - placeholder: '璇疯緭鍏�${title}', - validateRules: [{ - pattern: '^\\d{6}(18|19|20)?\\d{2}(0[1-9]|1[012])(0[1-9]|[12]\\d|3[01])\\d{3}(\\d|[xX])$', - message: '${title}鏍煎紡涓嶆纭�' - }] - }, - { - title: '鎵嬫満鍙�', - key: 'telphone', - width: '24%', - type: FormTypes.input, - defaultValue: '', - placeholder: '璇疯緭鍏�${title}', - validateRules: [{ - pattern: '^1(3|4|5|7|8)\\d{9}$', - message: '${title}鏍煎紡涓嶆纭�' - }] - } - ] - }, - // 鏈虹エ淇℃伅 - table2: { - loading: false, - dataSource: [], - columns: [ - { - title: '鑸彮鍙�', - key: 'ticketCode', - width: '40%', - type: FormTypes.input, - defaultValue: '', - placeholder: '璇疯緭鍏�${title}', - validateRules: [{ required: true, message: '${title}涓嶈兘涓虹┖' }] - }, - { - title: '鑸彮鏃堕棿', - key: 'tickectDate', - width: '30%', - type: FormTypes.date, - placeholder: '璇烽�夋嫨${title}', - defaultValue: '' - } - ] - }, - url: { - add: '/test/jeecgOrderMain/add', - edit: '/test/jeecgOrderMain/edit', - orderCustomerList: '/test/jeecgOrderMain/queryOrderCustomerListByMainId', - orderTicketList: '/test/jeecgOrderMain/queryOrderTicketListByMainId' - } - } - }, - created() { - }, - methods: { - - // 鑾峰彇鎵�鏈夌殑editableTable瀹炰緥 - getAllTable() { - return Promise.all([ - getRefPromise(this, 'editableTable1'), - getRefPromise(this, 'editableTable2') - ]) - }, - - add() { - // 榛樿鏂板涓�鏉℃暟鎹� - this.getAllTable().then(editableTables => { - editableTables[0].add() - editableTables[1].add() - }) - - this.edit({}) - }, - edit(record) { - this.visible = true - this.activeKey = '1' - this.model = Object.assign({}, record) - // 鍔犺浇瀛愯〃鏁版嵁 - if (this.model.id) { - let params = { id: this.model.id } - this.requestTableData(this.url.orderCustomerList, params, this.table1) - this.requestTableData(this.url.orderTicketList, params, this.table2) - } - - }, - close() { - this.visible = false - this.getAllTable().then(editableTables => { - editableTables[0].initialize() - editableTables[1].initialize() - }) - this.$emit('close') - this.$refs.form.resetFields(); - }, - /** 鏌ヨ鏌愪釜tab鐨勬暟鎹� */ - requestTableData(url, params, tab) { - tab.loading = true - getAction(url, params).then(res => { - tab.dataSource = res.result || [] - }).finally(() => { - tab.loading = false - }) - }, - handleOk() { - this.validateFields() - }, - handleCancel() { - this.close() - }, - /** ATab 閫夐」鍗″垏鎹簨浠� */ - handleChangeTabs(key) { - getRefPromise(this, `editableTable${key}`).then(editableTable => { - editableTable.resetScrollTop() - }) - }, - - /** 瑙﹀彂琛ㄥ崟楠岃瘉 */ - validateFields() { - this.getAllTable().then(tables => { - /** 涓�娆℃�ч獙璇佷富琛ㄥ拰鎵�鏈夌殑娆¤〃 */ - return validateFormModelAndTables(this.$refs.form,this.model, tables) - }).then(allValues => { - let formData = this.classifyIntoFormData(allValues) - // 鍙戣捣璇锋眰 - return this.requestAddOrEdit(formData) - }).catch(e => { - if (e.error === VALIDATE_NO_PASSED) { - // 濡傛灉鏈夋湭閫氳繃琛ㄥ崟楠岃瘉鐨勫瓙琛紝灏辫嚜鍔ㄨ烦杞埌瀹冩墍鍦ㄧ殑tab - this.activeKey = e.index == null ? this.activeKey : (e.index + 1).toString() - } else { - console.error(e) - } - }) - }, - /** 鏁寸悊鎴恌ormData */ - classifyIntoFormData(allValues) { - let orderMain = Object.assign(this.model, allValues.formValue) - return { - ...orderMain, // 灞曞紑 - jeecgOrderCustomerList: allValues.tablesValue[0].values, - jeecgOrderTicketList: allValues.tablesValue[1].values - } - }, - /** 鍙戣捣鏂板鎴栦慨鏀圭殑璇锋眰 */ - requestAddOrEdit(formData) { - let url = this.url.add, method = 'post' - if (this.model.id) { - url = this.url.edit - method = 'put' - } - this.confirmLoading = true - httpAction(url, formData, method).then((res) => { - if (res.success) { - this.$message.success(res.message) - this.$emit('ok') - this.close() - } else { - this.$message.warning(res.message) - } - }).finally(() => { - this.confirmLoading = false - }) - } - - } - } -</script> - -<style scoped> -</style> \ No newline at end of file diff --git a/src/views/jeecg/modules/JeecgOrderModalForJVexTable.vue b/src/views/jeecg/modules/JeecgOrderModalForJVexTable.vue deleted file mode 100644 index 1fdf714..0000000 --- a/src/views/jeecg/modules/JeecgOrderModalForJVexTable.vue +++ /dev/null @@ -1,312 +0,0 @@ -<template> - <a-modal - :title="title" - :width="1200" - :visible="visible" - :destroyOnClose="true" - :maskClosable="false" - :confirmLoading="confirmLoading" - @ok="handleOk" - @cancel="handleCancel"> - - <a-spin :spinning="confirmLoading"> - <a-form-model ref="form" :label-col="labelCol" :wrapper-col="wrapperCol" :model="model" > - <!-- 涓昏〃鍗曞尯鍩� --> - <a-row class="form-row" :gutter="0"> - <a-col :lg="8"> - <a-form-model-item label="璁㈠崟鍙�" prop="orderCode" :rules="[{ required: true, message: '璇疯緭鍏ヨ鍗曞彿!' }]"> - <a-input placeholder="璇疯緭鍏ヨ鍗曞彿" v-model="model.orderCode"/> - </a-form-model-item> - </a-col> - <a-col :lg="8"> - <a-form-model-item label="璁㈠崟绫诲瀷"> - <a-select placeholder="璇烽�夋嫨璁㈠崟绫诲瀷" v-model="model.ctype"> - <a-select-option value="1">鍥藉唴璁㈠崟</a-select-option> - <a-select-option value="2">鍥介檯璁㈠崟</a-select-option> - </a-select> - </a-form-model-item> - </a-col> - <a-col :lg="8"> - <a-form-model-item label="璁㈠崟鏃ユ湡"> - <a-date-picker showTime valueFormat="YYYY-MM-DD HH:mm:ss" style="width: 100%" v-model="model.orderDate"/> - </a-form-model-item> - </a-col> - </a-row> - <a-row class="form-row" :gutter="0"> - <a-col :lg="8"> - <a-form-model-item label="璁㈠崟閲戦"> - <a-input-number placeholder="璇疯緭鍏ヨ鍗曢噾棰�" style="width: 100%" v-model="model.orderMoney"/> - </a-form-model-item> - </a-col> - <a-col :lg="8"> - <a-form-model-item label="璁㈠崟澶囨敞"> - <a-input placeholder="璇疯緭鍏ヨ鍗曞娉�" v-model="model.content"/> - </a-form-model-item> - </a-col> - </a-row> - </a-form-model> - - <!-- 瀛愯〃鍗曞尯鍩� --> - <a-tabs v-model="activeKey" @change="handleChangeTabs"> - <a-tab-pane tab="瀹㈡埛淇℃伅" key="1" :forceRender="true"> - <j-vxe-table - ref="editableTable1" - toolbar - row-number - row-selection - keep-source - :height="300" - :loading="table1.loading" - :dataSource="table1.dataSource" - :columns="table1.columns" - style="margin-top: 8px;"/> - - </a-tab-pane> - - <a-tab-pane tab="鏈虹エ淇℃伅" key="2" :forceRender="true"> - <j-vxe-table - ref="editableTable2" - toolbar - row-number - row-selection - keep-source - :height="300" - :loading="table2.loading" - :dataSource="table2.dataSource" - :columns="table2.columns" - style="margin-top: 8px;"/> - </a-tab-pane> - </a-tabs> - - </a-spin> - </a-modal> -</template> - -<script> - - import JEditableTable from '@/components/jeecg/JEditableTable' - import { VALIDATE_FAILED, getRefPromise, validateFormModelAndTables } from '@/components/jeecg/JVxeTable/utils/vxeUtils' - import { httpAction, getAction } from '@/api/manage' - import { JVXETypes } from '@/components/jeecg/JVxeTable' - import JDate from '@/components/jeecg/JDate' - - export default { - name: 'JeecgOrderModalForJvexTable', - components: { - JDate, JEditableTable - }, - data() { - return { - title: '鎿嶄綔', - visible: false, - confirmLoading: false, - model: {}, - labelCol: { - xs: { span: 24 }, - sm: { span: 6 } - }, - wrapperCol: { - xs: { span: 24 }, - sm: { span: 24 - 6 } - }, - activeKey: '1', - // 瀹㈡埛淇℃伅 - table1: { - loading: false, - dataSource: [], - columns: [ - { - title: '瀹㈡埛鍚�', - key: 'name', - width: '24%', - type: JVXETypes.input, - defaultValue: '', - placeholder: '璇疯緭鍏�${title}', - validateRules: [{ required: true, message: '${title}涓嶈兘涓虹┖' }] - }, - { - title: '鎬у埆', - key: 'sex', - width: '18%', - type: JVXETypes.select, - options: [ // 涓嬫媺閫夐」 - { title: '鐢�', value: '1' }, - { title: '濂�', value: '2' } - ], - defaultValue: '', - placeholder: '璇烽�夋嫨${title}' - }, - { - title: '韬唤璇佸彿', - key: 'idcard', - width: '24%', - type: JVXETypes.input, - defaultValue: '', - placeholder: '璇疯緭鍏�${title}', - validateRules: [{ - pattern: '^\\d{6}(18|19|20)?\\d{2}(0[1-9]|1[012])(0[1-9]|[12]\\d|3[01])\\d{3}(\\d|[xX])$', - message: '${title}鏍煎紡涓嶆纭�' - }] - }, - { - title: '鎵嬫満鍙�', - key: 'telphone', - width: '24%', - type: JVXETypes.input, - defaultValue: '', - placeholder: '璇疯緭鍏�${title}', - validateRules: [{ - pattern: '^1(3|4|5|7|8)\\d{9}$', - message: '${title}鏍煎紡涓嶆纭�' - }] - } - ] - }, - // 鏈虹エ淇℃伅 - table2: { - loading: false, - dataSource: [], - columns: [ - { - title: '鑸彮鍙�', - key: 'ticketCode', - width: '40%', - type: JVXETypes.input, - defaultValue: '', - placeholder: '璇疯緭鍏�${title}', - validateRules: [{ required: true, message: '${title}涓嶈兘涓虹┖' }] - }, - { - title: '鑸彮鏃堕棿', - key: 'tickectDate', - width: '30%', - type: JVXETypes.date, - placeholder: '璇烽�夋嫨${title}', - defaultValue: '' - } - ] - }, - url: { - add: '/test/jeecgOrderMain/add', - edit: '/test/jeecgOrderMain/edit', - orderCustomerList: '/test/jeecgOrderMain/queryOrderCustomerListByMainId', - orderTicketList: '/test/jeecgOrderMain/queryOrderTicketListByMainId' - } - } - }, - created() { - }, - methods: { - - // 鑾峰彇鎵�鏈夌殑editableTable瀹炰緥 - getAllTable() { - return Promise.all([ - getRefPromise(this, 'editableTable1'), - getRefPromise(this, 'editableTable2') - ]) - }, - - add() { - // 榛樿鏂板涓�鏉℃暟鎹� - this.getAllTable().then(editableTables => { - //editableTables[0].add() - //editableTables[1].add() - }) - this.edit({}) - }, - edit(record) { - this.visible = true - this.activeKey = '1' - this.model = Object.assign({}, record) - // 鍔犺浇瀛愯〃鏁版嵁 - if (this.model.id) { - let params = { id: this.model.id } - this.requestTableData(this.url.orderCustomerList, params, this.table1) - this.requestTableData(this.url.orderTicketList, params, this.table2) - } - - }, - close() { - this.visible = false - this.getAllTable().then(editableTables => { - this.table1.dataSource=[]; - this.table2.dataSource=[]; - }) - this.$emit('close') - }, - /** 鏌ヨ鏌愪釜tab鐨勬暟鎹� */ - requestTableData(url, params, tab) { - tab.loading = true - getAction(url, params).then(res => { - tab.dataSource = res.result || [] - }).finally(() => { - tab.loading = false - }) - }, - handleOk() { - this.validateFields() - }, - handleCancel() { - this.close() - }, - /** ATab 閫夐」鍗″垏鎹簨浠� */ - handleChangeTabs(key) { - getRefPromise(this, `editableTable${key}`).then(editableTable => { - editableTable.resetScrollTop() - }) - }, - - /** 瑙﹀彂琛ㄥ崟楠岃瘉 */ - validateFields() { - this.getAllTable().then(tables => { - /** 涓�娆℃�ч獙璇佷富琛ㄥ拰鎵�鏈夌殑娆¤〃 */ - return validateFormModelAndTables(this.$refs.form,this.model, tables) - }).then(allValues => { - let formData = this.classifyIntoFormData(allValues) - // 鍙戣捣璇锋眰 - return this.requestAddOrEdit(formData) - }).catch(e => { - if (e.error === VALIDATE_FAILED) { - // 濡傛灉鏈夋湭閫氳繃琛ㄥ崟楠岃瘉鐨勫瓙琛紝灏辫嚜鍔ㄨ烦杞埌瀹冩墍鍦ㄧ殑tab - this.activeKey = e.index == null ? this.activeKey : (e.index + 1).toString() - } else { - console.error(e) - } - }) - }, - /** 鏁寸悊鎴恌ormData */ - classifyIntoFormData(allValues) { - let orderMain = Object.assign(this.model, allValues.formValue) - return { - ...orderMain, // 灞曞紑 - jeecgOrderCustomerList: allValues.tablesValue[0].tableData, - jeecgOrderTicketList: allValues.tablesValue[1].tableData - } - }, - /** 鍙戣捣鏂板鎴栦慨鏀圭殑璇锋眰 */ - requestAddOrEdit(formData) { - let url = this.url.add, method = 'post' - if (this.model.id) { - url = this.url.edit - method = 'put' - } - this.confirmLoading = true - httpAction(url, formData, method).then((res) => { - if (res.success) { - this.$message.success(res.message) - this.$emit('ok') - this.close() - } else { - this.$message.warning(res.message) - } - }).finally(() => { - this.confirmLoading = false - }) - } - - } - } -</script> - -<style scoped> -</style> \ No newline at end of file diff --git a/src/views/jeecg/modules/PdfPreviewModal.vue b/src/views/jeecg/modules/PdfPreviewModal.vue deleted file mode 100644 index 1e232e4..0000000 --- a/src/views/jeecg/modules/PdfPreviewModal.vue +++ /dev/null @@ -1,56 +0,0 @@ -<template> - <div style="display: none"> - <iframe - :id="id" - :src="url" - frameborder="0" - width="100%" - height="550px" - scrolling="auto"> - </iframe> - </div> -</template> - -<script> - import Vue from 'vue' - import { ACCESS_TOKEN } from "@/store/mutation-types" - - export default { - name: "PdfPreviewModal", - data () { - return { - url: window._CONFIG['pdfDomainURL'], - id:"pdfPreviewIframe", - headers:{} - } - }, - created () { - const token = Vue.ls.get(ACCESS_TOKEN); - this.headers = {"X-Access-Token":token} - }, - computed:{ - - }, - mounted(){ - window.addEventListener('message', this.handleScanFileMessage); - }, - methods: { - handleScanFileMessage (event) { - // 鏍规嵁涓婇潰鍒跺畾鐨勭粨鏋勬潵瑙f瀽iframe鍐呴儴鍙戝洖鏉ョ殑鏁版嵁 - const data = event.data; - console.log(data); - }, - - previewFiles (title,token) { - var iframe = document.getElementById("pdfPreviewIframe"); - var json = {"title":title,"token":token}; - iframe.contentWindow.postMessage(json, "*"); - }, - - } - } -</script> - -<style scoped> - -</style> \ No newline at end of file diff --git a/src/views/jeecg/modules/SplitPanelA.vue b/src/views/jeecg/modules/SplitPanelA.vue deleted file mode 100644 index 96b6b4b..0000000 --- a/src/views/jeecg/modules/SplitPanelA.vue +++ /dev/null @@ -1,27 +0,0 @@ -<template> - <a-card style="min-width: 500px;overflow-x: auto"> - <p>鎴戞槸宸︿晶椤甸潰</p> - <img-turn-page></img-turn-page> - </a-card> -</template> - -<script> - import ImgTurnPage from '../ImgTurnPage' - export default { - name: "SplitPanelAModal", - components:{ - ImgTurnPage - }, - data () { - return { - } - }, - created () { - }, - methods: { - } - } -</script> - -<style scoped> -</style> \ No newline at end of file diff --git a/src/views/jeecg/modules/SplitPanelB.vue b/src/views/jeecg/modules/SplitPanelB.vue deleted file mode 100644 index 9008b00..0000000 --- a/src/views/jeecg/modules/SplitPanelB.vue +++ /dev/null @@ -1,27 +0,0 @@ -<template> - <a-card style="min-width: 500px;overflow-x: auto"> - <p>鎴戞槸鍙充晶椤甸潰</p> - <img-turn-page></img-turn-page> - </a-card> -</template> - -<script> - import ImgTurnPage from '../ImgTurnPage' - export default { - name: "SplitPanelAModal", - components:{ - ImgTurnPage - }, - data () { - return { - } - }, - created () { - }, - methods: { - } - } -</script> - -<style scoped> -</style> \ No newline at end of file diff --git a/src/views/jeecg/modules/SplitPanelModal.vue b/src/views/jeecg/modules/SplitPanelModal.vue deleted file mode 100644 index 6b7c211..0000000 --- a/src/views/jeecg/modules/SplitPanelModal.vue +++ /dev/null @@ -1,65 +0,0 @@ -<template> - <a-modal - title="鍒嗗睆" - :width="modalWidth" - :visible="visible" - :bodyStyle="bodyStyle" - style="top: 0px;" - @ok="handleOk" - @cancel="handleCancel" - cancelText="鍏抽棴"> - - <split-pane :min-percent='20' :default-percent='50' split="vertical"> - <template slot="paneL"> - <split-panel-a></split-panel-a> - </template> - <template slot="paneR"> - <split-panel-b></split-panel-b> - </template> - </split-pane> - - </a-modal> -</template> - -<script> - import splitPane from 'vue-splitpane' - import SplitPanelA from './SplitPanelA' - import SplitPanelB from './SplitPanelB' - export default { - name: "SplitPanelModal", - components:{ - splitPane, - SplitPanelA, - SplitPanelB - }, - data () { - return { - visible: false, - bodyStyle:{ - padding: "0", - //update-begin---author:wangshuai ---date:20220104 for锛歔JTC-411]鐏嫄 鍒嗗睆 鍥剧墖澶ф椂锛屼笌鎸夐挳閲嶅彔锛屾牱寮忎笉濂�------------ - height:(window.innerHeight-140)+"px" - //update-begin---author:wangshuai ---date:20220104 for锛歔JTC-411]鐏嫄 鍒嗗睆 鍥剧墖澶ф椂锛屼笌鎸夐挳閲嶅彔锛屾牱寮忎笉濂�------------ - }, - modalWidth:800, - } - }, - created () { - this.modalWidth = window.innerWidth-0; - }, - methods: { - show () { - this.visible = true; - }, - handleOk(){ - - }, - handleCancel () { - this.visible = false; - }, - } - } -</script> - -<style scoped> -</style> \ No newline at end of file diff --git a/src/views/jeecg/modules/SuperQueryModal.vue b/src/views/jeecg/modules/SuperQueryModal.vue deleted file mode 100644 index 87909cf..0000000 --- a/src/views/jeecg/modules/SuperQueryModal.vue +++ /dev/null @@ -1,95 +0,0 @@ -<template> - <a-modal - title="楂樼骇鏌ヨ鏋勯�犲櫒" - :width="800" - :visible="visible" - :confirmLoading="confirmLoading" - @ok="handleOk" - :mask="false" - okText="鏌ヨ" - @cancel="handleCancel" - cancelText="鍏抽棴"> - - <a-spin :spinning="confirmLoading"> - <a-form> - <div> - <a-row type="flex" style="margin-bottom:10px" :gutter="16" v-for="(item, index) in queryParamsModel" :key="index"> - <a-col :span="6"> - <a-select placeholder="閫夋嫨鏌ヨ瀛楁" v-model="item.field"> - <a-select-option value="name">鐢ㄦ埛鍚�</a-select-option> - <a-select-option value="key_word">鍏抽敭璇�</a-select-option> - <a-select-option value="birthday">鐢熸棩</a-select-option> - <a-select-option value="age">骞撮緞</a-select-option> - </a-select> - </a-col> - <a-col :span="6"> - <a-select placeholder="閫夋嫨鍖归厤瑙勫垯" v-model="item.rule"> - <a-select-option value="=">绛変簬</a-select-option> - <a-select-option value="!=">涓嶇瓑浜�</a-select-option> - <a-select-option value=">">澶т簬</a-select-option> - <a-select-option value=">=">澶т簬绛変簬</a-select-option> - <a-select-option value="<">灏忎簬</a-select-option> - <a-select-option value="<=">灏忎簬绛変簬</a-select-option> - <a-select-option value="LEFT_LIKE">浠�..寮�濮�</a-select-option> - <a-select-option value="RIGHT_LIKE">浠�..缁撳熬</a-select-option> - <a-select-option value="LIKE">鍖呭惈</a-select-option> - <a-select-option value="IN">鍦�...涓�</a-select-option> - </a-select> - </a-col> - - <a-col :span="6"><a-input placeholder="璇疯緭鍏ュ��" v-model="item.val"/></a-col> - <a-col :span="6"> - <a-button @click="handleAdd" icon="plus"></a-button> - <a-button @click="handleDel( index )" icon="minus"></a-button> - </a-col> - </a-row> - </div> - - </a-form> - </a-spin> - </a-modal> -</template> - -<script> - import { httpAction } from '@/api/manage' - - export default { - name: "SuperQueryModal", - data () { - return { - visible: false, - queryParamsModel: [{},{}], - confirmLoading: false - } - }, - created () { - }, - methods: { - show () { - this.visible = true; - }, - close () { - this.$emit('close'); - this.visible = false; - }, - handleOk () { - console.log(this.queryParamsModel) - // 瀛愮粍浠朵腑瑙﹀彂鐖剁粍浠舵柟娉昬e骞朵紶鍊糲c12345 - this.$emit('handleSuperQuery', this.queryParamsModel) - }, - handleCancel () { - this.close() - }, - handleAdd () { - this.queryParamsModel.push({}); - }, - handleDel (index) { - console.log(index) - this.queryParamsModel.splice(index,1); - } - } - } -</script> - -<style scoped> -</style> \ No newline at end of file diff --git a/src/views/jeecg/modules/VueCronModal.vue b/src/views/jeecg/modules/VueCronModal.vue deleted file mode 100644 index bde3c8d..0000000 --- a/src/views/jeecg/modules/VueCronModal.vue +++ /dev/null @@ -1,729 +0,0 @@ -<template> - <a-modal - title="cron琛ㄨ揪寮�" - :width="modalWidth" - :visible="visible" - :confirmLoading="confirmLoading" - @ok="change" - @cancel="close" - cancelText="鍏抽棴"> - <div class="card-container"> - <a-tabs type="card"> - <a-tab-pane key="1" type="card"> - <span slot="tab"><a-icon type="schedule" /> 绉�</span> - <a-radio-group v-model="result.second.cronEvery"> - <a-row> - <a-radio value="1">姣忎竴绉掗挓</a-radio> - </a-row> - <a-row> - <a-radio value="2">姣忛殧 - <a-input-number size="small" v-model="result.second.incrementIncrement" :min="1" :max="60"></a-input-number> - 绉掓墽琛� 浠� - <a-input-number size="small" v-model="result.second.incrementStart" :min="0" :max="59"></a-input-number> - 绉掑紑濮� - </a-radio> - </a-row> - <a-row> - <a-radio value="3">鍏蜂綋绉掓暟(鍙閫�)</a-radio> - <a-select style="width:354px;" size="small" mode="multiple" v-model="result.second.specificSpecific"> - <a-select-option v-for="(val,index) in 60" :key="index" :value="index">{{ index }}</a-select-option> - </a-select> - </a-row> - <a-row> - <a-radio value="4">鍛ㄦ湡浠� - <a-input-number size="small" v-model="result.second.rangeStart" :min="1" :max="60"></a-input-number> - 鍒� - <a-input-number size="small" v-model="result.second.rangeEnd" :min="0" :max="59"></a-input-number> - 绉� - </a-radio> - </a-row> - </a-radio-group> - </a-tab-pane> - <a-tab-pane key="2"> - <span slot="tab"><a-icon type="schedule" />鍒�</span> - <div class="tabBody"> - <a-radio-group v-model="result.minute.cronEvery"> - <a-row> - <a-radio value="1">姣忎竴鍒嗛挓</a-radio> - </a-row> - <a-row> - <a-radio value="2">姣忛殧 - <a-input-number size="small" v-model="result.minute.incrementIncrement" :min="1" :max="60"></a-input-number> - 鍒嗘墽琛� 浠� - <a-input-number size="small" v-model="result.minute.incrementStart" :min="0" :max="59"></a-input-number> - 鍒嗗紑濮� - </a-radio> - </a-row> - <a-row> - <a-radio value="3">鍏蜂綋鍒嗛挓鏁�(鍙閫�)</a-radio> - <a-select style="width:340px;" size="small" mode="multiple" v-model="result.minute.specificSpecific"> - <a-select-option v-for="(val,index) in Array(60)" :key="index" :value="index"> {{ index }}</a-select-option> - </a-select> - </a-row> - <a-row> - <a-radio value="4">鍛ㄦ湡浠� - <a-input-number size="small" v-model="result.minute.rangeStart" :min="1" :max="60"></a-input-number> - 鍒� - <a-input-number size="small" v-model="result.minute.rangeEnd" :min="0" :max="59"></a-input-number> - 鍒� - </a-radio> - </a-row> - </a-radio-group> - </div> - </a-tab-pane> - <a-tab-pane key="3"> - <span slot="tab"><a-icon type="schedule" /> 鏃�</span> - <div class="tabBody"> - <a-radio-group v-model="result.hour.cronEvery"> - <a-row> - <a-radio value="1">姣忎竴灏忔椂</a-radio> - </a-row> - <a-row> - <a-radio value="2">姣忛殧 - <a-input-number size="small" v-model="result.hour.incrementIncrement" :min="0" :max="23"></a-input-number> - 灏忔椂鎵ц 浠� - <a-input-number size="small" v-model="result.hour.incrementStart" :min="0" :max="23"></a-input-number> - 灏忔椂寮�濮� - </a-radio> - </a-row> - <a-row> - <a-radio class="long" value="3">鍏蜂綋灏忔椂鏁�(鍙閫�)</a-radio> - <a-select style="width:340px;" size="small" mode="multiple" v-model="result.hour.specificSpecific"> - <a-select-option v-for="(val,index) in Array(24)" :key="index" >{{ index }}</a-select-option> - </a-select> - </a-row> - <a-row> - <a-radio value="4">鍛ㄦ湡浠� - <a-input-number size="small" v-model="result.hour.rangeStart" :min="0" :max="23"></a-input-number> - 鍒� - <a-input-number size="small" v-model="result.hour.rangeEnd" :min="0" :max="23"></a-input-number> - 灏忔椂 - </a-radio> - </a-row> - </a-radio-group> - </div> - </a-tab-pane> - <a-tab-pane key="4"> - <span slot="tab"><a-icon type="schedule" /> 澶�</span> - <div class="tabBody"> - <a-radio-group v-model="result.day.cronEvery"> - <a-row> - <a-radio value="1">姣忎竴澶�</a-radio> - </a-row> - <a-row> - <a-radio value="2">姣忛殧 - <a-input-number size="small" v-model="result.week.incrementIncrement" :min="1" :max="7"></a-input-number> - 鍛ㄦ墽琛� 浠� - <a-select size="small" v-model="result.week.incrementStart"> - <a-select-option v-for="(val,index) in Array(7)" :key="index" :value="index+1">{{ weekDays[index] }}</a-select-option> - </a-select> - 寮�濮� - </a-radio> - </a-row> - <a-row> - <a-radio value="3">姣忛殧 - <a-input-number size="small" v-model="result.day.incrementIncrement" :min="1" :max="31"></a-input-number> - 澶╂墽琛� 浠� - <a-input-number size="small" v-model="result.day.incrementStart" :min="1" :max="31"></a-input-number> - 澶╁紑濮� - </a-radio> - </a-row> - <a-row> - <a-radio class="long" value="4">鍏蜂綋鏄熸湡鍑�(鍙閫�)</a-radio> - <a-select style="width:340px;" size="small" mode="multiple" v-model="result.week.specificSpecific"> - <a-select-option v-for="(val,index) in Array(7)" :key="index" :value="index+1">{{ weekDays[index] }}</a-select-option> - </a-select> - </a-row> - <a-row> - <a-radio class="long" value="5">鍏蜂綋澶╂暟(鍙閫�)</a-radio> - <a-select style="width:354px;" size="small" mode="multiple" v-model="result.day.specificSpecific"> - <a-select-option v-for="(val,index) in Array(31)" :key="index" :value="index">{{ index+1 }}</a-select-option> - </a-select> - </a-row> - <a-row> - <a-radio value="6">鍦ㄨ繖涓湀鐨勬渶鍚庝竴澶�</a-radio> - </a-row> - <a-row> - <a-radio value="7">鍦ㄨ繖涓湀鐨勬渶鍚庝竴涓伐浣滄棩</a-radio> - </a-row> - <a-row> - <a-radio value="8">鍦ㄨ繖涓湀鐨勬渶鍚庝竴涓� - <a-select size="small" v-model="result.day.cronLastSpecificDomDay"> - <a-select-option v-for="(val,index) in Array(7)" :key="index" :value="index+1">{{ weekDays[index] }}</a-select-option> - </a-select> - </a-radio> - </a-row> - <a-row> - <a-radio value="9"> - <a-input-number size="small" v-model="result.day.cronDaysBeforeEomMinus" :min="1" :max="31"></a-input-number> - 鍦ㄦ湰鏈堝簳鍓� - </a-radio> - </a-row> - <a-row> - <a-radio value="10">鏈�杩戠殑宸ヤ綔鏃ワ紙鍛ㄤ竴鑷冲懆浜旓級鑷虫湰鏈� - <a-input-number size="small" v-model="result.day.cronDaysNearestWeekday" :min="1" :max="31"></a-input-number> - 鏃� - </a-radio> - </a-row> - <a-row> - <a-radio value="11">鍦ㄨ繖涓湀鐨勭 - <a-input-number size="small" v-model="result.week.cronNthDayNth" :min="1" :max="5"></a-input-number> - 涓� - <a-select size="small" v-model="result.week.cronNthDayDay"> - <a-select-option v-for="(val,index) in Array(7)" :key="index" :value="index+1">{{ weekDays[index] }}</a-select-option> - </a-select> - - </a-radio> - </a-row> - </a-radio-group> - </div> - </a-tab-pane> - <a-tab-pane key="5"> - <span slot="tab"><a-icon type="schedule" /> 鏈�</span> - <div class="tabBody"> - <a-radio-group v-model="result.month.cronEvery"> - <a-row> - <a-radio value="1">姣忎竴鏈�</a-radio> - </a-row> - <a-row> - <a-radio value="2">姣忛殧 - <a-input-number size="small" v-model="result.month.incrementIncrement" :min="0" :max="12"></a-input-number> - 鏈堟墽琛� 浠� - <a-input-number size="small" v-model="result.month.incrementStart" :min="0" :max="12"></a-input-number> - 鏈堝紑濮� - </a-radio> - </a-row> - <a-row> - <a-radio class="long" value="3">鍏蜂綋鏈堟暟(鍙閫�)</a-radio> - <a-select style="width:354px;" size="small" filterable mode="multiple" v-model="result.month.specificSpecific"> - <a-select-option v-for="(val,index) in Array(12)" :key="index" :value="index">{{ index+1 }}</a-select-option> - </a-select> - </a-row> - <a-row> - <a-radio value="4">浠� - <a-input-number size="small" v-model="result.month.rangeStart" :min="1" :max="12"></a-input-number> - 鍒� - <a-input-number size="small" v-model="result.month.rangeEnd" :min="1" :max="12"></a-input-number> - 鏈堜箣闂寸殑姣忎釜鏈� - </a-radio> - </a-row> - </a-radio-group> - </div> - </a-tab-pane> - <a-tab-pane key="6"> - <span slot="tab"><a-icon type="schedule" /> 骞�</span> - <div class="tabBody"> - <a-radio-group v-model="result.year.cronEvery"> - <a-row> - <a-radio value="1">姣忎竴骞�</a-radio> - </a-row> - <a-row> - <a-radio value="2">姣忛殧 - <a-input-number size="small" v-model="result.year.incrementIncrement" :min="1" :max="99"></a-input-number> - 骞存墽琛� 浠� - <a-input-number size="small" v-model="result.year.incrementStart" :min="2019" :max="2119"></a-input-number> - 骞村紑濮� - </a-radio> - </a-row> - <a-row> - <a-radio class="long" value="3">鍏蜂綋骞翠唤(鍙閫�)</a-radio> - <a-select style="width:354px;" size="small" filterable mode="multiple" v-model="result.year.specificSpecific"> - <a-select-option v-for="(val,index) in Array(100)" :key="index" :value="2019+index">{{ 2019+index }}</a-select-option> - </a-select> - </a-row> - <a-row> - <a-radio value="4">浠� - <a-input-number size="small" v-model="result.year.rangeStart" :min="2019" :max="2119"></a-input-number> - 鍒� - <a-input-number size="small" v-model="result.year.rangeEnd" :min="2019" :max="2119"></a-input-number> - 骞翠箣闂寸殑姣忎竴骞� - </a-radio> - </a-row> - </a-radio-group> - </div> - </a-tab-pane> - </a-tabs> - <div class="bottom"> - <span class="value">{{this.cron.label }}</span> - </div> - </div> - </a-modal> -</template> -<script> - import pick from 'lodash.pick' - export default { - name:'VueCron', - props:['data','i18n'], - data(){ - return { - visible: false, - confirmLoading:false, - size:'large', - weekDays:['澶�','涓�','浜�','涓�','鍥�','浜�','鍏�'].map(val=>'鏄熸湡'+val), - result: { - second:{ - cronEvery:'', - incrementStart:3, - incrementIncrement:5, - rangeStart:1, - rangeEnd:0, - specificSpecific:[], - }, - minute:{ - cronEvery:'', - incrementStart:3, - incrementIncrement:5, - rangeStart:1, - rangeEnd:'0', - specificSpecific:[], - }, - hour:{ - cronEvery:'', - incrementStart:3, - incrementIncrement:5, - rangeStart:'0', - rangeEnd:'0', - specificSpecific:[], - }, - day:{ - cronEvery:'', - incrementStart:1, - incrementIncrement:'1', - rangeStart:'', - rangeEnd:'', - specificSpecific:[], - cronLastSpecificDomDay:1, - cronDaysBeforeEomMinus:'', - cronDaysNearestWeekday:'', - }, - week:{ - cronEvery:'', - incrementStart:1, - incrementIncrement:'1', - specificSpecific:[], - cronNthDayDay:1, - cronNthDayNth:'1', - }, - month:{ - cronEvery:'', - incrementStart:3, - incrementIncrement:5, - rangeStart:1, - rangeEnd:1, - specificSpecific:[], - }, - year:{ - cronEvery:'', - incrementStart:2017, - incrementIncrement:1, - rangeStart:2019, - rangeEnd: 2019, - specificSpecific:[], - }, - label:'' - }, - output:{ - second:{ - cronEvery:'', - incrementStart:'', - incrementIncrement:'', - rangeStart:'', - rangeEnd:'', - specificSpecific:[], - }, - minute:{ - cronEvery:'', - incrementStart:'', - incrementIncrement:'', - rangeStart:'', - rangeEnd:'', - specificSpecific:[], - }, - hour:{ - cronEvery:'', - incrementStart:'', - incrementIncrement:'', - rangeStart:'', - rangeEnd:'', - specificSpecific:[], - }, - day:{ - cronEvery:'', - incrementStart:'', - incrementIncrement:'', - rangeStart:'', - rangeEnd:'', - specificSpecific:[], - cronLastSpecificDomDay:'', - cronDaysBeforeEomMinus:'', - cronDaysNearestWeekday:'', - }, - week:{ - cronEvery:'', - incrementStart:'', - incrementIncrement:'', - specificSpecific:[], - cronNthDayDay:'', - cronNthDayNth:'', - }, - month:{ - cronEvery:'', - incrementStart:'', - incrementIncrement:'', - rangeStart:'', - rangeEnd:'', - specificSpecific:[], - }, - year:{ - cronEvery:'', - incrementStart:'', - incrementIncrement:'', - rangeStart:'', - rangeEnd:'', - specificSpecific:[], - } - } - } - }, - computed: { - modalWidth(){ - return 608; - }, - text(){ - return Language['cn'] - }, - secondsText() { - let seconds = ''; - let cronEvery=this.result.second.cronEvery; - switch (cronEvery.toString()){ - case '1': - seconds = '*'; - break; - case '2': - seconds = this.result.second.incrementStart+'/'+this.result.second.incrementIncrement; - break; - case '3': - this.result.second.specificSpecific.map(val=> {seconds += val+','}); - seconds = seconds.slice(0, -1); - break; - case '4': - seconds = this.result.second.rangeStart+'-'+this.result.second.rangeEnd; - break; - } - return seconds; - }, - minutesText() { - let minutes = ''; - let cronEvery=this.result.minute.cronEvery; - switch (cronEvery.toString()){ - case '1': - minutes = '*'; - break; - case '2': - minutes = this.result.minute.incrementStart+'/'+this.result.minute.incrementIncrement; - break; - case '3': - this.result.minute.specificSpecific.map(val=> { - minutes += val+',' - }); - minutes = minutes.slice(0, -1); - break; - case '4': - minutes = this.result.minute.rangeStart+'-'+this.result.minute.rangeEnd; - break; - } - return minutes; - }, - hoursText() { - let hours = ''; - let cronEvery=this.result.hour.cronEvery; - switch (cronEvery.toString()){ - case '1': - hours = '*'; - break; - case '2': - hours = this.result.hour.incrementStart+'/'+this.result.hour.incrementIncrement; - break; - case '3': - this.result.hour.specificSpecific.map(val=> { - hours += val+',' - }); - hours = hours.slice(0, -1); - break; - case '4': - hours = this.result.hour.rangeStart+'-'+this.result.hour.rangeEnd; - break; - } - return hours; - }, - daysText() { - let days=''; - let cronEvery=this.result.day.cronEvery; - switch (cronEvery.toString()){ - case '1': - break; - case '2': - case '4': - case '11': - days = '?'; - break; - case '3': - days = this.result.day.incrementStart+'/'+this.result.day.incrementIncrement; - break; - case '5': - this.result.day.specificSpecific.map(val=> { - days += val+',' - }); - days = days.slice(0, -1); - break; - case '6': - days = "L"; - break; - case '7': - days = "LW"; - break; - case '8': - days = this.result.day.cronLastSpecificDomDay + 'L'; - break; - case '9': - days = 'L-' + this.result.day.cronDaysBeforeEomMinus; - break; - case '10': - days = this.result.day.cronDaysNearestWeekday+"W"; - break - } - return days; - }, - weeksText() { - let weeks = ''; - let cronEvery=this.result.day.cronEvery; - switch (cronEvery.toString()){ - case '1': - case '3': - case '5': - weeks = '?'; - break; - case '2': - weeks = this.result.week.incrementStart+'/'+this.result.week.incrementIncrement; - break; - case '4': - this.result.week.specificSpecific.map(val=> { - weeks += val+',' - }); - weeks = weeks.slice(0, -1); - break; - case '6': - case '7': - case '8': - case '9': - case '10': - weeks = "?"; - break; - case '11': - weeks = this.result.week.cronNthDayDay+"#"+this.result.week.cronNthDayNth; - break; - } - return weeks; - }, - monthsText() { - let months = ''; - let cronEvery=this.result.month.cronEvery; - switch (cronEvery.toString()){ - case '1': - months = '*'; - break; - case '2': - months = this.result.month.incrementStart+'/'+this.result.month.incrementIncrement; - break; - case '3': - this.result.month.specificSpecific.map(val=> { - months += val+',' - }); - months = months.slice(0, -1); - break; - case '4': - months = this.result.month.rangeStart+'-'+this.result.month.rangeEnd; - break; - } - return months; - }, - yearsText() { - let years = ''; - let cronEvery=this.result.year.cronEvery; - switch (cronEvery.toString()){ - case '1': - years = '*'; - break; - case '2': - years = this.result.year.incrementStart+'/'+this.result.year.incrementIncrement; - break; - case '3': - this.result.year.specificSpecific.map(val=> { - years += val+',' - }); - years = years.slice(0, -1); - break; - case '4': - years = this.result.year.rangeStart+'-'+this.result.year.rangeEnd; - break; - } - return years; - }, - cron(){ - return { - value: this.result, - label:`${this.secondsText||'*'} ${this.minutesText||'*'} ${this.hoursText||'*'} ${this.daysText||'*'} ${this.monthsText||'*'} ${this.weeksText||'*'} ${this.yearsText||'*'}` - } - }, - }, - watch:{ - data(){ - //this.rest(this.data); - } - }, - methods: { - show(){ - //this.rest(pick(this.data.value,'second','minute','hour','day','week','month','year')); - //this.rest(this.data.value); - Object.assign(this.data.value,this.result); - console.log('data鍒濆鍖�',this.data); - //this.result = this.data.value; - this.visible=true; - }, - getValue(){ - return this.cron; - }, - change(){ - console.log('杩斿洖鍓�',this.cron); - this.$emit('change',this.cron); - this.close(); - this.visible = false; - }, - close(){ - this.visible = false; - //this.$emit('close') - }, - rest(data){ - for(let i in data){ - console.log(data[i]); - if(data[i] instanceof Object){ - this.rest(data[i]) - }else { - switch(typeof data[i]) { - case 'object': - data[i] = []; - break; - case 'string': - data[i] = ''; - break; - case 'number': - data[i] = null; - break; - } - } - } - }, - callback (key) { - //console.log(key) - } - } - } -</script> - -<style lang="less"> - .card-container { - background: #fff; - overflow: hidden; - padding: 12px; - position: relative; - width: 100%; - .ant-tabs{ - border:1px solid #e6ebf5; - padding: 0; - .ant-tabs-bar { - margin: 0; - outline: none; - border-bottom: none; - .ant-tabs-nav-container{ - margin: 0; - .ant-tabs-tab { - padding: 0 24px!important; - background-color: #f5f7fa!important; - margin-right: 0px!important; - border-radius: 0; - line-height: 38px; - border: 1px solid transparent!important; - border-bottom: 1px solid #e6ebf5!important; - } - .ant-tabs-tab-active.ant-tabs-tab{ - color: #409eff; - background-color: #fff!important; - border-right:1px solid #e6ebf5!important; - border-left:1px solid #e6ebf5!important; - border-bottom:1px solid #fff!important; - font-weight: normal; - transition:none!important; - } - } - } - .ant-tabs-tabpane{ - padding: 15px; - .ant-row{ - margin: 10px 0; - } - .ant-select,.ant-input-number{ - width: 100px; - } - } - } - } -</style> -<style lang="less" scoped> - .container-widthEn{ - width: 755px; - } - .container-widthCn{ - width: 608px; - } - .language{ - text-align: center; - position: absolute; - right: 13px; - top: 13px; - border: 1px solid transparent; - height: 40px; - line-height: 38px; - font-size: 16px; - color: #409eff; - z-index: 1; - background: #f5f7fa; - outline: none; - width: 47px; - border-bottom: 1px solid #e6ebf5; - border-radius: 0; - } - .card-container{ - .bottom{ - display: flex; - justify-content: center; - padding: 10px 0 0 0; - .cronButton{ - margin: 0 10px; - line-height: 40px; - } - } - } - .tabBody{ - .a-row{ - margin: 10px 0; - .long{ - .a-select{ - width:354px; - } - } - .a-input-number{ - width: 110px; - } - } - } -</style> diff --git a/src/views/jeecg/report/Analysis.vue b/src/views/jeecg/report/Analysis.vue deleted file mode 100644 index f2f8d69..0000000 --- a/src/views/jeecg/report/Analysis.vue +++ /dev/null @@ -1,698 +0,0 @@ -<template> - <div class="page-header-index-wide"> - <a-row :gutter="24"> - <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }"> - <chart-card :loading="loading" title="鍙楃悊閲�" :total="cardCount.sll | NumberFormat"> - <a-tooltip title="鎸囨爣璇存槑" slot="action"> - <a-icon type="info-circle-o" /> - </a-tooltip> - <div> - <mini-area :dataSource="chartData.sll" /> - </div> - <template slot="footer">浠婃棩鍙楃悊閲忥細<span>{{ todaySll }}</span></template> - </chart-card> - </a-col> - <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }"> - <chart-card :loading="loading" title="鍔炵粨閲�" :total="cardCount.bjl | NumberFormat"> - <a-tooltip title="鎸囨爣璇存槑" slot="action"> - <a-icon type="info-circle-o" /> - </a-tooltip> - <div> - <mini-area :dataSource="chartData.bjl"/> - </div> - <template slot="footer">浠婃棩鍔炵粨閲忥細<span>{{ todayBjl }}</span></template> - </chart-card> - </a-col> - <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }"> - <chart-card :loading="loading" title="鐢ㄦ埛鍙楃悊閲�" :total="cardCount.isll | NumberFormat"> - <a-tooltip title="鎸囨爣璇存槑" slot="action"> - <a-icon type="info-circle-o" /> - </a-tooltip> - <div> - <mini-bar :dataSource="chartData.isll"/> - </div> - <template slot="footer">鐢ㄦ埛浠婃棩鍙楃悊閲忥細<span>{{ todayISll }}</span></template> - </chart-card> - </a-col> - <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }"> - <chart-card :loading="loading" title="鐢ㄦ埛鍔炵粨閲�" :total="cardCount.ibjl | NumberFormat"> - <a-tooltip title="鎸囨爣璇存槑" slot="action"> - <a-icon type="info-circle-o" /> - </a-tooltip> - <div> - <mini-bar :dataSource="chartData.ibjl"/> - </div> - <template slot="footer">鐢ㄦ埛浠婃棩鍔炵粨閲忥細<span>{{ todayIBjl }}</span></template> - </chart-card> - </a-col> - </a-row> - - <a-card :loading="loading" :bordered="false" :body-style="{padding: '0'}"> - <div class="salesCard"> - <a-tabs default-active-key="1" size="large" :tab-bar-style="{marginBottom: '24px', paddingLeft: '16px'}"> - <div class="extra-wrapper" slot="tabBarExtraContent"> - <div class="extra-item"> - <a>浠婃棩</a> - <a>鏈懆</a> - <a>鏈湀</a> - <a>鏈勾</a> - </div> - <a-range-picker :style="{width: '256px'}" /> - </div> - - <a-tab-pane loading="true" tab="鍙楃悊鐩戠" key="1"> - <a-row> - <a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24"> - <bar title="鍙楃悊閲忕粺璁�" /> - </a-col> - <a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24"> - - <a-card title="蹇�熷紑濮� / 渚挎嵎瀵艰埅" style="margin-bottom: 24px" :bordered="false" :body-style="{padding: 0}"> - <div class="item-group"> - <a-row> - <a-col :class="'more-btn'" :span="12" v-for="(item,index) in registerTypeList" :key=" 'registerType'+index "> - <a-button @click="goPage(index)" style="margin-bottom:10px" size="small" type="primary" ghost>{{ item.text }}</a-button> - </a-col> - </a-row> - </div> - </a-card> - - </a-col> - </a-row> - </a-tab-pane> - - <a-tab-pane tab="浜や簰鐩戠" key="2"> - <a-row> - <a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24"> - <bar-multid :dataSource="jhjgData" :fields="jhjgFields" title="骞冲彴涓庨儴闂ㄤ氦浜掗噺缁熻"></bar-multid> - </a-col> - <a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24"> - - <a-card title="蹇�熷紑濮� / 渚挎嵎瀵艰埅" style="margin-bottom: 24px" :bordered="false" :body-style="{padding: 0}"> - <div class="item-group"> - <a-row> - <a-col :class="'more-btn'" :span="12" v-for="(item,index) in registerTypeList" :key=" 'registerType'+index "> - <a-button @click="goPage(index)" style="margin-bottom:10px" size="small" type="primary" ghost>{{ item.text }}</a-button> - </a-col> - </a-row> - </div> - </a-card> - - </a-col> - </a-row> - </a-tab-pane> - - <a-tab-pane tab="鏁堢巼鐩戠" key="3"> - <a-row> - <a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24"> - <line-chart-multid :dataSource="xljgData" :fields="xljgFields" title="骞冲彴涓庨儴闂ㄤ氦浜掓晥鐜囩粺璁�"></line-chart-multid> - </a-col> - <a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24"> - - <a-card title="蹇�熷紑濮� / 渚挎嵎瀵艰埅" style="margin-bottom: 24px" :bordered="false" :body-style="{padding: 0}"> - <div class="item-group"> - <a-row> - <a-col :class="'more-btn'" :span="12" v-for="(item,index) in registerTypeList" :key=" 'registerType'+index "> - <a-button @click="goPage(index)" style="margin-bottom:10px" size="small" type="primary" ghost>{{ item.text }}</a-button> - </a-col> - </a-row> - </div> - </a-card> - - </a-col> - </a-row> - </a-tab-pane> - - <a-tab-pane tab="瀛樺偍鐩戠" key="4"> - <a-row> - <a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24"> - <a-row> - <template v-if="diskInfo && diskInfo.length>0"> - <a-col :span="12" v-for="(item,index) in diskInfo" :key=" 'diskInfo'+index "> - <dash-chart-demo :title="item.name" :dataSource="item.restPPT"></dash-chart-demo> - </a-col> - </template> - </a-row> - </a-col> - - <a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24"> - - <a-card title="蹇�熷紑濮� / 渚挎嵎瀵艰埅" style="margin-bottom: 24px" :bordered="false" :body-style="{padding: 0}"> - <div class="item-group"> - <a-row> - <a-col :class="'more-btn'" :span="10" v-for="(item,index) in registerTypeList" :key=" 'registerType'+index "> - <a-button @click="goPage(index)" style="margin-bottom:10px" size="small" type="primary" ghost>{{ item.text }}</a-button> - </a-col> - </a-row> - </div> - </a-card> - - </a-col> - </a-row> - </a-tab-pane> - - </a-tabs> - - </div> - </a-card> - - <a-row :gutter="12"> - <a-card :loading="loading" :class="{ 'anty-list-cust':true }" :bordered="false" :style="{ marginTop: '24px' }"> - - <a-tabs default-active-key="1" size="large" :tab-bar-style="{marginBottom: '24px', paddingLeft: '16px'}"> - <div class="extra-wrapper" slot="tabBarExtraContent"> - <a-radio-group defaultValue="1"> - <a-radio-button value="1">杞Щ鐧昏</a-radio-button> - <a-radio-button value="2">鎶垫娂鐧昏</a-radio-button> - </a-radio-group> - </div> - - <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"> - <a-progress :percent="getFlowRateNumber(record.flowRate)" style="width:80px" /> - </template> - </a-table> - </a-tab-pane> - - <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"> - <span style="color: red;">{{ record.flowRate }}鍒嗛挓</span> - </template> - </a-table> - </a-tab-pane> - - </a-tabs> - - - </a-card> - </a-row> - </div> -</template> - -<script> - import ChartCard from '@/components/ChartCard' - import ACol from "ant-design-vue/es/grid/Col" - 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' - - const rankList = [] - for (let i = 0; i < 7; i++) { - rankList.push({ - name: '鐧介弓宀� ' + (i+1) + ' 鍙峰簵', - total: 1234.56 - i * 100 - }) - } - - const dataCol1 = [{ - title: '涓氬姟鍙�', - align:"center", - dataIndex: 'reBizCode' - },{ - title: '鏉冨埄绫诲瀷', - align:"center", - dataIndex: 'droitType' - },{ - title: '鐧昏绫诲瀷', - align:"center", - dataIndex: 'registeType' - },{ - title: '搴ц惤', - align:"center", - dataIndex: 'beLocated' - },{ - title: '鏉冨埄浜�', - align:"center", - dataIndex: 'qlr' - },{ - title: '涔夊姟浜�', - align:"center", - dataIndex: 'ywr' - },{ - title: '鍙楃悊浜�', - align:"center", - dataIndex: 'acceptBy' - },{ - title: '鍙楃悊鏃堕棿', - align:"center", - dataIndex: 'acceptDate' - },{ - title: '褰撳墠鑺傜偣', - align:"center", - dataIndex: 'curNode' - },{ - title: '鍔炵悊杩涘害', - align:"center", - dataIndex: 'flowRate', - scopedSlots: { customRender: 'flowRate' } - }]; - - const dataCol2 = [{ - title: '涓氬姟鍙�', - align:"center", - dataIndex: 'reBizCode' - },{ - title: '鏉冨埄绫诲瀷', - align:"center", - dataIndex: 'droitType' - },{ - title: '鐧昏绫诲瀷', - align:"center", - dataIndex: 'registeType' - },{ - title: '搴ц惤', - align:"center", - dataIndex: 'beLocated' - },{ - title: '鏉冨埄浜�', - align:"center", - dataIndex: 'qlr' - },{ - title: '涔夊姟浜�', - align:"center", - dataIndex: 'ywr' - },{ - title: '鍙楃悊浜�', - align:"center", - dataIndex: 'acceptBy' - },{ - title: '鍙戣捣鏃堕棿', - align:"center", - dataIndex: 'acceptDate' - },{ - title: '褰撳墠鑺傜偣', - align:"center", - dataIndex: 'curNode' - },{ - title: '瓒呮椂鏃堕棿', - align:"center", - dataIndex: 'flowRate', - scopedSlots: { customRender: 'flowRate' } - }]; - - const jhjgData = [ - { type: '鎴跨', '涓�鏈�': 900, '浜屾湀': 1120, '涓夋湀': 1380, '鍥涙湀': 1480, '浜旀湀': 1450, '鍏湀': 1100, '涓冩湀':1300, '鍏湀':900,'涔濇湀':1000 ,'鍗佹湀':1200 ,'鍗佷竴鏈�':600 ,'鍗佷簩鏈�':900 }, - { type: '绋庡姟', '涓�鏈�':1200, '浜屾湀': 1500, '涓夋湀': 1980, '鍥涙湀': 2000, '浜旀湀': 1000, '鍏湀': 600, '涓冩湀':900, '鍏湀':1100,'涔濇湀':1300 ,'鍗佹湀':2000 ,'鍗佷竴鏈�':900 ,'鍗佷簩鏈�':1100 }, - { type: '涓嶅姩浜�', '涓�鏈�':2000, '浜屾湀': 1430, '涓夋湀': 1300, '鍥涙湀': 1400, '浜旀湀': 900, '鍏湀': 500, '涓冩湀':600, '鍏湀':1000,'涔濇湀':600 ,'鍗佹湀':1000 ,'鍗佷竴鏈�':1500 ,'鍗佷簩鏈�':1200 } - ] - const jhjgFields=[ - '涓�鏈�','浜屾湀','涓夋湀','鍥涙湀','浜旀湀','鍏湀', - '涓冩湀','鍏湀','涔濇湀','鍗佹湀','鍗佷竴鏈�','鍗佷簩鏈�' - ] - - - const xljgData = [ - {type:'涓�鏈�',"鎴跨":1.12,"绋庡姟":1.55,"涓嶅姩浜�":1.2}, - {type:'浜屾湀',"鎴跨":1.65,"绋庡姟":1.32,"涓嶅姩浜�":1.42}, - {type:'涓夋湀',"鎴跨":1.85,"绋庡姟":1.1,"涓嶅姩浜�":1.5}, - - {type:'鍥涙湀',"鎴跨":1.33,"绋庡姟":1.63,"涓嶅姩浜�":1.4}, - {type:'浜旀湀',"鎴跨":1.63,"绋庡姟":1.8,"涓嶅姩浜�":1.7}, - {type:'鍏湀',"鎴跨":1.85,"绋庡姟":1.98,"涓嶅姩浜�":1.8}, - - {type:'涓冩湀',"鎴跨":1.98,"绋庡姟":1.5,"涓嶅姩浜�":1.76}, - {type:'鍏湀',"鎴跨":1.48,"绋庡姟":1.2,"涓嶅姩浜�":1.3}, - {type:'涔濇湀',"鎴跨":1.41,"绋庡姟":1.9,"涓嶅姩浜�":1.6}, - - {type:'鍗佹湀',"鎴跨":1.1,"绋庡姟":1.1,"涓嶅姩浜�":1.4}, - {type:'鍗佷竴鏈�',"鎴跨":1.85,"绋庡姟":1.6,"涓嶅姩浜�":1.5}, - {type:'鍗佷簩鏈�',"鎴跨":1.5,"绋庡姟":1.4,"涓嶅姩浜�":1.3} - ] - const xljgFields=["鎴跨","绋庡姟","涓嶅姩浜�"] - export default { - name: "Analysis", - components: { - ATooltip, - ACol, - ChartCard, - MiniArea, - MiniBar, - MiniProgress, - RankList, - Bar, - Trend, - LineChartMultid, - AreaChartTy, - DashChartDemo, - BarMultid - }, - data() { - return { - xljgData, - xljgFields, - jhjgData, - jhjgFields, - loading: true, - rankList, - zsll:0, - zbjl:0, - todaySll:0, - todayBjl:0, - todayISll:0, - todayIBjl:0, - registerTypeList:[{ - text:"涓氬姟鍙楃悊" - },{ - text:"涓氬姟绠$悊" - },{ - text:"鏂囦欢绠$悊" - },{ - text:"淇℃伅鏌ヨ" - }], - // 鍒嗛〉鍙傛暟 - ipagination:{ - current: 1, - pageSize: 5, - pageSizeOptions: ['10', '20', '30'], - showTotal: (total, range) => { - return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�" - }, - showQuickJumper: true, - showSizeChanger: true, - total: 0 - }, - //鏁版嵁闆� - dataSource:[], - dataSource1:[], - dataSource2:[], - url:{ - analysis:"/sps/register/analysis", - list:"sps/register/virtualList", - countSll:"sps/register/sllTenDaysCount", - countBjl:"sps/register/bjlTenDaysCount", - countISll:'sps/register/ISllTenDaysCount', - countIBjl:'sps/register/IBjlTenDaysCount', - queryDiskInfo:'sys/actuator/redis/queryDiskInfo' - }, - chartData:{ - sll:[], - bjl:[], - isll:[], - ibjl:[] - }, - cardCount:{ - sll:0, - bjl:0, - isll:0, - ibjl:0 - }, - columns:dataCol1, - columns2:dataCol2, - diskInfo:[] - } - }, - methods:{ - goPage(index){ - if(index==0){ - this.$router.push({ - path: '/isps/registerStepForm', - name: 'isps-registerStepForm', - }); - }else if(index==1){ - this.$router.push({ - path: '/isps/registerList', - name: 'isps-registerList', - }); - - }else if(index==2){ - this.$router.push({ - path: '/isps/fileManage', - name: 'isps-fileManage', - }); - }else if(index==3){ - this.$router.push({ - path: '/isps/infoSearch', - name: 'isps-infoSearch', - }); - } - }, - loadList (arg){ - if(arg===1){ - this.ipagination.current = 1; - } - var params = this.getQueryParams();//鏌ヨ鏉′欢 - getAction(this.url.list,params).then((res)=>{ - console.log("dsdsd",res.result) - this.dataSource1 = res.result.data1; - this.dataSource2 = res.result.data2; - this.ipagination.total = 5; - }); - }, - getQueryParams(){ - var param = {flowStatus:"-3"}; - param.pageNo = this.ipagination.current; - param.pageSize = this.ipagination.pageSize; - return filterObj(param); - }, - formatRespectiveHoldCert(value){ - return (value=="1"||eval(value))?"鏄�":"鍚�" - }, - formatCertFormat(value){ - if(value=="1"){ - return "鍗曚竴鐗�" - }else if(value=="2"){ - return "闆嗘垚鐗�" - }else{ - return value; - } - }, - getFlowRateNumber(value){ - return Number(value) - }, - getFlowPercent(record){ - if(record.flowStatus=="3"){ - return 100 - }else if(record.flowStatus=="0"){ - return 0 - }else{ - return record.flowRate - } - }, - getFlowStatus(status){ - if(status=="4"){ - return "exception"; - }else if(status=="0"){ - return "normal"; - }else if(status=="3"){ - return "success"; - }else{ - return "active"; - } - - }, - queryCount(){ - getAction(this.url.analysis).then((res)=>{ - if(res.success){ - this.cardCount = res.result - } - console.log(res); - }); - }, - - loadDiskInfo(){ - getAction(this.url.queryDiskInfo).then((res)=>{ - if(res.success){ - console.log(res.result) - let one=0,two=""; - for(let a in res.result){ - let tempNum = Number(res.result[a].max) - if(tempNum>one){ - one = tempNum - two = res.result[a].name - } - } - let 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,two2=""; - for(let a in res.result){ - if(res.result[a].name == two){ - continue; - } - let tempNum = Number(res.result[a].max) - if(tempNum>one2){ - one2 = tempNum - two2 = res.result[a].name - } - } - let one2Item = res.result.filter((item)=>{return item.name == two2})[0] - one2Item.restPPT = one2Item.restPPT/10 - this.diskInfo.push(one2Item); - } - - }else{ - console.log(res.message) - } - }) - }, - loadChartData(){ - getAction(this.url.countSll).then((res)=>{ - if(res.success){ - let map = res.result; - for(var key in map){ - let dataStr = key; - let value = map[key]; - let today = moment(new Date()).format('YYYY-MM-DD'); - if(dataStr == today){ - this.todaySll = map[today]; - } - this.chartData.sll.push({ - x: dataStr, - y: value - }); - } - } - - }), - getAction(this.url.countBjl).then((res)=>{ - if(res.success){ - let map = res.result; - for(var key in map){ - let dataStr = key; - let value = map[key]; - let today = moment(new Date()).format('YYYY-MM-DD'); - if(dataStr == today){ - this.todayBjl = map[today]; - } - this.chartData.bjl.push({ - x: dataStr, - y: value - }); - } - } - }), - getAction(this.url.countISll).then((res)=>{ - if(res.success){ - let map = res.result; - for(var key in map){ - let dataStr = key; - let value = map[key]; - let today = moment(new Date()).format('YYYY-MM-DD'); - if(dataStr == today){ - this.todayISll = map[today]; - } - this.chartData.isll.push({ - x: key, - y: value - }); - } - } - }), - getAction(this.url.countIBjl).then((res)=>{ - if(res.success){ - let map = res.result; - for(var key in map){ - let dataStr = key; - let value = map[key]; - let today = moment(new Date()).format('YYYY-MM-DD'); - if(dataStr == today){ - this.todayIBjl = map[today]; - } - this.chartData.ibjl.push({ - x: key, - y: value - }); - } - } - }) - } - }, - created() { - this.loadDiskInfo() - this.queryCount(); - this.loadChartData(); - this.loadList(1); - setTimeout(() => { - this.loading = !this.loading - }, 1000) - } - } -</script> - -<style lang="less" scoped> - .extra-wrapper { - line-height: 55px; - padding-right: 24px; - - .extra-item { - display: inline-block; - margin-right: 24px; - - a { - margin-left: 24px; - } - } - } - - .item-group { - padding: 20px 0 8px 24px; - font-size: 0; - a { - color: rgba(0, 0, 0, 0.65); - display: inline-block; - font-size: 14px; - margin-bottom: 13px; - width: 25%; - } - } - - .item-group { - .more-btn { - margin-bottom: 13px; - text-align: center; - } - } - - .list-content-item { - color: rgba(0, 0, 0, .45); - display: inline-block; - vertical-align: middle; - font-size: 14px; - margin-left: 40px; - } - - @media only screen and (min-width: 1600px) { - .list-content-item{ - margin-left:60px; - } - } - - @media only screen and (max-width: 1300px) { - .list-content-item{ - margin-left:20px; - } - .width-hidden4{ - display:none - } - } - .list-content-item{ - span{line-height: 20px;} - } - .list-content-item{ - p{margin-top: 4px;margin-bottom:0;line-height:22px;} - } - .anty-list-cust { - .ant-list-item-meta{flex: 0.3 !important;} - } - .anty-list-cust { - .ant-list-item-content{flex:1 !important; justify-content:flex-start !important;margin-left: 20px;} - } - - -</style> \ No newline at end of file diff --git a/src/views/jeecg/report/ArchivesStatisticst.vue b/src/views/jeecg/report/ArchivesStatisticst.vue deleted file mode 100644 index e9c0e46..0000000 --- a/src/views/jeecg/report/ArchivesStatisticst.vue +++ /dev/null @@ -1,315 +0,0 @@ -<template> - <a-card :bordered="false"> - <a-tabs defaultActiveKey="1" @change="callback"> - <a-tab-pane tab="鏌辩姸鍥�" key="1"> - <a-row> - <a-col :span="10"> - <a-radio-group :value="barType" @change="statisticst"> - <a-radio-button value="year">鎸夊勾缁熻</a-radio-button> - <a-radio-button value="month">鎸夋湀缁熻</a-radio-button> - <a-radio-button value="category">鎸夌被鍒粺璁�</a-radio-button> - <a-radio-button value="cabinet">鎸夋煖鍙风粺璁�</a-radio-button> - </a-radio-group> - </a-col> - <a-col :span="14"> - <a-form v-if="barType === 'month' && false" layout="inline" style="margin-top: -4px"> - <a-form-item label="鏈堜唤鍖洪棿"> - <a-range-picker - :placeholder="['寮�濮嬫湀浠�', '缁撴潫鏈堜唤']" - format="YYYY-MM" - :value="barValue" - :mode="barDate" - @panelChange="handleBarDate"/> - </a-form-item> - <a-button style="margin-top: 2px" type="primary" icon="search" @click="queryDatebar">鏌ヨ</a-button> - <a-button style="margin-top: 2px;margin-left: 8px" type="primary" icon="reload" @click="searchReset">閲嶇疆</a-button> - </a-form> - </a-col> - <bar class="statistic" title="妗f缁熻" :dataSource="countSource" :height="400"/> - </a-row> - </a-tab-pane> - - <a-tab-pane tab="楗肩姸鍥�" key="2"> - <a-row :gutter="24"> - <a-col :span="10"> - <a-radio-group :value="pieType" @change="statisticst"> - <a-radio-button value="year">鎸夊勾缁熻</a-radio-button> - <a-radio-button value="month">鎸夋湀缁熻</a-radio-button> - <a-radio-button value="category">鎸夌被鍒粺璁�</a-radio-button> - <a-radio-button value="cabinet">鎸夋煖鍙风粺璁�</a-radio-button> - </a-radio-group> - </a-col> - <a-col :span="14"> - <a-form v-if="pieType === 'month' && false" layout="inline" style="margin-top: -4px"> - <a-row :gutter="24"> - <a-form-item label="鏈堜唤鍖洪棿"> - <a-range-picker - :placeholder="['寮�濮嬫湀浠�', '缁撴潫鏈堜唤']" - format="YYYY-MM" - :value="pieValue" - :mode="pieDate" - @panelChange="handlePieDate"/> - </a-form-item> - <a-button style="margin-top: 2px" type="primary" icon="search" @click="queryDatepie">鏌ヨ</a-button> - <a-button style="margin-top: 2px;margin-left: 8px" type="primary" icon="reload" @click="searchReset">閲嶇疆</a-button> - </a-row> - </a-form> - </a-col> - <pie class="statistic" title="妗f缁熻" :dataSource="countSource" :height="450"/> - </a-row> - </a-tab-pane> - </a-tabs> - </a-card> -</template> - -<script> - import Bar from '@/components/chart/Bar' - import Pie from '@/components/chart/Pie' - import ACol from 'ant-design-vue/es/grid/Col' - import { getAction } from '@/api/manage' - - export default { - name: 'ArchivesStatisticst', - components: { - ACol, - Bar, - Pie - }, - data() { - return { - description: '妗f缁熻椤甸潰', - // 鏌ヨ鏉′欢 - queryParam: {}, - // 鏁版嵁闆� - countSource: [], - // 鏌辩姸鍥� - barType: 'year', - barDate: ['month', 'month'], - barValue: [], - // 楗肩姸鍥� - pieType: 'year', - pieDate: ['month', 'month'], - pieValue: [], - // 缁熻鍥剧被鍨� - tabStatus:"bar", - url: { - getYearCountInfo: "/mock/api/report/getYearCountInfo", - getMonthCountInfo:"/mock/api/report/getMonthCountInfo", - getCntrNoCountInfo:"/mock/api/report/getCntrNoCountInfo", - getCabinetCountInfo:"/mock/api/report/getCabinetCountInfo", - }, - } - }, - created() { - let url = this.url.getYearCountInfo; - this.loadDate(url,'year',{}); - }, - methods: { - loadDate(url,type,param) { - getAction(url,param,'get').then((res) => { - if (res.success) { - this.countSource = []; - if(type === 'year'){ - this.getYearCountSource(res.result); - } - if(type === 'month'){ - this.getMonthCountSource(res.result); - } - if(type === 'category'){ - this.getCategoryCountSource(res.result); - } - if(type === 'cabinet'){ - this.getCabinetCountSource(res.result); - } - }else{ - var that=this; - that.$message.warning(res.message); - } - }) - }, - getYearCountSource(data){ - for (let i = 0; i < data.length; i++) { - if(this.tabStatus === "bar"){ - this.countSource.push({ - x: `${data[i].year}骞碻, - y: data[i].yearcount - }) - }else{ - this.countSource.push({ - item: `${data[i].year}骞碻, - count:data[i].yearcount - }) - } - } - }, - getMonthCountSource(data){ - for (let i = 0; i < data.length; i++) { - if(this.tabStatus === "bar"){ - this.countSource.push({ - x: data[i].month, - y: data[i].monthcount - }) - }else{ - this.countSource.push({ - item: data[i].month, - count:data[i].monthcount - }) - } - } - }, - getCategoryCountSource(data){ - for (let i = 0; i < data.length; i++) { - if(this.tabStatus ==="bar"){ - this.countSource.push({ - x: data[i].classifyname, - y: data[i].cntrnocount - }) - }else{ - this.countSource.push({ - item: data[i].classifyname, - count:data[i].cntrnocount - }) - } - } - }, - getCabinetCountSource(data){ - for (let i = 0; i < data.length; i++) { - if(this.tabStatus === "bar"){ - this.countSource.push({ - x: data[i].cabinetname, - y: data[i].cabinetcocunt - }) - }else{ - this.countSource.push({ - item: data[i].cabinetname, - count:data[i].cabinetcocunt - }) - } - } - }, - // 閫夋嫨缁熻鍥剧被鍒� - callback(key) { - if(key === "1"){ - this.tabStatus = "bar"; - this.queryDatebar(); - }else{ - this.tabStatus = "pie"; - this.queryDatepie(); - } - }, - // 閫夋嫨缁熻绫诲埆 - statisticst(e) { - if(this.tabStatus === "pie"){ - this.pieType = e.target.value; - this.queryDatepie(); - }else{ - this.barType = e.target.value; - this.queryDatebar(); - } - }, - // 鎸夋湀浠芥煡璇� - queryDatebar(){ - if(this.barValue.length>0){ - this.getUrl(this.barType,{startTime:this.barValue[0]._d,endTime:this.barValue[1]._d}); - }else{ - this.getUrl(this.barType,{}); - } - }, - queryDatepie(){ - if(this.pieValue.length>0){ - this.getUrl(this.pieType,{startTime:this.pieValue[0]._d,endTime:this.pieValue[1]._d}); - }else{ - this.getUrl(this.pieType,{}); - } - }, - searchReset(){ - console.log(this.tabStatus); - if(this.tabStatus === "pie"){ - this.pieValue = []; - }else{ - this.barValue = []; - } - this.getUrl(this.barType,{}); - }, - // 閫夋嫨璇锋眰url - getUrl(type,param){ - let url = ""; - if(type === 'year'){ - url = this.url.getYearCountInfo; - } - if(type === 'month'){ - url = this.url.getMonthCountInfo; - } - if(type === 'category'){ - url = this.url.getCntrNoCountInfo; - } - if(type === 'cabinet'){ - url = this.url.getCabinetCountInfo; - } - this.loadDate(url,type,param); - }, - // 閫夋嫨鏈堜唤鏃ユ湡 - handleBarDate(value, mode) { - this.barValue = value - this.barDate = [ - mode[0] === 'date' ? 'month' : mode[0], - mode[1] === 'date' ? 'month' : mode[1] - ] - }, - handlePieDate(value, mode) { - this.pieValue = value - this.pieDate = [ - mode[0] === 'date' ? 'month' : mode[0], - mode[1] === 'date' ? 'month' : mode[1] - ] - }, - } - } -</script> -<style scoped> - .ant-card-body .table-operator { - margin-bottom: 18px; - } - - .ant-table-tbody .ant-table-row td { - padding-top: 15px; - padding-bottom: 15px; - } - - .anty-row-operator button { - margin: 0 5px - } - - .ant-btn-danger { - background-color: #ffffff - } - - .ant-modal-cust-warp { - height: 100% - } - - .ant-modal-cust-warp .ant-modal-body { - height: calc(100% - 110px) !important; - overflow-y: auto - } - - .ant-modal-cust-warp .ant-modal-content { - height: 90% !important; - overflow-y: hidden - } - - .statistic { - padding: 0px !important; - margin-top: 50px; - } - - .statistic h4 { - margin-bottom: 20px; - text-align: center !important; - font-size: 24px !important;; - } - - .statistic #canvas_1 { - width: 100% !important; - } -</style> \ No newline at end of file diff --git a/src/views/jeecg/report/ViserChartDemo.vue b/src/views/jeecg/report/ViserChartDemo.vue deleted file mode 100644 index 63ee4fb..0000000 --- a/src/views/jeecg/report/ViserChartDemo.vue +++ /dev/null @@ -1,141 +0,0 @@ -<template> - <a-card :bordered="false"> - <a-tabs defaultActiveKey="1"> - <!-- 鏌辩姸鍥� --> - <a-tab-pane tab="鏌辩姸鍥�" key="1"> - <bar title="閿�鍞鎺掕" :dataSource="barData" :height="height"/> - </a-tab-pane> - <!-- 澶氬垪鏌辩姸鍥� --> - <a-tab-pane tab="澶氬垪鏌辩姸鍥�" key="2"> - <bar-multid title="澶氬垪鏌辩姸鍥�" :height="height"/> - </a-tab-pane> - <!-- 杩蜂綘鏌辩姸鍥� --> - <a-tab-pane tab="杩蜂綘鏌辩姸鍥�" key="3"> - <mini-bar :dataSource="barData" :width="400" :height="200"/> - </a-tab-pane> - <!-- 闈㈢Н鍥� --> - <a-tab-pane tab="闈㈢Н鍥�" key="4"> - <area-chart-ty title="閿�鍞鎺掕" :dataSource="areaData" x="鏈堜唤" y="閿�鍞" :height="height"/> - </a-tab-pane> - <!-- 杩蜂綘闈㈢Н鍥� --> - <a-tab-pane tab="杩蜂綘闈㈢Н鍥�" key="5"> - <div style="padding-top: 100px;width:600px;height:200px"> - <mini-area :dataSource="areaData" x="鏈堜唤" y="閿�鍞" :height="height"/> - </div> - </a-tab-pane> - <!-- 澶氳鎶樼嚎鍥� --> - <a-tab-pane tab="澶氳鎶樼嚎鍥�" key="6"> - <line-chart-multid title="澶氳鎶樼嚎鍥�" :height="height"/> - </a-tab-pane> - <!-- 楗煎浘 --> - <a-tab-pane tab="楗煎浘" key="7"> - <pie title="楗煎浘" :height="height"/> - </a-tab-pane> - <!-- 闆疯揪鍥� --> - <a-tab-pane tab="闆疯揪鍥�" key="8"> - <radar title="闆疯揪鍥�" :height="height"/> - </a-tab-pane> - <!-- 浠〃鐩� --> - <a-tab-pane tab="浠〃鐩�" key="9"> - <dash-chart-demo title="浠〃鐩�" :value="9" :height="height"/> - </a-tab-pane> - <!-- 杩涘害鏉� --> - <a-tab-pane tab="杩涘害鏉�" key="10"> - <mini-progress :percentage="30" :target="40" :height="30"/> - <mini-progress :percentage="51" :target="60" :height="30" color="#FFA500"/> - <mini-progress :percentage="66" :target="80" :height="30" color="#1E90FF"/> - <mini-progress :percentage="74" :target="70" :height="30" color="#FF4500"/> - <mini-progress :percentage="92" :target="100" :height="30" color="#49CC49"/> - </a-tab-pane> - <!-- 鎺掑悕鍒楄〃 --> - <a-tab-pane tab="鎺掑悕鍒楄〃" key="11"> - <rank-list title="闂ㄥ簵閿�鍞帓琛屾" :list="rankList" style="width: 600px;margin: 0 auto;"/> - </a-tab-pane> - <!-- TransferBar --> - <a-tab-pane tab="TransferBar" key="12"> - <transfer-bar title="骞村害娑堣�楁祦閲忎竴瑙堣〃" :data="barData" x="鏈堜唤" y="娴侀噺(Mb)" :height="height"/> - </a-tab-pane> - <!-- Trend --> - <a-tab-pane tab="Trend" key="13"> - <trend title="Trend" term="Trend锛�" :percentage="30"/> - </a-tab-pane> - <!-- Liquid --> - <a-tab-pane tab="Liquid" key="14"> - <liquid :height="height"/> - </a-tab-pane> - <!-- BarAndLine --> - <a-tab-pane tab="BarAndLine" key="15"> - <bar-and-line :height="height"/> - </a-tab-pane> - </a-tabs> - </a-card> -</template> - -<script> - import AreaChartTy from '@/components/chart/AreaChartTy' - import Bar from '@/components/chart/Bar' - import BarMultid from '@/components/chart/BarMultid' - import DashChartDemo from '@/components/chart/DashChartDemo' - import LineChartMultid from '@/components/chart/LineChartMultid' - import Liquid from '@/components/chart/Liquid' - import MiniBar from '@/components/chart/MiniBar' - import MiniArea from '@/components/chart/MiniArea' - import MiniProgress from '@/components/chart/MiniProgress' - import Pie from '@/components/chart/Pie' - import Radar from '@/components/chart/Radar' - import RankList from '@/components/chart/RankList' - import TransferBar from '@/components/chart/TransferBar' - import Trend from '@/components/chart/Trend' - import BarAndLine from '@/components/chart/BarAndLine' - - export default { - name: 'ViserChartDemo', - components: { - Bar, MiniBar, BarMultid, AreaChartTy, LineChartMultid, - Pie, Radar, DashChartDemo, MiniProgress, RankList, - TransferBar, Trend, Liquid, MiniArea, BarAndLine - }, - data() { - return { - height: 420, - rankList: [], - barData: [], - areaData: [] - } - }, - created() { - setTimeout(() => { - this.loadBarData() - this.loadAreaData() - this.loadRankListData() - }, 100) - }, - methods: { - loadData(x, y, max, min, before = '', after = '鏈�') { - let data = [] - for (let i = 0; i < 12; i += 1) { - data.push({ - [x]: `${before}${i + 1}${after}`, - [y]: Math.floor(Math.random() * max) + min - }) - } - return data - }, - // 鍔犺浇鏌辩姸鍥炬暟鎹� - loadBarData() { - this.barData = this.loadData('x', 'y', 1000, 200) - }, - // 鍔犺浇AreaChartTy鐨勬暟鎹� - loadAreaData() { - this.areaData = this.loadData('x', 'y', 500, 100) - }, - loadRankListData() { - this.rankList = this.loadData('name', 'total', 2000, 100, '鍖椾含鏈濋槼 ', ' 鍙峰簵') - } - } - } -</script> - -<style scoped> - -</style> diff --git a/src/views/jeecg/tablist/JeecgOrderCustomerList.vue b/src/views/jeecg/tablist/JeecgOrderCustomerList.vue deleted file mode 100644 index dd9cbd9..0000000 --- a/src/views/jeecg/tablist/JeecgOrderCustomerList.vue +++ /dev/null @@ -1,166 +0,0 @@ -<template> - <a-card :bordered="false"> - - <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> - <div class="table-operator" :md="24" :sm="24" style="margin: -25px 0px 10px 0px"> - <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button> - - <a-dropdown v-if="selectedRowKeys.length > 0"> - <a-menu slot="overlay"> - <a-menu-item key="1" @click="batchDel"> - <a-icon type="delete"/> - 鍒犻櫎 - </a-menu-item> - </a-menu> - <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 - <a-icon type="down"/> - </a-button> - </a-dropdown> - </div> - - <!-- table鍖哄煙-begin --> - <div> - <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> - <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤� - <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a> - </div> - - <a-table - ref="table" - size="middle" - bordered - rowKey="id" - :columns="columns" - :dataSource="dataSource" - :pagination="ipagination" - :loading="loading" - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" - @change="handleTableChange"> - - <span slot="action" slot-scope="text, record"> - <a @click="handleEdit(record)">缂栬緫</a> - <a-divider type="vertical"/> - <a-dropdown> - <a class="ant-dropdown-link"> - 鏇村 <a-icon type="down"/> - </a> - <a-menu slot="overlay"> - <a-menu-item> - <a href="javascript:;" @click="handleDetail(record)">璇︽儏</a> - </a-menu-item> - <a-menu-item> - <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> - <a>鍒犻櫎</a> - </a-popconfirm> - </a-menu-item> - </a-menu> - </a-dropdown> - </span> - </a-table> - </div> - <!-- table鍖哄煙-end --> - <!-- 琛ㄥ崟鍖哄煙 --> - <jeecgOrderCustomer-modal ref="modalForm" @ok="modalFormOk"></jeecgOrderCustomer-modal> - </a-card> -</template> - -<script> - import JeecgOrderCustomerModal from './form/JeecgOrderCustomerModal' - import JeecgOrderDMainList from './JeecgOrderDMainList' - import {JeecgListMixin} from '@/mixins/JeecgListMixin' - import {getAction} from '@/api/manage' - - export default { - name: "JeecgOrderCustomerList", - mixins: [JeecgListMixin], - components: { - JeecgOrderDMainList, - JeecgOrderCustomerModal - }, - data() { - return { - description: '璁㈠崟瀹㈡埛淇℃伅', - // 琛ㄥご - columns: [ - { - title: '瀹㈡埛鍚�', - align: "center", - width: 100, - dataIndex: 'name', - key: 'name', - }, - { - title: '鎬у埆', - align: "center", - dataIndex: 'sex', - customRender: function (text) { - if (text == 1) { - return "鐢�"; - } else if (text == 2) { - return "濂�"; - } else { - return text; - } - } - }, - { - title: '韬唤璇佸彿鐮�', - align: "center", - dataIndex: 'idcard', - }, - { - title: '鐢佃瘽', - dataIndex: 'telphone', - align: "center", - }, - { - title: '鎿嶄綔', - key: 'operation', - align: 'center', - width: 130, - scopedSlots: {customRender: 'action'}, - }, - ], - url: { - list: "/test/order/listOrderCustomerByMainId", - delete: "/test/order/deleteCustomer", - deleteBatch: "/test/order/deleteBatchCustomer", - } - } - }, - methods: { - loadData(arg) { - if (arg === 1) { - this.ipagination.current = 1; - } - //update-begin--Author:kangxiaolin Date:20190905 for锛歔442]涓诲瓙琛ㄥ垎寮�缁存姢锛岀敓鎴愮殑浠g爜瀛愯〃鐨勫垎椤垫敼涓虹湡瀹炵殑鍒嗛〉-------------------- - var params = this.getQueryParams(); - getAction(this.url.list, {orderId: params.mainId, pageNo : this.ipagination.current, - pageSize :this.ipagination.pageSize}).then((res) => { - if (res.success) { - this.dataSource = res.result.records; - this.ipagination.total = res.result.total; - } else { - this.dataSource = null; - } - }) - //update-end--Author:kangxiaolin Date:20190905 for锛歔442]涓诲瓙琛ㄥ垎寮�缁存姢锛岀敓鎴愮殑浠g爜瀛愯〃鐨勫垎椤垫敼涓虹湡瀹炵殑鍒嗛〉-------------------- - - }, - getOrderMain(orderId) { - this.queryParam.mainId = orderId; - this.loadData(1); - }, - handleAdd: function () { - this.$refs.modalForm.add(this.queryParam.mainId); - this.$refs.modalForm.title = "娣诲姞瀹㈡埛淇℃伅"; - }, - } - } -</script> -<style scoped> - .ant-card { - margin-left: -30px; - margin-right: -30px; - } -</style> \ No newline at end of file diff --git a/src/views/jeecg/tablist/JeecgOrderDMainList.vue b/src/views/jeecg/tablist/JeecgOrderDMainList.vue deleted file mode 100644 index 252f2ed..0000000 --- a/src/views/jeecg/tablist/JeecgOrderDMainList.vue +++ /dev/null @@ -1,284 +0,0 @@ -<template> - <a-card :bordered="false"> - - <!-- 鏌ヨ鍖哄煙 --> - <div class="table-page-search-wrapper"> - <a-form layout="inline"> - <a-row :gutter="24"> - - <a-col :md="6" :sm="24"> - <a-form-item label="璁㈠崟鍙�"> - <a-input placeholder="璇疯緭鍏ヨ鍗曞彿" v-model="queryParam.orderCode"></a-input> - </a-form-item> - </a-col> - <a-col :md="6" :sm="24"> - <a-form-item label="璁㈠崟绫诲瀷"> - <a-select placeholder="璇疯緭鍏ヨ鍗曠被鍨�" v-model="queryParam.ctype"> - <a-select-option value="1">鍥藉唴璁㈠崟</a-select-option> - <a-select-option value="2">鍥介檯璁㈠崟</a-select-option> - </a-select> - </a-form-item> - </a-col> - - <a-col :md="6" :sm="24"> - <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> - <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> - <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button> - </span> - </a-col> - - </a-row> - </a-form> - </div> - - - <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> - <div class="table-operator"> - <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button> - - <a-dropdown v-if="selectedRowKeys.length > 0"> - <a-menu slot="overlay"> - <a-menu-item key="1" @click="batchDel"> - <a-icon type="delete"/> - 鍒犻櫎 - </a-menu-item> - </a-menu> - <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 - <a-icon type="down"/> - </a-button> - </a-dropdown> - </div> - - <!-- table鍖哄煙-begin --> - <div> - <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> - <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤� - <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a> - </div> - - <a-table - ref="table" - size="middle" - bordered - rowKey="id" - filterMultiple="filterMultiple" - :columns="columns" - :dataSource="dataSource" - :pagination="ipagination" - :loading="loading" - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:type}" - @change="handleTableChange" - :customRow="clickThenCheck" - > - - <span slot="action" slot-scope="text, record"> - <a @click="handleEdit(record)">缂栬緫</a> - <a-divider type="vertical"/> - <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> - <a>鍒犻櫎</a> - </a-popconfirm> - </span> - - </a-table> - </div> - <!-- table鍖哄煙-end --> - - <a-tabs defaultActiveKey="1"> - <a-tab-pane tab="瀹㈡埛淇℃伅" key="1"> - <Jeecg-Order-Customer-List ref="JeecgOrderCustomerList"></Jeecg-Order-Customer-List> - </a-tab-pane> - <a-tab-pane tab="鏈虹エ淇℃伅" key="2" forceRender> - <Jeecg-Order-Ticket-List ref="JeecgOrderTicketList"></Jeecg-Order-Ticket-List> - </a-tab-pane> - </a-tabs> - - <!-- 琛ㄥ崟鍖哄煙 --> - <jeecgOrderDMain-modal ref="modalForm" @ok="modalFormOk"></jeecgOrderDMain-modal> - - </a-card> -</template> - -<script> - import JeecgOrderDMainModal from './form/JeecgOrderDMainModal' - import JeecgOrderCustomerList from './JeecgOrderCustomerList' - import JeecgOrderTicketList from './JeecgOrderTicketList' - import {deleteAction} from '@/api/manage' - import JeecgOrderCustomerModal from './form/JeecgOrderCustomerModal' - import JeecgOrderTicketModal from './form/JeecgOrderTicketModal' - import {JeecgListMixin} from '@/mixins/JeecgListMixin' - - export default { - name: "JeecgOrderDMainList", - mixins: [JeecgListMixin], - components: { - JeecgOrderTicketModal, - JeecgOrderCustomerModal, - JeecgOrderDMainModal, - JeecgOrderCustomerList, - JeecgOrderTicketList, - }, - data() { - return { - description: '璁㈠崟绠$悊椤甸潰', - /* 鍒嗛〉鍙傛暟 */ - ipagination:{ - current: 1, - pageSize: 5, - pageSizeOptions: ['5', '10', '20'], - showTotal: (total, range) => { - return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�" - }, - showQuickJumper: true, - showSizeChanger: true, - total: 0 - }, - // 琛ㄥご - columns: [{ - title: '#', - dataIndex: '', - key: 'rowIndex', - width: 60, - align: "center", - customRender: function (t, r, index) { - return parseInt(index) + 1; - } - }, - { - title: '璁㈠崟鍙�', - align: "center", - dataIndex: 'orderCode' - }, - { - title: '璁㈠崟绫诲瀷', - align: "center", - dataIndex: 'ctype', - customRender: (text) => { - let re = ""; - if (text === '1') { - re = "鍥藉唴璁㈠崟"; - } else if (text === '2') { - re = "鍥介檯璁㈠崟"; - } - return re; - } - }, - { - title: '璁㈠崟鏃ユ湡', - align: "center", - dataIndex: 'orderDate' - }, - { - title: '璁㈠崟閲戦', - align: "center", - dataIndex: 'orderMoney' - }, - { - title: '璁㈠崟澶囨敞', - align: "center", - dataIndex: 'content' - }, - { - title: '鎿嶄綔', - dataIndex: 'action', - align: "center", - scopedSlots: {customRender: 'action'}, - }], - // 鍒嗛〉鍙傛暟 - type: "radio", - url: { - list: "/test/order/orderList", - delete: "/test/order/delete", - deleteBatch: "/test/order/deleteBatch", - }, - } - }, - methods: { - clickThenCheck(record) { - return { - on: { - click: () => { - this.onSelectChange(record.id.split(","), [record]); - } - } - }; - }, - onSelectChange(selectedRowKeys, selectionRows) { - this.selectedRowKeys = selectedRowKeys; - this.selectionRows = selectionRows; - this.$refs.JeecgOrderCustomerList.getOrderMain(this.selectedRowKeys[0]); - this.$refs.JeecgOrderTicketList.getOrderMain(this.selectedRowKeys[0]); - }, - onClearSelected() { - this.selectedRowKeys = []; - this.selectionRows = []; - this.$refs.JeecgOrderCustomerList.queryParam.mainId = null; - this.$refs.JeecgOrderTicketList.queryParam.mainId = null; - this.$refs.JeecgOrderCustomerList.loadData(); - this.$refs.JeecgOrderTicketList.loadData(); - this.$refs.JeecgOrderCustomerList.selectedRowKeys = []; - this.$refs.JeecgOrderCustomerList.selectionRows = []; - this.$refs.JeecgOrderTicketList.selectedRowKeys = []; - this.$refs.JeecgOrderTicketList.selectionRows = []; - }, - - handleDelete: function (id) { - var that = this; - deleteAction(that.url.delete, {id: id}).then((res) => { - if (res.success) { - that.$message.success(res.message); - that.loadData(); - this.$refs.JeecgOrderCustomerList.loadData(); - this.$refs.JeecgOrderTicketList.loadData(); - } else { - that.$message.warning(res.message); - } - }); - }, - searchQuery:function(){ - this.selectedRowKeys = []; - this.selectionRows = []; - this.$refs.JeecgOrderCustomerList.queryParam.mainId = null; - this.$refs.JeecgOrderTicketList.queryParam.mainId = null; - this.$refs.JeecgOrderCustomerList.loadData(); - this.$refs.JeecgOrderTicketList.loadData(); - this.$refs.JeecgOrderCustomerList.selectedRowKeys = []; - this.$refs.JeecgOrderCustomerList.selectionRows = []; - this.$refs.JeecgOrderTicketList.selectedRowKeys = []; - this.$refs.JeecgOrderTicketList.selectionRows = []; - this.loadData(); - } - } - } -</script> -<style scoped> - .ant-card-body .table-operator { - margin-bottom: 18px; - } - - .ant-table-tbody .ant-table-row td { - padding-top: 15px; - padding-bottom: 15px; - } - - .anty-row-operator button { - margin: 0 5px - } - - .ant-btn-danger { - background-color: #ffffff - } - - .ant-modal-cust-warp { - height: 100% - } - - .ant-modal-cust-warp .ant-modal-body { - height: calc(100% - 110px) !important; - overflow-y: auto - } - - .ant-modal-cust-warp .ant-modal-content { - height: 90% !important; - overflow-y: hidden - } -</style> \ No newline at end of file diff --git a/src/views/jeecg/tablist/JeecgOrderTicketList.vue b/src/views/jeecg/tablist/JeecgOrderTicketList.vue deleted file mode 100644 index 2d1e645..0000000 --- a/src/views/jeecg/tablist/JeecgOrderTicketList.vue +++ /dev/null @@ -1,154 +0,0 @@ -<template> - <a-card :bordered="false"> - - <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> - <div class="table-operator" :md="24" :sm="24" style="margin: -25px 0px 10px 2px"> - <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button> - - <a-dropdown v-if="selectedRowKeys.length > 0"> - <a-menu slot="overlay"> - <a-menu-item key="1" @click="batchDel"> - <a-icon type="delete"/> - 鍒犻櫎 - </a-menu-item> - </a-menu> - <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 - <a-icon type="down"/> - </a-button> - </a-dropdown> - </div> - - <!-- table鍖哄煙-begin --> - <div> - <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> - <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤� - <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a> - </div> - - <a-table - ref="table" - size="middle" - bordered - rowKey="id" - :columns="columns" - :dataSource="dataSource" - :pagination="ipagination" - :loading="loading" - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" - @change="handleTableChange"> - - <span slot="action" slot-scope="text, record"> - <a @click="handleEdit(record)">缂栬緫</a> - <a-divider type="vertical"/> - <a-dropdown> - <a class="ant-dropdown-link"> - 鏇村 <a-icon type="down"/> - </a> - <a-menu slot="overlay"> - <a-menu-item> - <a href="javascript:;" @click="handleDetail(record)">璇︽儏</a> - </a-menu-item> - - <a-menu-item> - <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> - <a>鍒犻櫎</a> - </a-popconfirm> - </a-menu-item> - </a-menu> - </a-dropdown> - </span> - - </a-table> - </div> - <!-- table鍖哄煙-end --> - - <!-- 琛ㄥ崟鍖哄煙 --> - <JeecgOrderTicket-modal ref="modalForm" @ok="modalFormOk"></JeecgOrderTicket-modal> - </a-card> -</template> - -<script> - import JeecgOrderTicketModal from './form/JeecgOrderTicketModal' - import {JeecgListMixin} from '@/mixins/JeecgListMixin' - import {getAction} from '@/api/manage' - - export default { - name: "JeecgOrderTicketList", - mixins: [JeecgListMixin], - components: { - JeecgOrderTicketModal, - }, - data() { - return { - description: '鏈虹エ淇℃伅', - // 琛ㄥご - columns: [{ - title: '鑸彮鍙�', - align: "center", - dataIndex: 'ticketCode' - }, { - title: '鑸彮鏃堕棿', - align: "center", - dataIndex: 'tickectDate' - }, { - title: '璁㈠崟鍙风爜', - align: "center", - dataIndex: 'orderId', - }, { - title: '鍒涘缓浜�', - align: "center", - dataIndex: 'createBy' - }, { - title: '鍒涘缓鏃堕棿', - align: "center", - dataIndex: 'createTime', - sorter: true - }, { - title: '鎿嶄綔', - key: 'operation', - align: "center", - width: 130, - scopedSlots: {customRender: 'action'}, - }], - url: { - list: "/test/order/listOrderTicketByMainId", - delete: "/test/order/deleteTicket", - deleteBatch: "/test/order/deleteBatchTicket", - } - } - }, - methods: { - loadData(arg) { - if (arg === 1) { - this.ipagination.current = 1; - } - var params = this.getQueryParams(); - //update-begin--Author:kangxiaolin Date:20190905 for锛歔442]涓诲瓙琛ㄥ垎寮�缁存姢锛岀敓鎴愮殑浠g爜瀛愯〃鐨勫垎椤垫敼涓虹湡瀹炵殑鍒嗛〉-------------------- - getAction(this.url.list, {orderId: params.mainId ,pageNo : this.ipagination.current, - pageSize :this.ipagination.pageSize}).then((res) => { - if (res.success) { - this.dataSource = res.result.records; - this.ipagination.total = res.result.total; - } else { - this.dataSource = null; - } - }) - //update-end--Author:kangxiaolin Date:20190905 for锛歔442]涓诲瓙琛ㄥ垎寮�缁存姢锛岀敓鎴愮殑浠g爜瀛愯〃鐨勫垎椤垫敼涓虹湡瀹炵殑鍒嗛〉-------------------- - }, - getOrderMain(orderId) { - this.queryParam.mainId = orderId; - this.loadData(1); - }, - handleAdd: function () { - this.$refs.modalForm.add(this.queryParam.mainId); - this.$refs.modalForm.title = "娣诲姞鏈虹エ淇℃伅"; - }, - } - } -</script> -<style scoped> - .ant-card { - margin-left: -30px; - margin-right: -30px; - } -</style> \ No newline at end of file diff --git a/src/views/jeecg/tablist/form/JeecgOrderCustomerModal.vue b/src/views/jeecg/tablist/form/JeecgOrderCustomerModal.vue deleted file mode 100644 index 04500b5..0000000 --- a/src/views/jeecg/tablist/form/JeecgOrderCustomerModal.vue +++ /dev/null @@ -1,245 +0,0 @@ -<template> - <a-modal - :title="title" - :width="800" - :visible="visible" - :confirmLoading="confirmLoading" - :okButtonProps="{ props: {disabled: disableSubmit} }" - @ok="handleOk" - @cancel="handleCancel" - cancelText="鍏抽棴"> - - <!-- 缂栬緫 --> - <a-spin :spinning="confirmLoading" v-if="editStatus"> - <a-form-model ref="form" :model="model" :rules="validatorRules"> - <a-form-model-item - :labelCol="labelCol" - :wrapperCol="wrapperCol" - label="瀹㈡埛濮撳悕" - prop="name" - required - hasFeedback> - <a-input placeholder="璇疯緭鍏ュ鎴峰鍚�" v-model="model.name" :readOnly="disableSubmit"/> - </a-form-model-item> - <a-form-model-item - :labelCol="labelCol" - :wrapperCol="wrapperCol" - label="鎬у埆" - hasFeedback> - <a-select v-model="model.sex" placeholder="璇烽�夋嫨鎬у埆"> - <a-select-option value="1">鐢锋��</a-select-option> - <a-select-option value="2">濂虫��</a-select-option> - </a-select> - </a-form-model-item> - <a-form-model-item - :labelCol="labelCol" - :wrapperCol="wrapperCol" - label="韬唤璇佸彿鐮�" - prop="idcard" - hasFeedback> - <a-input placeholder="璇疯緭鍏ヨ韩浠借瘉鍙风爜" v-model="model.idcard" :readOnly="disableSubmit"/> - </a-form-model-item> - <a-form-model-item - :labelCol="labelCol" - :wrapperCol="wrapperCol" - label="韬唤璇佹壂鎻忎欢" - hasFeedback> - <j-image-upload text="涓婁紶" v-model="fileList" :isMultiple="true"></j-image-upload> - </a-form-model-item> - <a-form-model-item - :labelCol="labelCol" - :wrapperCol="wrapperCol" - label="鑱旂郴鏂瑰紡" - prop="telphone" - hasFeedback> - <a-input v-model="model.telphone" :readOnly="disableSubmit"/> - </a-form-model-item> - <a-form-model-item - :labelCol="labelCol" - :wrapperCol="wrapperCol" - label="璁㈠崟鍙风爜" - :hidden="hiding" - hasFeedback> - <a-input v-model="model.orderId" disabled="disabled"/> - </a-form-model-item> - </a-form-model> - </a-spin> - </a-modal> -</template> - -<script> - import {httpAction} from '@/api/manage' - import Vue from 'vue' - import {ACCESS_TOKEN} from "@/store/mutation-types" - import JImageUpload from '../../../../components/jeecg/JImageUpload' - - export default { - name: "JeecgOrderCustomerModal", - components: { JImageUpload }, - data() { - return { - title: "鎿嶄綔", - visible: false, - model: {}, - labelCol: { - xs: {span: 24}, - sm: {span: 5}, - }, - wrapperCol: { - xs: {span: 24}, - sm: {span: 16}, - }, - fileList: [], - disableSubmit: false, - selectedRowKeys: [], - orderId: "", - hiding: false, - headers: {}, - picUrl: "", - picArray:[], - previewVisible: false, - previewImage: '', - addStatus: false, - editStatus: false, - confirmLoading: false, - url: { - add: "/test/order/addCustomer", - edit: "/test/order/editCustomer", - fileUpload: window._CONFIG['domianURL'] + "/sys/common/upload", - getOrderCustomerList: "/test/order/listOrderCustomerByMainId", - }, - validatorRules: { - name :[{required: true, message: '璇疯緭鍏ュ鎴峰鍚�!'}], - telphone: [{validator: this.validateMobile}], - idcard: [{validator: this.validateIdCard}] - }, - } - }, - computed: { - uploadAction: function () { - return this.url.fileUpload; - } - }, - created() { - const token = Vue.ls.get(ACCESS_TOKEN); - this.headers = {"X-Access-Token": token} - }, - methods: { - add(orderId) { - this.hiding = true; - if (orderId) { - this.edit({orderId}, ''); - } else { - this.$message.warning("璇烽�夋嫨涓�涓鎴蜂俊鎭�"); - } - }, - detail(record) { - this.edit(record, 'd'); - }, - edit(record, v) { - if (v == 'e') { - this.hiding = false; - this.disableSubmit = false; - } else if (v == 'd') { - this.hiding = false; - this.disableSubmit = true; - } else { - this.hiding = true; - this.disableSubmit = false; - } - - this.model = Object.assign({}, record); - if (record.id) { - this.hiding = false; - this.addStatus = false; - this.editStatus = true; - setTimeout(() => { - this.fileList = record.idcardPic - }, 5) - } else { - this.addStatus = false; - this.editStatus = true; - } - this.visible = true; - }, - close() { - this.$emit('close'); - this.visible = false; - this.picUrl = ""; - this.fileList=[]; - this.$refs.form.resetFields(); - }, - handleOk() { - const that = this; - // 瑙﹀彂琛ㄥ崟楠岃瘉 - this.$refs.form.validate(valid => { - if (valid) { - that.confirmLoading = true; - let httpurl = ''; - let method = ''; - if (!this.model.id) { - httpurl += this.url.add; - method = 'post'; - } else { - httpurl += this.url.edit; - method = 'put'; - } - let formData = Object.assign({}, this.model); - if(this.fileList != '') { - formData.idcardPic = this.fileList; - }else{ - formData.idcardPic = ''; - } - httpAction(httpurl, formData, method).then((res) => { - if (res.success) { - that.$message.success(res.message); - that.$emit('ok'); - } else { - that.$message.warning(res.message); - } - }).finally(() => { - that.confirmLoading = false; - that.close(); - }) - }else{ - return false; - } - }) - }, - handleCancel() { - this.close(); - }, - validateMobile(rule, value, callback) { - 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("鎮ㄧ殑鎵嬫満鍙风爜鏍煎紡涓嶆纭�!"); - } - }, - validateIdCard(rule, value, callback) { - if (!value || new RegExp(/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/).test(value)) { - callback(); - } else { - callback("鎮ㄧ殑韬唤璇佸彿鐮佹牸寮忎笉姝g‘!"); - } - }, - } - } -</script> - -<style scoped> - /* tile uploaded pictures */ - .upload-list-inline > > > .ant-upload-list-item { - float: left; - width: 200px; - margin-right: 8px; - } - - .upload-list-inline > > > .ant-upload-animate-enter { - animation-name: uploadAnimateInlineIn; - } - - .upload-list-inline > > > .ant-upload-animate-leave { - animation-name: uploadAnimateInlineOut; - } -</style> \ No newline at end of file diff --git a/src/views/jeecg/tablist/form/JeecgOrderDMainModal.vue b/src/views/jeecg/tablist/form/JeecgOrderDMainModal.vue deleted file mode 100644 index 4390cbe..0000000 --- a/src/views/jeecg/tablist/form/JeecgOrderDMainModal.vue +++ /dev/null @@ -1,168 +0,0 @@ -<template> - <a-modal - :title="title" - :width="1000" - :visible="visible" - :confirmLoading="confirmLoading" - @ok="handleOk" - @cancel="handleCancel"> - - <a-spin :spinning="confirmLoading"> - <a-form-model ref="form" :model="orderMainModel" :rules="validatorRules"> - <!-- 涓昏〃鍗曞尯鍩� --> - <a-form-model-item - :labelCol="labelCol" - :wrapperCol="wrapperCol" - prop="orderCode" - label="璁㈠崟鍙�" - required - hasFeedback> - <a-input placeholder="璇疯緭鍏ヨ鍗曞彿" v-model="orderMainModel.orderCode" /> - </a-form-model-item> - <a-form-model-item - :labelCol="labelCol" - :wrapperCol="wrapperCol" - label="璁㈠崟绫诲瀷"> - <a-select placeholder="璇疯緭鍏ヨ鍗曠被鍨�" v-model="orderMainModel.ctype"> - <a-select-option value="1">鍥藉唴璁㈠崟</a-select-option> - <a-select-option value="2">鍥介檯璁㈠崟</a-select-option> - </a-select> - </a-form-model-item> - <a-form-model-item - :labelCol="labelCol" - :wrapperCol="wrapperCol" - label="璁㈠崟鏃ユ湡"> - <a-date-picker showTime valueFormat='YYYY-MM-DD HH:mm:ss' v-model="orderMainModel.orderDate"/> - </a-form-model-item> - <a-form-model-item - :labelCol="labelCol" - :wrapperCol="wrapperCol" - label="璁㈠崟閲戦"> - <a-input-number style="width: 200px" v-model="orderMainModel.orderMoney" /> - </a-form-model-item> - <a-form-model-item - :labelCol="labelCol" - :wrapperCol="wrapperCol" - label="璁㈠崟澶囨敞"> - <a-input placeholder="璇疯緭鍏ヨ鍗曞娉�" v-model="orderMainModel.content"/> - </a-form-model-item> - </a-form-model> - </a-spin> - </a-modal> -</template> - -<script> - import {httpAction} from '@/api/manage' - import JDate from '@/components/jeecg/JDate' - import pick from 'lodash.pick' - import moment from "moment" - - export default { - name: "JeecgOrderDMainModal", - components: { - JDate - }, - data() { - return { - title: "鎿嶄綔", - visible: false, - orderMainModel: { - jeecgOrderCustomerList: [{}], - jeecgOrderTicketList: [{}] - }, - labelCol: { - xs: {span: 24}, - sm: {span: 5}, - }, - wrapperCol: { - xs: {span: 24}, - sm: {span: 16}, - }, - confirmLoading: false, - validatorRules: { - orderCode: [ - { required: true, message: '璇疯緭鍏ヨ鍗曞彿!' } - ] - }, - url: { - add: "/test/order/add", - edit: "/test/order/edit", - orderCustomerList: "/test/order/listOrderCustomerByMainId", - orderTicketList: "/test/order/listOrderTicketByMainId", - }, - } - }, - methods: { - add() { - this.edit({}); - }, - edit(record) { - this.orderMainModel = Object.assign({}, record); - console.log(this.orderMainModel) - //鍒濆鍖栨槑缁嗚〃鏁版嵁 - this.visible = true; - }, - close() { - this.$emit('close'); - this.visible = false; - this.$refs.form.resetFields(); - }, - handleOk() { - const that = this; - // 瑙﹀彂琛ㄥ崟楠岃瘉 - this.$refs.form.validate(valid => { - if (valid) { - that.confirmLoading = true; - let httpurl = ''; - let method = ''; - if (!this.orderMainModel.id) { - httpurl += this.url.add; - method = 'post'; - } else { - httpurl += this.url.edit; - method = 'put'; - } - - httpAction(httpurl, this.orderMainModel, method).then((res) => { - if (res.success) { - that.$message.success(res.message); - that.$emit('ok'); - } else { - that.$message.warning(res.message); - } - }).finally(() => { - that.confirmLoading = false; - that.close(); - }) - }else{ - return false; - } - }) - }, - handleCancel() { - this.close() - } - } - } -</script> - -<style scoped> - .ant-btn { - padding: 0 10px; - margin-left: 3px; - } - - .ant-form-item-control { - line-height: 0px; - } - - /** 涓昏〃鍗曡闂磋窛 */ - .ant-form .ant-form-item { - margin-bottom: 10px; - } - - /** Tab椤甸潰琛岄棿璺� */ - .ant-tabs-content .ant-form-item { - margin-bottom: 0px; - } -</style> \ No newline at end of file diff --git a/src/views/jeecg/tablist/form/JeecgOrderTicketModal.vue b/src/views/jeecg/tablist/form/JeecgOrderTicketModal.vue deleted file mode 100644 index f780014..0000000 --- a/src/views/jeecg/tablist/form/JeecgOrderTicketModal.vue +++ /dev/null @@ -1,173 +0,0 @@ -<template> - <a-modal - :title="title" - :width="800" - :visible="visible" - :okButtonProps="{ props: {disabled: disableSubmit} }" - :confirmLoading="confirmLoading" - @ok="handleOk" - @cancel="handleCancel" - cancelText="鍏抽棴"> - - <a-spin :spinning="confirmLoading"> - <a-form-model ref="form" :model="model" :rules="validatorRules"> - - <a-form-model-item - :labelCol="labelCol" - :wrapperCol="wrapperCol" - label="鑸彮鍙�" - prop="ticketCode" - hasFeedback> - <a-input placeholder="璇疯緭鍏ヨ埅鐝彿" :readOnly="disableSubmit" v-model="model.ticketCode"></a-input> - </a-form-model-item> - <a-form-model-item - :labelCol="labelCol" - :wrapperCol="wrapperCol" - label="鑸彮鏃堕棿" - prop="tickectDate" - hasFeedback> - <j-date v-model="model.tickectDate"></j-date> - </a-form-model-item> - <a-form-model-item - :labelCol="labelCol" - :wrapperCol="wrapperCol" - label="璁㈠崟鍙风爜" - v-model="this.orderId" - :hidden="hiding" - hasFeedback> - <a-input v-model="model.orderId" disabled="disabled"/> - </a-form-model-item> - <a-form-model-item - :labelCol="labelCol" - :wrapperCol="wrapperCol" - label="鍒涘缓浜�" - :hidden="hiding" - hasFeedback> - <a-input v-model="model.createBy" :readOnly="disableSubmit"/> - </a-form-model-item> - <a-form-model-item - :labelCol="labelCol" - :wrapperCol="wrapperCol" - label="鍒涘缓鏃堕棿" - :hidden="hiding" - hasFeedback> - <a-input v-model="model.createTime" :readOnly="disableSubmit"/> - </a-form-model-item> - </a-form-model> - </a-spin> - </a-modal> -</template> - -<script> - import {httpAction} from '@/api/manage' - import moment from 'moment' - import JDate from '@/components/jeecg/JDate' - - export default { - components: { - JDate - }, - name: 'JeecgOrderTicketModal', - data() { - return { - title: '鎿嶄綔', - visible: false, - model: {}, - labelCol: { - xs: {span: 24}, - sm: {span: 5} - }, - wrapperCol: { - xs: {span: 24}, - sm: {span: 16} - }, - moment, - format: 'YYYY-MM-DD HH:mm:ss', - disableSubmit: false, - orderId: '', - hiding: false, - confirmLoading: false, - validatorRules: { - ticketCode:[{required : true, message: '璇疯緭鍏ヨ埅鐝彿!'}], - tickectDate:[{required : true, message: '璇疯緭鍏ヨ埅鐝椂闂�!'}] - }, - url: { - add: '/test/order/addTicket', - edit: '/test/order/editTicket' - } - } - }, - created() { - }, - methods: { - add(orderId) { - if (orderId) { - this.edit({orderId}, '') - } else { - this.$message.warning('璇烽�夋嫨涓�鏉¤埅鐝暟鎹�') - } - }, - detail(record) { - this.edit(record, 'd') - }, - edit(record, v) { - if (v == 'e') { - this.hiding = false; - this.disableSubmit = false; - } else if (v == 'd') { - this.hiding = false; - this.disableSubmit = true; - } else { - this.hiding = true; - this.disableSubmit = false; - } - this.model = Object.assign({}, record); - this.visible = true; - }, - close() { - this.$emit('close'); - this.visible = false; - this.$refs.form.resetFields(); - }, - handleOk() { - const that = this; - // 瑙﹀彂琛ㄥ崟楠岃瘉 - this.$refs.form.validate(valid => { - if (valid) { - that.confirmLoading = true; - let httpurl = ''; - let method = ''; - if (!this.model.id) { - httpurl += this.url.add; - method = 'post'; - } else { - httpurl += this.url.edit; - method = 'put'; - } - this.model.mainId = this.model.orderId; - httpAction(httpurl, this.model, method).then((res) => { - if (res.success) { - that.$message.success(res.message); - that.$emit('ok') - } else { - that.$message.warning(res.message); - } - }).finally(() => { - that.confirmLoading = false; - that.close(); - }) - }else{ - return false; - } - }) - }, - handleCancel() { - this.close() - } - } - } -</script> - -<style scoped> - -</style> \ No newline at end of file -- Gitblit v1.9.3