yujialong 2 years ago
parent 3c362751b8
commit fe898632d4
  1. 71
      package-lock.json
  2. 3
      package.json
  3. 22
      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. 275
      src/views/parnerOperation/learnMg.vue
  8. 144
      src/views/serve/projectList.vue
  9. 169
      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" "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": { "call-me-maybe": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", "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", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" "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": { "get-stdin": {
"version": "4.0.1", "version": "4.0.1",
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz",
@ -6562,6 +6589,11 @@
"sparkles": "^1.0.0" "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": { "has-symbols": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
@ -10223,9 +10255,12 @@
"dev": true "dev": true
}, },
"qs": { "qs": {
"version": "6.5.2", "version": "6.11.2",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz",
"integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==",
"requires": {
"side-channel": "^1.0.4"
}
}, },
"query-string": { "query-string": {
"version": "4.3.4", "version": "4.3.4",
@ -10707,6 +10742,13 @@
"tough-cookie": "~2.4.3", "tough-cookie": "~2.4.3",
"tunnel-agent": "^0.6.0", "tunnel-agent": "^0.6.0",
"uuid": "^3.3.2" "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": { "request-promise-core": {
@ -11272,6 +11314,23 @@
"integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==", "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==",
"dev": true "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": { "sigmund": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz",
@ -12709,9 +12768,9 @@
} }
}, },
"vue-cropper": { "vue-cropper": {
"version": "0.5.6", "version": "0.5.8",
"resolved": "https://registry.npmjs.org/vue-cropper/-/vue-cropper-0.5.6.tgz", "resolved": "https://registry.npmjs.org/vue-cropper/-/vue-cropper-0.5.8.tgz",
"integrity": "sha512-54Z/AipXDBcE5nzJweTM+BryzSAcC0FCTMQLvLt6f4XanP4AWB3mPkQw3PG3NRICo7knljHO+N+pjZxYAKoTLQ==" "integrity": "sha512-Xgi/aLQCcNCiBTUdovy/i4LWx0G7fQnAENBpDWA3J4i87Zlk9DJRksXrClsQ6nnaFRfQVkMimij5GEvAMaXdYw=="
}, },
"vue-cropperjs": { "vue-cropperjs": {
"version": "3.0.0", "version": "3.0.0",

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

@ -3,8 +3,7 @@
<div class="cropper-content"> <div class="cropper-content">
<!-- 剪裁框 --> <!-- 剪裁框 -->
<div class="cropper"> <div class="cropper">
<vueCropper <vueCropper ref="cropper"
ref="cropper"
:img="option.img" :img="option.img"
:output-size="option.size" :output-size="option.size"
:output-type="option.outputType" :output-type="option.outputType"
@ -19,17 +18,16 @@
:fixed-box="option.fixedBox" :fixed-box="option.fixedBox"
:fixed="fixed" :fixed="fixed"
:fixed-number="fixedNumber" :fixed-number="fixedNumber"
@realTime="realTimes" @real-time="realTime"></vueCropper>
></vueCropper>
<!-- <vueCropper ref="cropper" :img="option.img" :outputSize="option.size" :outputType="option.outputType"></vueCropper> -->
</div> </div>
<!-- 预览框 --> <!-- 预览框 -->
<div <div class="show-preview"
class="show-preview"
:style="{'width': '500px', 'height': '400px', 'overflow': 'hidden', 'margin': '0 25px', 'display':'flex', 'align-items' : 'center'}"> :style="{'width': '500px', 'height': '400px', 'overflow': 'hidden', 'margin': '0 25px', 'display':'flex', 'align-items' : 'center'}">
<div :style="previews.div" class="preview"> <div :style="previews.div"
<img :src="previews.url" :style="previews.img" /> class="preview">
<img :src="previews.url"
:style="previews.img" />
</div> </div>
</div> </div>
</div> </div>
@ -43,8 +41,7 @@
</div>--> </div>-->
<!-- 确认上传按钮 --> <!-- 确认上传按钮 -->
<div class="upload-btn"> <div class="upload-btn">
<el-button <el-button type="primary"
type="primary"
:loading="isUpload" :loading="isUpload"
:disabled="isDisabled" :disabled="isDisabled"
@click.prevent="uploadImg('blob')"> @click.prevent="uploadImg('blob')">
@ -130,8 +127,7 @@ export default {
this.option.img = file.url this.option.img = file.url
this.option.size = file.size / 1024 > 200 ? 0.9 : 0.95 this.option.size = file.size / 1024 > 200 ? 0.9 : 0.95
}, },
realTimes(data) { realTime (data) {
console.log('data=>',data)
// //
this.previews = data this.previews = data
}, },

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

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

@ -175,7 +175,7 @@
</div> </div>
<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)" <el-button v-if="coursePermissions.find(e => !e.ship)"
v-auth="'/order:发货'" v-auth="'/order:发货'"
type="primary" type="primary"
@ -387,7 +387,7 @@
</div> </div>
<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)" <el-button v-if="theoryCourseList.find(e => !e.ship)"
v-auth="'/order:发货'" v-auth="'/order:发货'"
type="primary" type="primary"
@ -599,7 +599,7 @@
</div> </div>
<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)" <el-button v-if="dataPlatformPermissions.find(e => !e.ship)"
v-auth="'/order:发货'" v-auth="'/order:发货'"
type="primary" type="primary"
@ -833,7 +833,7 @@
</div> </div>
<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)" <el-button v-if="valuePermissions.find(e => !e.ship)"
v-auth="'/order:发货'" v-auth="'/order:发货'"
type="primary" type="primary"
@ -1033,7 +1033,7 @@
</div> </div>
<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)" <el-button v-if="practicalCourses.find(e => !e.ship)"
v-auth="'/order:发货'" v-auth="'/order:发货'"
type="primary" type="primary"
@ -1243,7 +1243,7 @@
</div> </div>
<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)" <el-button v-if="expTools.find(e => !e.ship)"
v-auth="'/order:发货'" v-auth="'/order:发货'"
type="primary" type="primary"

