yujialong 2 years ago
parent 3c362751b8
commit fe898632d4
  1. 71
      package-lock.json
  2. 3
      package.json
  3. 184
      src/components/img-upload/Cropper.vue
  4. 2
      src/setting.js
  5. 1
      src/utils/api.js
  6. 12
      src/views/order/AddOrder.vue
  7. 1477
      src/views/parnerOperation/learnMg.vue
  8. 794
      src/views/serve/projectList.vue
  9. 183
      src/views/shop/addProduct/index.vue
  10. 2
      src/views/shop/list/market/index.vue
  11. 7
      src/views/shop/list/product/index.vue

71
package-lock.json generated

@ -2460,6 +2460,15 @@
"schema-utils": "^1.0.0"
}
},
"call-bind": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
"integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
"requires": {
"function-bind": "^1.1.1",
"get-intrinsic": "^1.0.2"
}
},
"call-me-maybe": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz",
@ -5605,6 +5614,24 @@
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="
},
"get-intrinsic": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz",
"integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==",
"requires": {
"function-bind": "^1.1.1",
"has": "^1.0.3",
"has-proto": "^1.0.1",
"has-symbols": "^1.0.3"
},
"dependencies": {
"has-symbols": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
"integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="
}
}
},
"get-stdin": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz",
@ -6562,6 +6589,11 @@
"sparkles": "^1.0.0"
}
},
"has-proto": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz",
"integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg=="
},
"has-symbols": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
@ -10223,9 +10255,12 @@
"dev": true
},
"qs": {
"version": "6.5.2",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
"integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
"version": "6.11.2",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz",
"integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==",
"requires": {
"side-channel": "^1.0.4"
}
},
"query-string": {
"version": "4.3.4",
@ -10707,6 +10742,13 @@
"tough-cookie": "~2.4.3",
"tunnel-agent": "^0.6.0",
"uuid": "^3.3.2"
},
"dependencies": {
"qs": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz",
"integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA=="
}
}
},
"request-promise-core": {
@ -11272,6 +11314,23 @@
"integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==",
"dev": true
},
"side-channel": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
"integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
"requires": {
"call-bind": "^1.0.0",
"get-intrinsic": "^1.0.2",
"object-inspect": "^1.9.0"
},
"dependencies": {
"object-inspect": {
"version": "1.12.3",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz",
"integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g=="
}
}
},
"sigmund": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz",
@ -12709,9 +12768,9 @@
}
},
"vue-cropper": {
"version": "0.5.6",
"resolved": "https://registry.npmjs.org/vue-cropper/-/vue-cropper-0.5.6.tgz",
"integrity": "sha512-54Z/AipXDBcE5nzJweTM+BryzSAcC0FCTMQLvLt6f4XanP4AWB3mPkQw3PG3NRICo7knljHO+N+pjZxYAKoTLQ=="
"version": "0.5.8",
"resolved": "https://registry.npmjs.org/vue-cropper/-/vue-cropper-0.5.8.tgz",
"integrity": "sha512-Xgi/aLQCcNCiBTUdovy/i4LWx0G7fQnAENBpDWA3J4i87Zlk9DJRksXrClsQ6nnaFRfQVkMimij5GEvAMaXdYw=="
},
"vue-cropperjs": {
"version": "3.0.0",

@ -22,10 +22,11 @@
"mavon-editor": "^2.6.17",
"postcss-px2rem": "^0.3.0",
"px2rem-loader": "^0.1.9",
"qs": "^6.11.2",
"sortablejs": "^1.14.0",
"vue": "^2.6.10",
"vue-codemirror": "^4.0.6",
"vue-cropper": "^0.5.5",
"vue-cropper": "^0.5.8",
"vue-cropperjs": "^3.0.0",
"vue-pdf": "^4.3.0",
"vue-quill-editor": "^3.0.6",

@ -3,33 +3,31 @@
<div class="cropper-content">
<!-- 剪裁框 -->
<div class="cropper">
<vueCropper
ref="cropper"
:img="option.img"
:output-size="option.size"
:output-type="option.outputType"
:info="true"
:full="option.full"
:can-move="option.canMove"
:can-move-box="option.canMoveBox"
:original="option.original"
:auto-crop="option.autoCrop"
:auto-crop-width="option.autoCropWidth"
:auto-crop-height="option.autoCropHeight"
:fixed-box="option.fixedBox"
:fixed="fixed"
:fixed-number="fixedNumber"
@realTime="realTimes"
></vueCropper>
<!-- <vueCropper ref="cropper" :img="option.img" :outputSize="option.size" :outputType="option.outputType"></vueCropper> -->
<vueCropper ref="cropper"
:img="option.img"
:output-size="option.size"
:output-type="option.outputType"
:info="true"
:full="option.full"
:can-move="option.canMove"
:can-move-box="option.canMoveBox"
:original="option.original"
:auto-crop="option.autoCrop"
:auto-crop-width="option.autoCropWidth"
:auto-crop-height="option.autoCropHeight"
:fixed-box="option.fixedBox"
:fixed="fixed"
:fixed-number="fixedNumber"
@real-time="realTime"></vueCropper>
</div>
<!-- 预览框 -->
<div
class="show-preview"
:style="{'width': '500px', 'height': '400px', 'overflow': 'hidden', 'margin': '0 25px', 'display':'flex', 'align-items' : 'center'}">
<div class="show-preview"
:style="{'width': '500px', 'height': '400px', 'overflow': 'hidden', 'margin': '0 25px', 'display':'flex', 'align-items' : 'center'}">
<div :style="previews.div" class="preview">
<img :src="previews.url" :style="previews.img" />
<div :style="previews.div"
class="preview">
<img :src="previews.url"
:style="previews.img" />
</div>
</div>
</div>
@ -43,11 +41,10 @@
</div>-->
<!-- 确认上传按钮 -->
<div class="upload-btn">
<el-button
type="primary"
:loading="isUpload"
:disabled="isDisabled"
@click.prevent="uploadImg('blob')">
<el-button type="primary"
:loading="isUpload"
:disabled="isDisabled"
@click.prevent="uploadImg('blob')">
上传
</el-button>
</div>
@ -59,7 +56,7 @@
import {
VueCropper
} from 'vue-cropper'
import {compress, compressAccurately} from 'image-conversion'
import { compress, compressAccurately } from 'image-conversion'
export default {
components: {
VueCropper
@ -90,7 +87,7 @@ export default {
default: true
}
},
data() {
data () {
return {
previews: {}, //
option: {
@ -113,31 +110,30 @@ export default {
}
},
methods: {
changeScale(num) {
changeScale (num) {
//
num = num || 1
this.$refs.cropper.changeScale(num)
},
rotateLeft() {
rotateLeft () {
//
this.$refs.cropper.rotateLeft()
},
rotateRight() {
rotateRight () {
//
this.$refs.cropper.rotateRight()
},
updateImg(file) {
updateImg (file) {
this.option.img = file.url
this.option.size = file.size / 1024 > 200 ? 0.9 : 0.95
},
realTimes(data) {
console.log('data=>',data)
realTime (data) {
//
this.previews = data
},
close() {
close () {
},
uploadImg(type) {
uploadImg (type) {
this.isDisabled = true
//
const that = this
@ -158,81 +154,81 @@ export default {
</script>
<style lang="scss" scoped>
.cropper-content {
display: flex;
display: -webkit-flex;
justify-content: flex-end;
-webkit-justify-content: flex-end;
display: flex;
display: -webkit-flex;
justify-content: flex-end;
-webkit-justify-content: flex-end;
}
.cropper-content .cropper {
width: 500px;
height: 400px;
width: 500px;
height: 400px;
}
.cropper-content .show-preview {
flex: 1;
-webkit-flex: 1;
display: flex;
display: -webkit-flex;
justify-content: center;
-webkit-justify-content: center;
overflow: hidden;
border: 1px solid #cccccc;
background: #cccccc;
margin-left: 40px;
flex: 1;
-webkit-flex: 1;
display: flex;
display: -webkit-flex;
justify-content: center;
-webkit-justify-content: center;
overflow: hidden;
border: 1px solid #cccccc;
background: #cccccc;
margin-left: 40px;
}
.preview {
overflow: hidden;
border: 1px solid #cccccc;
background: #cccccc;
overflow: hidden;
border: 1px solid #cccccc;
background: #cccccc;
}
.footer-btn {
margin-top: 30px;
display: flex;
display: -webkit-flex;
justify-content: flex-end;
-webkit-justify-content: flex-end;
margin-top: 30px;
display: flex;
display: -webkit-flex;
justify-content: flex-end;
-webkit-justify-content: flex-end;
}
.footer-btn .scope-btn {
width: 500px;
display: flex;
display: -webkit-flex;
justify-content: space-between;
-webkit-justify-content: space-between;
width: 500px;
display: flex;
display: -webkit-flex;
justify-content: space-between;
-webkit-justify-content: space-between;
}
.footer-btn .upload-btn {
flex: 1;
-webkit-flex: 1;
display: flex;
display: -webkit-flex;
justify-content: center;
-webkit-justify-content: center;
flex: 1;
-webkit-flex: 1;
display: flex;
display: -webkit-flex;
justify-content: center;
-webkit-justify-content: center;
}
.footer-btn .btn {
outline: none;
display: inline-block;
line-height: 1;
white-space: nowrap;
cursor: pointer;
-webkit-appearance: none;
text-align: center;
-webkit-box-sizing: border-box;
box-sizing: border-box;
outline: 0;
margin: 0;
-webkit-transition: 0.1s;
transition: 0.1s;
font-weight: 500;
padding: 8px 15px;
font-size: 12px;
border-radius: 3px;
color: #fff;
background-color: #67c23a;
border-color: #67c23a;
outline: none;
display: inline-block;
line-height: 1;
white-space: nowrap;
cursor: pointer;
-webkit-appearance: none;
text-align: center;
-webkit-box-sizing: border-box;
box-sizing: border-box;
outline: 0;
margin: 0;
-webkit-transition: 0.1s;
transition: 0.1s;
font-weight: 500;
padding: 8px 15px;
font-size: 12px;
border-radius: 3px;
color: #fff;
background-color: #67c23a;
border-color: #67c23a;
}
</style>

@ -12,7 +12,7 @@ if (isDev) {
host = 'http://121.37.12.51/'
// host = 'https://huorantech.cn/'
// host = 'http://192.168.31.151:9000/'// 榕
// host = 'http://192.168.31.52:9000/'// 赓
host = 'http://192.168.31.53:9000/'// 赓
} else if (isPro) {
jumpPath = 'https://www.huorantech.cn/judgmentPoint/'
}

@ -450,6 +450,7 @@ export default {
deleteTags: `nakadai/tags/deleteTags`,
tagsList: `nakadai/tags/tagsList`,
updateTags: `nakadai/tags/updateTags`,
updateTagsSort: `nakadai/tags/updateTagsSort`,
addGoods: `nakadai/mall/addGoods`,
listOfGoods: `nakadai/mall/listOfGoods`,
deletionOfGoods: `nakadai/mall/deletionOfGoods`,

@ -175,7 +175,7 @@
</div>
<div>
<!-- 处理中 || 有未生效的课程 || 新增订单 && 有课程 -->
<template v-if="!viewDisabled && (dispose || coursePermissions.find(e => e.status == 1) || (isAdd && coursePermissions.length))">
<template v-if="!viewDisabled && (dispose || (isAdd && coursePermissions.length))">
<el-button v-if="coursePermissions.find(e => !e.ship)"
v-auth="'/order:发货'"
type="primary"
@ -387,7 +387,7 @@
</div>
<div>
<!-- 处理中 || 有未生效的课程 || 新增订单 && 有课程 -->
<template v-if="!viewDisabled && (dispose || theoryCourseList.find(e => e.status == 1) || (isAdd && theoryCourseList.length))">
<template v-if="!viewDisabled && (dispose || (isAdd && theoryCourseList.length))">
<el-button v-if="theoryCourseList.find(e => !e.ship)"
v-auth="'/order:发货'"
type="primary"
@ -599,7 +599,7 @@
</div>
<div>
<!-- 处理中 || 有未生效的课程 || 新增订单 && 有课程 -->
<template v-if="!viewDisabled && (dispose || dataPlatformPermissions.find(e => e.status == 1) || (isAdd && dataPlatformPermissions.length))">
<template v-if="!viewDisabled && (dispose || (isAdd && dataPlatformPermissions.length))">
<el-button v-if="dataPlatformPermissions.find(e => !e.ship)"
v-auth="'/order:发货'"
type="primary"
@ -833,7 +833,7 @@
</div>
<div>
<!-- 处理中 || 有未生效的课程 || 新增订单 && 有课程 -->
<template v-if="!viewDisabled && (dispose || valuePermissions.find(e => e.status == 1) || (isAdd && valuePermissions.length))">
<template v-if="!viewDisabled && (dispose || (isAdd && valuePermissions.length))">
<el-button v-if="valuePermissions.find(e => !e.ship)"
v-auth="'/order:发货'"
type="primary"
@ -1033,7 +1033,7 @@
</div>
<div>
<!-- 处理中 || 有未生效的课程 || 新增订单 && 有课程 -->
<template v-if="!viewDisabled && (dispose || practicalCourses.find(e => e.status == 1) || (isAdd && practicalCourses.length))">
<template v-if="!viewDisabled && (dispose || (isAdd && practicalCourses.length))">
<el-button v-if="practicalCourses.find(e => !e.ship)"
v-auth="'/order:发货'"
type="primary"
@ -1243,7 +1243,7 @@
</div>
<div>
<!-- 处理中 || 有未生效的课程 || 新增订单 && 有课程 -->
<template v-if="!viewDisabled && (dispose || expTools.find(e => e.status == 1) || (isAdd && expTools.length))">
<template v-if="!viewDisabled && (dispose || (isAdd && expTools.length))">
<el-button v-if="expTools.find(e => !e.ship)"
v-auth="'/order:发货'"
type="primary"

File diff suppressed because it is too large Load Diff

@ -1,392 +1,452 @@
<template>
<div>
<el-card v-if="showBack" shadow="hover" class="mgb20">
<el-page-header :content="'实验项目管理 / '+titleName" @back="goBack"></el-page-header>
</el-card>
<div>
<el-card v-if="showBack"
shadow="hover"
class="mgb20">
<el-page-header :content="'实验项目管理 / '+titleName"
@back="goBack"></el-page-header>
</el-card>
<el-card shadow="hover" class="mgb20">
<div>
<div class="flex-center mgb20">
<p class="hr_tag"></p>
<span>筛选</span>
</div>
</div>
<div>
<el-form label-width="80px">
<el-col :span="4">
<el-form-item label="来源">
<el-select v-model="queryData.founder" clearable placeholder="请选择创建人"
@change="initData">
<el-option v-for="(item,index) in founderList" :key="index" :label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="状态">
<el-select v-model="queryData.state" clearable placeholder="请选择状态" @change="initData">
<el-option v-for="(item,index) in stateList" :key="index" :label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="权限">
<el-select v-model="queryData.permissions" placeholder="请选择" @change="initData">
<el-option
v-for="item in permissionsList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
<el-input placeholder="请输入项目名称" prefix-icon="el-icon-search"
v-model="keyword" clearable></el-input>
</el-form-item>
</el-col>
</el-form>
</div>
</el-card>
<el-card shadow="hover"
class="mgb20">
<div>
<div class="flex-center mgb20">
<p class="hr_tag"></p>
<span>筛选</span>
</div>
</div>
<div>
<el-form label-width="80px">
<el-col :span="4">
<el-form-item label="来源">
<el-select v-model="queryData.founder"
clearable
placeholder="请选择创建人"
@change="initData">
<el-option v-for="(item,index) in founderList"
:key="index"
:label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="状态">
<el-select v-model="queryData.state"
clearable
placeholder="请选择状态"
@change="initData">
<el-option v-for="(item,index) in stateList"
:key="index"
:label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="权限">
<el-select v-model="queryData.permissions"
placeholder="请选择"
@change="initData">
<el-option v-for="item in permissionsList"
:key="item.value"
:label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
<el-input placeholder="请输入项目名称"
prefix-icon="el-icon-search"
v-model="keyword"
clearable></el-input>
</el-form-item>
</el-col>
</el-form>
</div>
</el-card>
<el-card shadow="hover" class="mgb20">
<div class="flex-between mgb20">
<div class="flex-center">
<p class="hr_tag"></p>
<span>项目列表</span>
</div>
<div>
<el-button type="primary" round @click="add" class="mag">新增项目</el-button>
<el-button type="primary" round @click="delAllData">批量删除</el-button>
</div>
</div>
<el-table :data="listData" class="table" ref="table" stripe header-align="center" row-key="projectId"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center">
<template slot-scope="scope">{{ scope.$index + (page - 1) * pageSize + 1 }}</template>
</el-table-column>
<el-table-column prop="projectName" label="实验项目名称" min-width="400" align="center"></el-table-column>
<el-table-column prop="founder" label="来源" min-width="150" align="center">
<template slot-scope="scope">
{{ founderKeys[scope.row.founder] }}
</template>
</el-table-column>
<el-table-column prop="creator" label="创建人" min-width="140" align="center">
<template slot-scope="scope">
{{ queryData.founder == 1 ? scope.row.schoolName : scope.row.creator }}
</template>
</el-table-column>
<el-table-column label="权限" min-width="120" align="center">
<template slot-scope="scope">
{{ permissionsKeys[scope.row.permissions] }}
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建时间" min-width="150" align="center"></el-table-column>
<el-table-column prop="status" label="状态" min-width="100" align="center">
<template slot-scope="scope">
{{ stateKeys[scope.row.state] }}
</template>
</el-table-column>
<el-table-column label="操作" width="300" align="center">
<template slot-scope="scope">
<el-button type="text" @click="edit(scope.row)">
编辑
</el-button>
<el-button type="text" @click="handleDelete(scope.row.projectId)">
删除
</el-button>
<el-button type="text" @click="copyData(scope.row.projectId)">复制</el-button>
<el-switch
v-if="scope.row.state"
v-model="scope.row.ztOpen"
:active-text="scope.row.ztOpen ? '关闭' : '启用'"
:active-value="0"
:inactive-value="1"
style="margin: 0 10px 0 10px"
@change="switchOff(scope.row)"
></el-switch>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background @current-change="handleCurrentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination>
</div>
</el-card>
<el-card shadow="hover"
class="mgb20">
<div class="flex-between mgb20">
<div class="flex-center">
<p class="hr_tag"></p>
<span>项目列表</span>
</div>
<div>
<el-button type="primary"
round
@click="add"
class="mag">新增项目</el-button>
<el-button type="primary"
round
@click="delAllData">批量删除</el-button>
</div>
</div>
<el-table :data="listData"
class="table"
ref="table"
stripe
header-align="center"
row-key="projectId"
@selection-change="handleSelectionChange">
<el-table-column type="selection"
width="55"
align="center"></el-table-column>
<el-table-column type="index"
width="100"
label="序号"
align="center">
<template slot-scope="scope">{{ scope.$index + (page - 1) * pageSize + 1 }}</template>
</el-table-column>
<el-table-column prop="projectName"
label="实验项目名称"
min-width="400"
align="center"></el-table-column>
<el-table-column prop="founder"
label="来源"
min-width="150"
align="center">
<template slot-scope="scope">
{{ founderKeys[scope.row.founder] }}
</template>
</el-table-column>
<el-table-column prop="creator"
label="创建人"
min-width="140"
align="center">
<template slot-scope="scope">
{{ queryData.founder == 1 ? scope.row.schoolName : scope.row.creator }}
</template>
</el-table-column>
<el-table-column label="权限"
min-width="120"
align="center">
<template slot-scope="scope">
{{ permissionsKeys[scope.row.permissions] }}
</template>
</el-table-column>
<el-table-column prop="createTime"
label="创建时间"
min-width="150"
align="center"></el-table-column>
<el-table-column prop="status"
label="状态"
min-width="100"
align="center">
<template slot-scope="scope">
{{ stateKeys[scope.row.state] }}
</template>
</el-table-column>
<el-table-column label="操作"
width="300"
align="center">
<template slot-scope="scope">
<el-button type="text"
@click="edit(scope.row)">
编辑
</el-button>
<el-button type="text"
@click="handleDelete(scope.row.projectId)">
删除
</el-button>
<el-button type="text"
@click="copyData(scope.row.projectId)">复制</el-button>
<el-switch v-if="scope.row.state"
v-model="scope.row.ztOpen"
:active-text="scope.row.ztOpen ? '关闭' : '启用'"
:active-value="0"
:inactive-value="1"
style="margin: 0 10px 0 10px"
@change="switchOff(scope.row)"></el-switch>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background
@current-change="handleCurrentChange"
:current-page="page"
layout="total, prev, pager, next"
:total="total"></el-pagination>
</div>
</el-card>
<!--复制对话框-->
<el-dialog title="复制" :visible.sync="copyVisible" width="24%" center :close-on-click-modal="false">
<el-form>
<el-form-item>
<!--前端不用做名称判重了@change='projectNameExistis'-->
<el-input placeholder="请输入项目名称" v-model="projectName"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="copyVisible = false"> </el-button>
<el-button type="primary" @click="copySubmit"> </el-button>
</span>
</el-dialog>
</div>
<!--复制对话框-->
<el-dialog title="复制"
:visible.sync="copyVisible"
width="24%"
center
:close-on-click-modal="false">
<el-form>
<el-form-item>
<!--前端不用做名称判重了@change='projectNameExistis'-->
<el-input placeholder="请输入项目名称"
v-model="projectName"></el-input>
</el-form-item>
</el-form>
<span slot="footer"
class="dialog-footer">
<el-button @click="copyVisible = false"> </el-button>
<el-button type="primary"
@click="copySubmit"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { mapState, mapActions } from 'vuex';
import Setting from "@/setting";
export default {
data() {
return {
showBack: Boolean(this.$route.query.show),
systemId: this.$route.query.systemId,
titleName: this.$route.query.name,
queryData: {
platformId: 3, // :1 :3
founder: 0, // (0: 1:)
state: "", // (0:稿 1:)
permissions: "", // (0: 1: 2:)
},
keyword: '',
status: '',
listData: [],
total: 0,
permissionsList: [{
value: '',
label: '不限'
}, {
value: 0,
label: '练习'
}, {
value: 1,
label: '考核'
}, {
value: 2,
label: '竞赛'
}
],
permissionsKeys: {
0: '练习',
1: '考核',
2: '竞赛'
},
founderList: [{
value: 2,
label: '全部'
}, {
value: 0,
label: '系统'
}, {
value: 1,
label: '院校'
}
],
founderKeys: {
0: '系统',
1: '院校'
},
stateList: [{
value: '',
label: '不限'
}, {
value: 0,
label: '草稿箱'
}, {
value: 1,
label: '已发布'
}
],
stateKeys: {
0: '草稿箱',
1: '已发布'
},
page: +this.$route.query.page || 1,
pageSize: 10,
multipleSelection: [],
copyVisible: false,
projectName: '',
currentRow: {}, //
listDataAll: []
};
data () {
return {
showBack: Boolean(this.$route.query.show),
systemId: this.$route.query.systemId,
titleName: this.$route.query.name,
queryData: {
platformId: 3, // :1 :3
founder: 0, // (0: 1:)
state: "", // (0:稿 1:)
permissions: "", // (0: 1: 2:)
},
keyword: '',
status: '',
listData: [],
total: 0,
permissionsList: [{
value: '',
label: '不限'
}, {
value: 0,
label: '练习'
}, {
value: 1,
label: '考核'
}, {
value: 2,
label: '竞赛'
}
],
permissionsKeys: {
0: '练习',
1: '考核',
2: '竞赛'
},
founderList: [{
value: 2,
label: '全部'
}, {
value: 0,
label: '系统'
}, {
value: 1,
label: '院校'
}
],
founderKeys: {
0: '系统',
1: '院校'
},
stateList: [{
value: '',
label: '不限'
}, {
value: 0,
label: '草稿箱'
}, {
value: 1,
label: '已发布'
}
],
stateKeys: {
0: '草稿箱',
1: '已发布'
},
page: +this.$route.query.page || 1,
pageSize: 10,
multipleSelection: [],
copyVisible: false,
projectName: '',
currentRow: {}, //
listDataAll: []
};
},
watch: {
keyword: function (val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.initData();
}, 500);
}
},
mounted () {
if (this.$route.query.founder && this.$route.query.founder != 'undefined') {
this.queryData.founder = +this.$route.query.founder
} else {
this.queryData.founder = 0
}
this.getData();
},
methods: {
getData () {
let data = {
...this.queryData,
projectName: this.keyword,
pageNum: this.page,
pageSize: this.pageSize,
systemId: this.systemId
};
this.$post(this.api.queryProjectManage, data).then(res => {
this.listData = res.data.records;
this.total = res.data.total;
}).catch(err => {
console.log(err);
});
},
watch: {
keyword: function(val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.initData();
}, 500);
}
initData () {
this.page = 1;
this.getData();
},
mounted() {
if (this.$route.query.founder && this.$route.query.founder != 'undefined'){
this.queryData.founder = +this.$route.query.founder
}else{
this.queryData.founder = 0
handleCurrentChange (val) { //
this.page = val;
this.$router.replace({
path: 'projectList',
query: {
...this.$route.query,
page: val
}
this.getData();
})
this.getData();
},
methods: {
getData() {
let data = {
...this.queryData,
projectName: this.keyword,
pageNum: this.page,
pageSize: this.pageSize,
systemId: this.systemId
};
this.$post(this.api.queryProjectManage, data).then(res => {
this.listData = res.data.records;
this.total = res.data.total;
}).catch(err => {
console.log(err);
});
},
initData() {
this.page = 1;
this.getData();
},
handleCurrentChange(val) { //
this.page = val;
this.$router.push({
path: 'projectList',
query: {
...this.$route.query,
page: val
}
})
this.getData();
},
add() { //
this.$router.push(`/projectAdd?systemId=${this.systemId}&founder=${this.queryData.founder}&isDetails=${this.$route.query.show}&name=${this.titleName}`);
},
edit(row) { //
this.$router.push(`/projectAdd?systemId=${this.systemId}&projectId=${row.projectId}&founder=${this.queryData.founder}&isDetails=${this.$route.query.show}&name=${this.titleName}`);
},
handleSelectionChange(val) { //
this.multipleSelection = val;
},
delAllData() { //
if (this.multipleSelection.length) {
let ids = this.multipleSelection.map(item => {
return item.projectId
});
let strIds = ids.toString();
this.handleDelete(strIds);
add () { //
this.$router.push(`/projectAdd?systemId=${this.systemId}&founder=${this.queryData.founder}&isDetails=${this.$route.query.show}&name=${this.titleName}`);
},
edit (row) { //
this.$router.push(`/projectAdd?systemId=${this.systemId}&projectId=${row.projectId}&founder=${this.queryData.founder}&isDetails=${this.$route.query.show}&name=${this.titleName}`);
},
handleSelectionChange (val) { //
this.multipleSelection = val;
},
delAllData () { //
if (this.multipleSelection.length) {
let ids = this.multipleSelection.map(item => {
return item.projectId
});
let strIds = ids.toString();
this.handleDelete(strIds);
} else {
this.$message.error("请先选择项目");
}
},
handleDelete (ids) { //
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
}).then(() => {
this.$post(`${this.api.deleteProjectManage}?projectIds=${ids}&platformId=${this.queryData.platformId}`).then(res => {
console.log(ids)
if (res.status == 200) {
let delList = []
if (isNaN(ids) == 'NaN') {
delList = ids.split(',')
} else {
this.$message.error("请先选择项目");
delList.push(ids)
}
},
handleDelete(ids) { //
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
}).then(() => {
this.$post(`${this.api.deleteProjectManage}?projectIds=${ids}&platformId=${this.queryData.platformId}`).then(res => {
console.log(ids)
if (res.status == 200) {
let delList = []
if (isNaN(ids) == 'NaN'){
delList = ids.split(',')
}else{
delList.push(ids)
}
if(delList.length == this.listData.length){
if(this.page > 1){
this.page = this.page-1
}
}else{
}
this.$message.success("删除成功");
this.getData();
} else {
this.$message.error(res.message);
}
}).catch(err => {
console.log(err);
});
}).catch(() => {
this.$message.info('已取消删除');
});
},
switchOff(row) { //
this.$get(`${this.api.updateIsOpen}?isOpen=${row.ztOpen}&projectId=${row.projectId}&platformId=${this.queryData.platformId}`).then(res => {
if (res.status === 200) {
this.$message.success('更新启用状态成功');
this.getData();
} else {
this.$message.error(res.message);
}
}).catch(err => {
console.log(err);
});
},
projectNameExistis() { //
if (this.projectName) {
this.$post(this.api.queryNameIsExist, { projectName: this.projectName }).then(res => {
if (res.status === 200) {
this.projectNameRepeat = false;
} else {
this.projectNameRepeat = true;
}
}).catch(err => {
this.projectNameRepeat = true;
});
if (delList.length == this.listData.length) {
if (this.page > 1) {
this.page = this.page - 1
}
} else {
this.projectNameRepeat = false;
}
},
copyData(projectId) { // id
this.copyVisible = true;
this.$get(`${this.api.getProjectDetail}?projectId=${projectId}`).then(res => {
if (res.status === 200) {
this.projectName = res.projectManage.projectName;
this.currentRow = {
projectManage: res.projectManage,
projectJudgmentList: res.projectJudgmentVos
}
}
}).catch(err => {
console.log(err);
});
},
copySubmit() {
if (!this.projectName) {
this.$message.warning("请输入项目名称");
return;
}
;
if (this.projectNameRepeat) {
this.$message.warning("该项目名称已存在");
return;
}
this.currentRow.projectManage.projectName = this.projectName;
this.currentRow.projectManage.projectId = "";
this.currentRow.projectManage.founder = 0
this.currentRow.projectJudgmentList.forEach(i => {
i.projectId = "";
});
this.$post(`${this.api.copyProjectManage}`, this.currentRow).then(res => {
if (res.status === 200) {
this.queryData.founder = 0
this.initData();
this.$message.success("复制实验项目成功");
this.copyVisible = false;
} else {
this.$message.error(res.message);
}
}).catch(err => {
console.log(err);
});
},
goBack() { //
// this.$router.push(`/configure`)
this.$router.back()
this.$message.success("删除成功");
this.getData();
} else {
this.$message.error(res.message);
}
}).catch(err => {
console.log(err);
});
}).catch(() => {
this.$message.info('已取消删除');
});
},
switchOff (row) { //
this.$get(`${this.api.updateIsOpen}?isOpen=${row.ztOpen}&projectId=${row.projectId}&platformId=${this.queryData.platformId}`).then(res => {
if (res.status === 200) {
this.$message.success('更新启用状态成功');
this.getData();
} else {
this.$message.error(res.message);
}
}).catch(err => {
console.log(err);
});
},
projectNameExistis () { //
if (this.projectName) {
this.$post(this.api.queryNameIsExist, { projectName: this.projectName }).then(res => {
if (res.status === 200) {
this.projectNameRepeat = false;
} else {
this.projectNameRepeat = true;
}
}).catch(err => {
this.projectNameRepeat = true;
});
} else {
this.projectNameRepeat = false;
}
},
copyData (projectId) { // id
this.copyVisible = true;
this.$get(`${this.api.getProjectDetail}?projectId=${projectId}`).then(res => {
if (res.status === 200) {
this.projectName = res.projectManage.projectName;
this.currentRow = {
projectManage: res.projectManage,
projectJudgmentList: res.projectJudgmentVos
}
}
}).catch(err => {
console.log(err);
});
},
copySubmit () {
if (!this.projectName) {
this.$message.warning("请输入项目名称");
return;
}
;
if (this.projectNameRepeat) {
this.$message.warning("该项目名称已存在");
return;
}
this.currentRow.projectManage.projectName = this.projectName;
this.currentRow.projectManage.projectId = "";
this.currentRow.projectManage.founder = 0
this.currentRow.projectJudgmentList.forEach(i => {
i.projectId = "";
});
this.$post(`${this.api.copyProjectManage}`, this.currentRow).then(res => {
if (res.status === 200) {
this.queryData.founder = 0
this.initData();
this.$message.success("复制实验项目成功");
this.copyVisible = false;
} else {
this.$message.error(res.message);
}
}).catch(err => {
console.log(err);
});
},
goBack () { //
this.$router.back()
}
}
};
</script>
<style lang="scss" scoped>
</style>

@ -106,7 +106,8 @@
<el-option v-for="(item, i) in productCategoryList"
:key="i"
:label="item.classificationName"
:value="item.classificationId"></el-option>
:value="item.classificationId"
:disabled="form.mall.isAssociatedProduct && (item.classificationId !== 4 && item.classificationId !== 6)"></el-option>
</el-select>
</el-form-item>
<el-form-item class="req"
@ -268,12 +269,8 @@
:key="i"
class="pic">
<img :src="item">
<div>
<el-button class="del"
size="small"
type="primary"
@click="form.mall.interfaceDiagrams.splice(i, 1)">删除</el-button>
</div>
<i class="el-icon-close close"
@click="form.mall.interfaceDiagrams.splice(i, 1)"></i>
</div>
</div>
</el-form-item>
@ -490,10 +487,8 @@
<el-form-item class="req"
label="产品简介"
prop="briefIntroduction">
<Editor api-key='rnk6zw9v267xqz7pf98twt1vmrvltmd436je7a642pckltda'
v-model="form.mall.productIntroduction"
:init="editorConfig"
:disabled="isDetail" />
<el-input v-model="form.mall.productIntroduction"
type="textarea"></el-input>
</el-form-item>
<el-form-item class="req"
label="详情介绍"
@ -591,44 +586,47 @@
<i class="el-icon-circle-plus-outline"
@click="addLabel"></i>
</div>
<el-table :data="labels"
ref="table"
header-align="center"
row-key="id">
<el-table-column type="index"
width="60"
label="序号"
align="center"></el-table-column>
<el-table-column prop="tagsName"
label="主题名称"
align="center"
min-width="130">
<template slot-scope="scope">
<el-input v-if="scope.row.edit"
placeholder="请输入主题名称"
v-model="scope.row.tagsName"
clearable
maxlength="30"></el-input>
<span v-else>{{ scope.row.tagsName }}</span>
</template>
</el-table-column>
<el-table-column label="操作"
align="center"
width="70">
<template slot-scope="scope">
<i v-if="scope.row.edit"
class="el-icon-check icon"
@click="submitLabel(scope.row)"></i>
<i v-else
class="el-icon-edit icon"
@click="editLabel(scope.row)"></i>
<i class="el-icon-delete icon"
@click="delLabel(scope.row, scope.$index)"></i>
</template>
</el-table-column>
</el-table>
<span slot="footer">
<el-button @click="closeLabel">返回</el-button>
<div class="sort-wrap">
<ul class="thead">
<li style="width: 50px;padding-left: 15px;">序号</li>
<li style="width: 280px;padding-left: 30px;">主题名称</li>
<li>操作</li>
</ul>
<el-tree class="sort"
:indent="0"
:data="labels"
node-key="id"
default-expand-all
draggable>
<ul class="sort-line"
slot-scope="{ node, data }">
<li>{{ data.index + 1 }}</li>
<li>
<el-input v-if="data.edit"
placeholder="请输入主题名称"
v-model="data.tagsName"
clearable
maxlength="30"></el-input>
<span v-else>{{ data.tagsName }}</span>
</li>
<li>
<i v-if="data.edit"
class="el-icon-check icon"
@click="submitLabel(data)"></i>
<i v-else
class="el-icon-edit icon"
@click="editLabel(data)"></i>
<i class="el-icon-delete icon"
@click="delLabel(data, data.index)"></i>
</li>
</ul>
</el-tree>
</div>
<span slot="footer"
class="dialog-footer">
<el-button @click="closeLabel">取消</el-button>
<el-button type="primary"
@click="sortLabel">保存排序</el-button>
</span>
</el-dialog>
@ -637,7 +635,6 @@
width="800px"
:close-on-click-modal="false"
class="product-dia">
<p class="tips">(已关联产品的不可重复关联)</p>
<div class="tabs">
<a class="item"
v-for="(item, i) in tabs"
@ -661,8 +658,7 @@
<template slot-scope="scope">
<el-radio class="product-radio"
v-model="selectProduct"
:label="scope.row.cid"
:disabled="scope.row.associatedProductIdentification"></el-radio>
:label="scope.row.cid"></el-radio>
</template>
</el-table-column>
<el-table-column type="index"
@ -713,6 +709,7 @@ export default {
isDetail: this.$route.query.show == 1,
id: this.$route.query.id || '',
form: {
classificationIds: '',
supplierIds: [],
tagsIds: [],
typeIds: [],
@ -898,9 +895,12 @@ export default {
//
associatedProductChange (val) {
if (val === 1) {
const { mall } = this.form
const { form } = this
const { mall } = form
mall.associatedProduct = ''
mall.associatedProductName = ''
form.classificationIds = ''
form.supplierIds = []
this.selectedProduct = false
}
},
@ -1040,10 +1040,13 @@ export default {
//
getLabel () {
this.$get(this.api.tagsList).then(res => {
res.tagsList.forEach((e, i) => {
e.index = i
})
this.labels = res.tagsList
//
if (this.id) {
console.log("🚀 ~ file: index.vue:735 ~ this.$get ~ id:", this.id)
const ids = []
this.form.tagsIds.forEach(item => {
this.labels.forEach(e => {
@ -1117,6 +1120,20 @@ export default {
this.labelVisible = false
}
},
//
sortLabel () {
const list = this.labels
list.forEach((e, i) => {
e.sort = i
})
this.$post(this.api.updateTagsSort, {
tagsList: list
}).then(res => {
Util.successMsg('保存成功')
this.labelVisible = false
this.getLabel()
}).catch(err => { })
},
@ -1508,12 +1525,21 @@ $avatar-width: 104px;
margin-top: 10px;
text-align: center;
.pic {
position: relative;
margin-right: 20px;
}
img {
width: $avatar-width;
height: $avatar-width;
}
.close {
position: absolute;
top: 5px;
right: 5px;
font-size: 18px;
color: #ededed;
cursor: pointer;
}
}
/deep/ .d-inline-block {
@ -1601,4 +1627,53 @@ $avatar-width: 104px;
.btns {
text-align: center;
}
.sort-wrap {
max-height: 400px;
overflow: auto;
}
.thead {
display: flex;
line-height: 44px;
background-color: #f7f7f7;
li {
padding: 0 10px;
font-size: 12px;
font-weight: 500;
font-family: PingFangSC-Medium, PingFang SC;
color: #323232;
}
}
/deep/.sort {
.el-tree-node__content {
height: auto;
}
.el-tree-node__expand-icon {
display: none;
}
}
.sort-line {
display: flex;
align-items: center;
width: 100%;
height: 30px;
padding: 7px 0;
border-bottom: 1px solid #ebedf0;
li {
min-height: 23px;
&:first-child {
width: 50px;
text-align: center;
}
&:nth-child(2) {
position: absolute;
width: 280px;
left: 100px;
}
&:last-child {
position: absolute;
right: 20px;
}
}
}
</style>

@ -136,7 +136,7 @@ export default {
},
cropperModel: false,
isUpload: false,
fixedNumber: [5.48, 1],
fixedNumber: [3.6, 1],
file: ''
};
},

@ -182,6 +182,7 @@
<script>
import Util from "@/libs/util";
import Setting from '@/setting'
import qs from 'qs'
export default {
data () {
return {
@ -395,7 +396,11 @@ export default {
row.isShelves = 1
return
}
this.$post(`${this.api.goodsOffTheShelf}?mallId=${row.mallId}&isShelves=${value}`).then((res) => {
// this.$post(`${this.api.goodsOffTheShelf}?mallId=${row.mallId}&isShelves=${value}`).then((res) => {
this.$post(this.api.goodsOffTheShelf + '?' + qs.stringify({
mallId: row.mallId,
isShelves: value
})).then((res) => {
this.getData()
}).catch(({ status }) => {
if (status !== 200) row.isShelves = 1

Loading…
Cancel
Save