| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296 |
- <div id="app" v-cloak>
- <el-card shadow="never" style="border:0;min-width: 1200px;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
- <div slot="header">
- <div>
- <span>设置升级条件</span>
- </div>
- </div>
- <div class="table-body">
- <el-form :model="ruleForm" :rules="rules" ref="ruleForm" @close="handleClose('ruleForm')">
- <el-form-item label="升级条件" :label-width="formLabelWidth" prop="level">
- <template>
- <el-checkbox-group v-model="ruleForm.checked_condition_keys" class="check-group">
- <div style="margin-top: 20px" v-for="item in upgrade_condition">
- <el-checkbox :label="item.id" v-model="item.id" border size="medium">{{item.content}}</el-checkbox>
- </div>
- </el-checkbox-group>
- </template>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button :loading="btnLoading" type="primary" @click="postAdd('ruleForm')">确 定</el-button>
- </div>
- </div>
- </el-card>
- </div>
- <script>
- new Vue({
- el: '#app',
- data() {
- return {
- activeName: "1",
- btnLoading: false,
- tableData: [],
- rules: {
- },
- upgrade_condition:[],
- ruleForm: {
- checked_condition_keys:[1,2]
- },
- formLabelWidth: '150px',
- }
- },
- created() {
- this.getList();
- },
- methods: {
- postAdd(formName) {
- this.btnLoading = true;
- this.$refs[formName].validate((valid) => {
- if (valid) {
- this.$request({
- method: "post",
- params: {
- r: 'lucky-group/group-level/condition',
- },
- data: this.ruleForm
- }).then(e => {
- if (e.data.code == 0) {
- this.btnLoading = false;
- this.$message({
- message: e.data.msg,
- type: 'success'
- });
- navigateTo({
- r: 'lucky-group/group-level/index',
- })
- }else{
- this.$message.error(e.data.msg);
- }
- }).catch(e => {});
- }
- });
- },
- getList(){
- this.$request({
- params: {
- r: 'lucky-group/group-level/condition',
- },
- }).then(e => {
- if(e.data.code==0){
- this.upgrade_condition = e.data.data.upgrade_condition;
- this.ruleForm.checked_condition_keys = e.data.data.checked_condition_keys
- }else{
- this.$message.error(e.data.msg);
- }
- console.log(e.data.data);
- }).catch(e => {});
- },
- goodsSelect(){
- },
- picUrl(e) {
- if (e.length) {
- this.ruleForm.pic_url = e[0].url;
- this.$refs.ruleForm.validateField('pic_url');
- }
- },
- },
- });
- </script>
- <style>
- .table-body {
- padding: 20px 20px;
- background-color: #fff;
- }
- .table-body .top-input {
- margin-top: 34px;
- }
- .input-item {
- width: 200px;
- margin-right: 20px;
- }
- .input-item .el-input__inner {
- border-right: 0;
- }
- .input-item .el-input__inner:hover {
- border: 1px solid #dcdfe6;
- border-right: 0;
- outline: 0;
- }
- .input-item .el-input__inner:focus {
- border: 1px solid #dcdfe6;
- border-right: 0;
- outline: 0;
- }
- .input-item .el-input-group__append {
- background-color: #fff;
- border-left: 0;
- width: 10%;
- padding: 0;
- }
- .input-item .el-input-group__append .el-button {
- padding: 0;
- }
- .input-item .el-input-group__append .el-button {
- margin: 0;
- }
- /* #app .table-body .el-table .el-button {
- border-radius: 16px;
- } */
- .create {
- height: 36px;
- line-height: 36px;
- float: right;
- color: #BCBCBC;
- margin-left: 20px;
- }
- .name {
- cursor: pointer;
- color: #49A9FF;
- }
- /* 卡片 */
- .plugin-list {
- margin: 0 0 0 -20px;
- /* padding-right: 100px; */
- display: flex;
- flex-wrap: wrap;
- }
- .plugin-list .plugin-item {
- width: 20%;
- min-width: 400px;
- }
- .plugin-item {
- border: 1px solid #ebebeb;
- background: #FFFFFF;
- box-shadow: 3px 5px 15px rgba(80, 80, 80, 0.16);
- opacity: 1;
- border-radius: 5px;
- padding: 20px;
- margin: 0 0 20px 20px;
- transition: 250ms;
- position: relative;
- /* min-width: 300px; */
- }
- .plugin-item .item-status {
- position: absolute;
- top: 0;
- right: 0;
- width: 94px;
- height: 30px;
- background: #E8EAEC;
- opacity: 1;
- border-radius: 0px 5px 0px 5px;
- font-size: 14px;
- font-family: Microsoft YaHei;
- font-weight: 400;
- line-height: 30px;
- color: #9398A4;
- text-align: center;
- }
- .item-status-permanent {
- width: 94px;
- }
- .item-status-effective {
- width: 164px;
- }
- .plugin-item .item-info {
- display: flex;
- align-items: center;
- }
- /* .plugin-item .item-info .item-right{
- min-width: 500px;
- } */
- .plugin-item .item-btns {
- display: flex;
- align-items: center;
- justify-content: flex-end;
- margin-top: 12px;
- }
- .plugin-item .mall-logo {
- width: 70px;
- height: 70px;
- margin-right: 12px;
- }
- .plugin-item .mall-logo img {
- width: 100%;
- height: 100%;
- display: block;
- border-radius: 50%;
- }
- .plugin-item .display-name {
- font-size: 18pt;
- margin-top: 10px;
- margin-bottom: 4px;
- font-family: Microsoft YaHei;
- font-weight: bold;
- line-height: 30px;
- color: #3F495D;
- opacity: 1;
- width: 200px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .plugin-item .name {
- color: #909399;
- }
- .plugin-item:hover {
- cursor: pointer;
- border-color: #bfddff;
- }
- /* .plugin-item:hover .display-name {
- color: #409EFF;
- } */
- .plugin-item .plugin-option-btn {
- height: 25px;
- width: 25px;
- font-size: 12px;
- padding: 0;
- }
- .plugin-item .detail-option.detail-option {
- color: #909399;
- background: #F2F6FC;
- }
- .plugin-item .detail-option:hover {
- color: #fff;
- background: #909399;
- }
- </style>
|