@ -1,31 +1,37 @@
<template> <template>
<div> <div>
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover"
class="mgb20">
<div class="flex-between"> <div class="flex-between">
<div class="per_title" v-preventReClick @click="back"> <div class="per_title"
v-preventReClick
@click="back">
<i class="el-icon-arrow-left"></i> <i class="el-icon-arrow-left"></i>
<span class="per_back">返回</span> <span class="per_back">返回</span>
<span class="per_school" v-text="form.id ? '编辑文章' : '新建文章'"></span> <span class="per_school"
v-text="form.id ? '编辑文章' : '新建文章'"></span>
</div> </div>
</div> </div>
</el-card> </el-card>
<div class="page"> <div class="page">
<el-form :model="form" :rules="rules" class="input-form model" label-width="140px"> <el-form :model="form"
<el-form-item prop="title" label="标题"> :rules="rules"
<el-input class="input-form model"
id="articleTitle" label-width="140px">
<el-form-item prop="title"
label="标题">
<el-input id="focus-el"
style="width: 940px" style="width: 940px"
placeholder="请输入标题" placeholder="请输入标题"
v-model="form.title" v-model="form.title"
clearable clearable
maxlength="100" maxlength="100"
@change="nameChange" @change="nameChange"></el-input>
></el-input>
</el-form-item> </el-form-item>
<div class="item-line"> <div class="item-line">
<el-form-item prop="releaseTime" label="发布日期"> <el-form-item prop="releaseTime"
<el-date-picker label="发布日期">
v-model="form.releaseTime" <el-date-picker v-model="form.releaseTime"
type="date" type="date"
placeholder="选择日期" placeholder="选择日期"
format="yyyy-MM-dd" format="yyyy-MM-dd"
@ -35,124 +41,136 @@
</el-form-item> </el-form-item>
</div> </div>
<div class="item-line"> <div class="item-line">
<el-form-item prop="source" label="来源"> <el-form-item prop="source"
<el-input label="来源">
placeholder="请输入来源" <el-input placeholder="请输入来源"
v-model.trim="form.source" v-model.trim="form.source"
clearable clearable
maxlength="50" maxlength="50"
class="inline-input" class="inline-input"></el-input>
></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="author" label="作者"> <el-form-item prop="author"
<el-input label="作者">
v-model="form.author" <el-input v-model="form.author"
clearable clearable
maxlength="50" maxlength="50"
class="inline-input" class="inline-input"></el-input>
></el-input>
</el-form-item> </el-form-item>
</div> </div>
<div class="item-line"> <div class="item-line">
<el-form-item prop="edit" label="编辑"> <el-form-item prop="edit"
<el-input label="编辑">
placeholder="请输入编辑" <el-input placeholder="请输入编辑"
v-model.trim="form.edit" v-model.trim="form.edit"
clearable clearable
maxlength="50" maxlength="50"
class="inline-input" class="inline-input"></el-input>
></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="audit" label="审核"> <el-form-item prop="audit"
<el-input label="审核">
placeholder="请输入审核" <el-input placeholder="请输入审核"
v-model.trim="form.audit" v-model.trim="form.audit"
clearable clearable
maxlength="50" maxlength="50"
class="inline-input" class="inline-input"></el-input>
></el-input>
</el-form-item> </el-form-item>
</div> </div>
<div class="item-line"> <div class="item-line">
<el-form-item prop="classificationId" label="所属分类"> <el-form-item prop="classificationId"
<el-select style="width: 234px;" v-model="form.classificationId"> label="所属分类">
<el-select style="width: 234px;"
v-model="form.classificationId">
<template v-for="item in classifications"> <template v-for="item in classifications">
<el-option <el-option v-if="item.id"
v-if="item.id"
:key="item.id" :key="item.id"
:label="item.classificationName" :label="item.classificationName"
:value="item.id"> :value="item.id">
</el-option> </el-option>
</template> </template>
</el-select> </el-select>
<el-button class="set-btn" type="primary" @click="setClass">设置</el-button> <el-button class="set-btn"
type="primary"
@click="setClass">设置</el-button>
</el-form-item> </el-form-item>
<el-form-item prop="author" label="主题标签"> <el-form-item prop="author"
<el-select style="width: 234px;" v-model="form.lableId" multiple> label="主题标签">
<el-select style="width: 234px;"
v-model="form.lableId"
multiple>
<template v-for="item in labels"> <template v-for="item in labels">
<el-option <el-option v-if="item.id"
v-if="item.id"
:key="item.id" :key="item.id"
:label="item.labelName" :label="item.labelName"
:value="item.id"> :value="item.id">
</el-option> </el-option>
</template> </template>
</el-select> </el-select>
<el-button class="set-btn" type="primary" @click="setLabel">设置</el-button> <el-button class="set-btn"
type="primary"
@click="setLabel">设置</el-button>
</el-form-item> </el-form-item>
</div> </div>
<el-form-item prop="summary" label="摘要"> <el-form-item prop="summary"
<el-input label="摘要">
style="width: 940px" <el-input style="width: 940px"
type="textarea" type="textarea"
v-model.trim="form.summary" v-model.trim="form.summary"
:rows="3" :rows="3"
clearable clearable></el-input>
></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="bannerImg" label="封面图"> <el-form-item prop="bannerImg"
<el-upload label="封面图">
class="avatar-uploader" <el-upload class="avatar-uploader"
accept=".jpg,.png,.jpeg,.gif" accept=".jpg,.png,.jpeg,.gif"
:on-change="changeFile" :on-change="changeFile"
:show-file-list="false" :show-file-list="false"
:action="this.api.fileupload" :action="this.api.fileupload"
:auto-upload="false" :auto-upload="false">
> <img v-if="form.bannerImg"
<img v-if="form.bannerImg" :src="form.bannerImg" class="avatar"> :src="form.bannerImg"
<div class="uploader-default" v-else> class="avatar">
<img class="plus" src="@/assets/img/plus.png" alt=""> <div class="uploader-default"
v-else>
<img class="plus"
src="@/assets/img/plus.png"
alt="">
<p>点击上传</p> <p>点击上传</p>
</div> </div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item prop="mainBody" label="正文" > <el-form-item prop="mainBody"
<Editor api-key='rnk6zw9v267xqz7pf98twt1vmrvltmd436je7a642pckltda' v-model="form.mainBody" :init="editorConfig" /> label="正文">
<Editor api-key='rnk6zw9v267xqz7pf98twt1vmrvltmd436je7a642pckltda'
v-model="form.mainBody"
:init="editorConfig" />
</el-form-item> </el-form-item>
<el-form-item prop="file" label="文件上传"> <el-form-item prop="file"
<el-upload label="文件上传">
:before-upload="fileBeforeUpload" <el-upload :before-upload="fileBeforeUpload"
:on-remove="handleRemove" :on-remove="handleRemove"
:on-success="uploadSuccessFile" :on-success="uploadSuccessFile"
:action="this.api.fileUploadNakadai" :action="this.api.fileUploadNakadai"
:file-list="form.fileList" :file-list="form.fileList"
:headers="headers" :headers="headers">
>
<el-button>上传</el-button> <el-button>上传</el-button>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="btns"> <div class="btns">
<el-button type="primary" @click="submit(1)">发布</el-button> <el-button type="primary"
@click="submit(1)">发布</el-button>
<el-button @click="submit(0)">保存草稿</el-button> <el-button @click="submit(0)">保存草稿</el-button>
<el-button @click="back">取消</el-button> <el-button @click="back">取消</el-button>
</div> </div>
</div> </div>
<!-- 剪裁组件弹窗 --> <!-- 剪裁组件弹窗 -->
<el-dialog title="图片裁剪" append-to-body :visible.sync="cropperModel" width="1100px" :close-on-click-modal="false"> <el-dialog title="图片裁剪"
<Cropper append-to-body
ref="cropper" :visible.sync="cropperModel"
width="1100px"
:close-on-click-modal="false">
<Cropper ref="cropper"
:img-file.sync="file" :img-file.sync="file"
:is-upload="isUpload" :is-upload="isUpload"
:fixed="true" :fixed="true"
@ -160,30 +178,53 @@
@upload="customUpload" /> @upload="customUpload" />
</el-dialog> </el-dialog>
<el-dialog title="所属分类设置" :visible.sync="classVisible" width="500px" :close-on-click-modal="false" class="manage-dia" :before-close="closeClass"> <el-dialog title="所属分类设置"
:visible.sync="classVisible"
width="500px"
:close-on-click-modal="false"
class="manage-dia"
:before-close="closeClass">
<div class="plus"> <div class="plus">
<i class="el-icon-circle-plus-outline" @click="addClass"></i> <i class="el-icon-circle-plus-outline"
@click="addClass"></i>
</div> </div>
<el-table :data="classifications" ref="table" header-align="center" row-key="id"> <el-table :data="classifications"
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column> ref="table"
<el-table-column prop="classificationName" label="分类名称" align="center" min-width="130"> header-align="center"
row-key="id">
<el-table-column type="index"
width="60"
label="序号"
align="center"></el-table-column>
<el-table-column prop="classificationName"
label="分类名称"
align="center"
min-width="130">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-input v-if="scope.row.edit"
v-if="scope.row.edit"
placeholder="请输入分类名称" placeholder="请输入分类名称"
v-model="scope.row.classificationName" v-model="scope.row.classificationName"
clearable clearable
maxlength="30" maxlength="30"></el-input>
></el-input>
<span v-else>{{ scope.row.classificationName }}</span> <span v-else>{{ scope.row.classificationName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="updateTime1" label="是否引用" align="center" min-width="60"></el-table-column> <el-table-column prop="updateTime1"
<el-table-column label="操作" align="center" min-width="60"> label="是否引用"
align="center"
min-width="60"></el-table-column>
<el-table-column label="操作"
align="center"
min-width="60">
<template slot-scope="scope"> <template slot-scope="scope">
<i v-if="scope.row.edit" class="el-icon-check edit" @click="submitClass(scope.row)"></i> <i v-if="scope.row.edit"
<i v-else class="el-icon-edit edit" @click="editClass(scope.row)"></i> class="el-icon-check edit"
<i class="el-icon-delete del" @click="delClass(scope.row, scope.$index)"></i> @click="submitClass(scope.row)"></i>
<i v-else
class="el-icon-edit edit"
@click="editClass(scope.row)"></i>
<i class="el-icon-delete del"
@click="delClass(scope.row, scope.$index)"></i>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -192,30 +233,53 @@
</span> </span>
</el-dialog> </el-dialog>
<el-dialog title="主题标签设置" :visible.sync="labelVisible" width="500px" :close-on-click-modal="false" class="manage-dia" :before-close="closeLabel"> <el-dialog title="主题标签设置"
:visible.sync="labelVisible"
width="500px"
:close-on-click-modal="false"
class="manage-dia"
:before-close="closeLabel">
<div class="plus"> <div class="plus">
<i class="el-icon-circle-plus-outline" @click="addLabel"></i> <i class="el-icon-circle-plus-outline"
@click="addLabel"></i>
</div> </div>
<el-table :data="labels" ref="table" header-align="center" row-key="id"> <el-table :data="labels"
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column> ref="table"
<el-table-column prop="labelName" label="主题名称" align="center" min-width="130"> header-align="center"
row-key="id">
<el-table-column type="index"
width="60"
label="序号"
align="center"></el-table-column>
<el-table-column prop="labelName"
label="主题名称"
align="center"
min-width="130">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-input v-if="scope.row.edit"
v-if="scope.row.edit"
placeholder="请输入主题名称" placeholder="请输入主题名称"
v-model="scope.row.labelName" v-model="scope.row.labelName"
clearable clearable
maxlength="30" maxlength="30"></el-input>
></el-input>
<span v-else>{{ scope.row.labelName }}</span> <span v-else>{{ scope.row.labelName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="updateTime1" label="是否引用" align="center" min-width="60"></el-table-column> <el-table-column prop="updateTime1"
<el-table-column label="操作" align="center" min-width="60"> label="是否引用"
align="center"
min-width="60"></el-table-column>
<el-table-column label="操作"
align="center"
min-width="60">
<template slot-scope="scope"> <template slot-scope="scope">
<i v-if="scope.row.edit" class="el-icon-check edit" @click="submitLabel(scope.row)"></i> <i v-if="scope.row.edit"
<i v-else class="el-icon-edit edit" @click="editLabel(scope.row)"></i> class="el-icon-check edit"
<i class="el-icon-delete del" @click="delLabel(scope.row, scope.$index)"></i> @click="submitLabel(scope.row)"></i>
<i v-else
class="el-icon-edit edit"
@click="editLabel(scope.row)"></i>
<i class="el-icon-delete del"
@click="delLabel(scope.row, scope.$index)"></i>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -701,7 +765,7 @@ $upload-lg-height: 102px;
position: relative; position: relative;
width: $upload-width; width: $upload-width;
height: $upload-height; height: $upload-height;
border: 1px solid #DCDEE0; border: 1px solid #dcdee0;
border-radius: 2px; border-radius: 2px;
cursor: pointer; cursor: pointer;
overflow: hidden; overflow: hidden;
@ -712,7 +776,7 @@ $upload-lg-height: 102px;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
text-align: center; text-align: center;
background: #FAFAFA; background: #fafafa;
p { p {
margin-top: 10px; margin-top: 10px;
font-size: 14px; font-size: 14px;
@ -769,7 +833,7 @@ $upload-lg-height: 102px;
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
&:hover .review { &:hover .review {
border-color: #9278FF; border-color: #9278ff;
} }
} }
.review { .review {
@ -779,7 +843,7 @@ $upload-lg-height: 102px;
width: 170px; width: 170px;
height: 112px; height: 112px;
margin-bottom: 10px; margin-bottom: 10px;
border: 1px solid #DCDEE0; border: 1px solid #dcdee0;
border-radius: 2px; border-radius: 2px;
img { img {
width: 80px; width: 80px;
@ -798,7 +862,7 @@ $upload-lg-height: 102px;
.plus { .plus {
margin-bottom: 10px; margin-bottom: 10px;
font-size: 18px; font-size: 18px;
color: #9278FF; color: #9278ff;
text-align: right; text-align: right;
cursor: pointer; cursor: pointer;
} }
@ -806,7 +870,8 @@ $upload-lg-height: 102px;
margin-left: 10px !important; margin-left: 10px !important;
} }
.manage-dia { .manage-dia {
.edit, .del { .edit,
.del {
font-size: 14px; font-size: 14px;
cursor: pointer; cursor: pointer;
} }
@ -834,12 +899,13 @@ $upload-lg-height: 102px;
} }
.line { .line {
margin-bottom: 24px; margin-bottom: 24px;
border-bottom: 1px dashed #C2C2C2; border-bottom: 1px dashed #c2c2c2;
} }
.el-form-item--small.el-form-item { .el-form-item--small.el-form-item {
margin-bottom: 24px; margin-bottom: 24px;
} }
.el-input, .el-select { .el-input,
.el-select {
width: 300px; width: 300px;
} }
.el-select .el-input { .el-select .el-input {
@ -848,13 +914,14 @@ $upload-lg-height: 102px;
.el-textarea { .el-textarea {
width: 550px; width: 550px;
} }
.auto, .auto .el-input { .auto,
.auto .el-input {
width: auto; width: auto;
} }
.el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label:before { .el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label:before {
font-size: 18px; font-size: 18px;
vertical-align: -4px; vertical-align: -4px;
color: #F5222D; color: #f5222d;
} }
} }
.btns { .btns {

@ -1,10 +1,14 @@
<template> <template>
<div> <div>
<el-card v-if="showBack" shadow="hover" class="mgb20"> <el-card v-if="showBack"
<el-page-header :content="'实验项目管理 / '+titleName" @back="goBack"></el-page-header> shadow="hover"
class="mgb20">
<el-page-header :content="'实验项目管理 / '+titleName"
@back="goBack"></el-page-header>
</el-card> </el-card>
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover"
class="mgb20">
<div> <div>
<div class="flex-center mgb20"> <div class="flex-center mgb20">
<p class="hr_tag"></p> <p class="hr_tag"></p>
@ -15,119 +19,177 @@
<el-form label-width="80px"> <el-form label-width="80px">
<el-col :span="4"> <el-col :span="4">
<el-form-item label="来源"> <el-form-item label="来源">
<el-select v-model="queryData.founder" clearable placeholder="请选择创建人" <el-select v-model="queryData.founder"
clearable
placeholder="请选择创建人"
@change="initData"> @change="initData">
<el-option v-for="(item,index) in founderList" :key="index" :label="item.label" <el-option v-for="(item,index) in founderList"
:key="index"
:label="item.label"
:value="item.value"></el-option> :value="item.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item label="状态"> <el-form-item label="状态">
<el-select v-model="queryData.state" clearable placeholder="请选择状态" @change="initData"> <el-select v-model="queryData.state"
<el-option v-for="(item,index) in stateList" :key="index" :label="item.label" clearable
placeholder="请选择状态"
@change="initData">
<el-option v-for="(item,index) in stateList"
:key="index"
:label="item.label"
:value="item.value"></el-option> :value="item.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item label="权限"> <el-form-item label="权限">
<el-select v-model="queryData.permissions" placeholder="请选择" @change="initData"> <el-select v-model="queryData.permissions"
<el-option placeholder="请选择"
v-for="item in permissionsList" @change="initData">
<el-option v-for="item in permissionsList"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"></el-option>
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item> <el-form-item>
<el-input placeholder="请输入项目名称" prefix-icon="el-icon-search" <el-input placeholder="请输入项目名称"
v-model="keyword" clearable></el-input> prefix-icon="el-icon-search"
v-model="keyword"
clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover"
class="mgb20">
<div class="flex-between mgb20"> <div class="flex-between mgb20">
<div class="flex-center"> <div class="flex-center">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>项目列表</span> <span>项目列表</span>
</div> </div>
<div> <div>
<el-button type="primary" round @click="add" class="mag">新增项目</el-button> <el-button type="primary"
<el-button type="primary" round @click="delAllData">批量删除</el-button> round
@click="add"
class="mag">新增项目</el-button>
<el-button type="primary"
round
@click="delAllData">批量删除</el-button>
</div> </div>
</div> </div>
<el-table :data="listData" class="table" ref="table" stripe header-align="center" row-key="projectId" <el-table :data="listData"
class="table"
ref="table"
stripe
header-align="center"
row-key="projectId"
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"></el-table-column> <el-table-column type="selection"
<el-table-column type="index" width="100" label="序号" align="center"> 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> <template slot-scope="scope">{{ scope.$index + (page - 1) * pageSize + 1 }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="projectName" label="实验项目名称" min-width="400" align="center"></el-table-column> <el-table-column prop="projectName"
<el-table-column prop="founder" label="来源" min-width="150" align="center"> label="实验项目名称"
min-width="400"
align="center"></el-table-column>
<el-table-column prop="founder"
label="来源"
min-width="150"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ founderKeys[scope.row.founder] }} {{ founderKeys[scope.row.founder] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="creator" label="创建人" min-width="140" align="center"> <el-table-column prop="creator"
label="创建人"
min-width="140"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ queryData.founder == 1 ? scope.row.schoolName : scope.row.creator }} {{ queryData.founder == 1 ? scope.row.schoolName : scope.row.creator }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="权限" min-width="120" align="center"> <el-table-column label="权限"
min-width="120"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ permissionsKeys[scope.row.permissions] }} {{ permissionsKeys[scope.row.permissions] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createTime" label="创建时间" min-width="150" align="center"></el-table-column> <el-table-column prop="createTime"
<el-table-column prop="status" label="状态" min-width="100" align="center"> label="创建时间"
min-width="150"
align="center"></el-table-column>
<el-table-column prop="status"
label="状态"
min-width="100"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ stateKeys[scope.row.state] }} {{ stateKeys[scope.row.state] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="300" align="center"> <el-table-column label="操作"
width="300"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="edit(scope.row)"> <el-button type="text"
@click="edit(scope.row)">
编辑 编辑
</el-button> </el-button>
<el-button type="text" @click="handleDelete(scope.row.projectId)"> <el-button type="text"
@click="handleDelete(scope.row.projectId)">
删除 删除
</el-button> </el-button>
<el-button type="text" @click="copyData(scope.row.projectId)">复制</el-button> <el-button type="text"
<el-switch @click="copyData(scope.row.projectId)">复制</el-button>
v-if="scope.row.state" <el-switch v-if="scope.row.state"
v-model="scope.row.ztOpen" v-model="scope.row.ztOpen"
:active-text="scope.row.ztOpen ? '关闭' : '启用'" :active-text="scope.row.ztOpen ? '关闭' : '启用'"
:active-value="0" :active-value="0"
:inactive-value="1" :inactive-value="1"
style="margin: 0 10px 0 10px" style="margin: 0 10px 0 10px"
@change="switchOff(scope.row)" @change="switchOff(scope.row)"></el-switch>
></el-switch>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background @current-change="handleCurrentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination> <el-pagination background
@current-change="handleCurrentChange"
:current-page="page"
layout="total, prev, pager, next"
:total="total"></el-pagination>
</div> </div>
</el-card> </el-card>
<!--复制对话框--> <!--复制对话框-->
<el-dialog title="复制" :visible.sync="copyVisible" width="24%" center :close-on-click-modal="false"> <el-dialog title="复制"
:visible.sync="copyVisible"
width="24%"
center
:close-on-click-modal="false">
<el-form> <el-form>
<el-form-item> <el-form-item>
<!--前端不用做名称判重了@change='projectNameExistis'--> <!--前端不用做名称判重了@change='projectNameExistis'-->
<el-input placeholder="请输入项目名称" v-model="projectName"></el-input> <el-input placeholder="请输入项目名称"
v-model="projectName"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer"
class="dialog-footer">
<el-button @click="copyVisible = false"> </el-button> <el-button @click="copyVisible = false"> </el-button>
<el-button type="primary" @click="copySubmit"> </el-button> <el-button type="primary"
@click="copySubmit"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
@ -248,7 +310,7 @@ export default {
}, },
handleCurrentChange (val) { // handleCurrentChange (val) { //
this.page = val; this.page = val;
this.$router.push({ this.$router.replace({
path: 'projectList', path: 'projectList',
query: { query: {
...this.$route.query, ...this.$route.query,
@ -380,7 +442,6 @@ export default {
}); });
}, },
goBack () { // goBack () { //
// this.$router.push(`/configure`)
this.$router.back() this.$router.back()
} }
} }
@ -388,5 +449,4 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
</style> </style>

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

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

@ -182,6 +182,7 @@
<script> <script>
import Util from "@/libs/util"; import Util from "@/libs/util";
import Setting from '@/setting' import Setting from '@/setting'
import qs from 'qs'
export default { export default {
data () { data () {
return { return {
@ -395,7 +396,11 @@ export default {
row.isShelves = 1 row.isShelves = 1
return 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() this.getData()
}).catch(({ status }) => { }).catch(({ status }) => {
if (status !== 200) row.isShelves = 1 if (status !== 200) row.isShelves = 1

Loading…
Cancel
Save