Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui
This commit is contained in:
		
						commit
						08fcbe9acf
					
				@ -64,6 +64,12 @@ export default {
 | 
				
			|||||||
          minWidth: 180,
 | 
					          minWidth: 180,
 | 
				
			||||||
          tooltip: true,
 | 
					          tooltip: true,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          title: "店铺名称",
 | 
				
			||||||
 | 
					          key: "storeName",
 | 
				
			||||||
 | 
					          minWidth: 100,
 | 
				
			||||||
 | 
					          tooltip: true,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          title: "支付方式",
 | 
					          title: "支付方式",
 | 
				
			||||||
          key: "paymentMethod",
 | 
					          key: "paymentMethod",
 | 
				
			||||||
 | 
				
			|||||||
@ -39,6 +39,12 @@
 | 
				
			|||||||
            <Radio :label="1">强制更新</Radio>
 | 
					            <Radio :label="1">强制更新</Radio>
 | 
				
			||||||
            <Radio :label="0">非强制更新</Radio>
 | 
					            <Radio :label="0">非强制更新</Radio>
 | 
				
			||||||
          </RadioGroup>
 | 
					          </RadioGroup>
 | 
				
			||||||
 | 
					          <span class="tips" v-if="form.forceUpdate == 1">
 | 
				
			||||||
 | 
					           强制更新即为应用中必须更新此版本。不更新则无法继续使用App
 | 
				
			||||||
 | 
					          </span>
 | 
				
			||||||
 | 
					          <span class="tips" v-if="form.forceUpdate == 0">
 | 
				
			||||||
 | 
					           非强制更新为应用中推荐更新此版本。不更新还可以继续使用
 | 
				
			||||||
 | 
					          </span>
 | 
				
			||||||
        </FormItem>
 | 
					        </FormItem>
 | 
				
			||||||
        <FormItem label="类型">
 | 
					        <FormItem label="类型">
 | 
				
			||||||
          <RadioGroup type="button" button-style="solid" v-model="form.type">
 | 
					          <RadioGroup type="button" button-style="solid" v-model="form.type">
 | 
				
			||||||
 | 
				
			|||||||
@ -31,7 +31,7 @@
 | 
				
			|||||||
    <!-- 菜单权限 -->
 | 
					    <!-- 菜单权限 -->
 | 
				
			||||||
    <Modal :title="modalTitle" v-model="permModalVisible" :mask-closable="false" :width="500" :styles="{ top: '30px' }" class="permModal">
 | 
					    <Modal :title="modalTitle" v-model="permModalVisible" :mask-closable="false" :width="500" :styles="{ top: '30px' }" class="permModal">
 | 
				
			||||||
      <div style="position: relative">
 | 
					      <div style="position: relative">
 | 
				
			||||||
        <Tree ref="tree" :data="permData" show-checkbox :render="renderContent" :check-strictly="true">
 | 
					        <Tree ref="tree" :data="permData" show-checkbox :render="renderContent">
 | 
				
			||||||
        </Tree>
 | 
					        </Tree>
 | 
				
			||||||
        <Spin size="large" fix v-if="treeLoading"></Spin>
 | 
					        <Spin size="large" fix v-if="treeLoading"></Spin>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
@ -43,7 +43,7 @@
 | 
				
			|||||||
          <Option value="2">仅展开一级</Option>
 | 
					          <Option value="2">仅展开一级</Option>
 | 
				
			||||||
          <Option value="3">仅展开两级</Option>
 | 
					          <Option value="3">仅展开两级</Option>
 | 
				
			||||||
        </Select>
 | 
					        </Select>
 | 
				
			||||||
        <Button type="primary" :loading="submitPermLoading" @click="submitPermEdit(true)">编辑
 | 
					        <Button type="primary" :loading="submitPermLoading" @click="submitPermEdit()">编辑
 | 
				
			||||||
        </Button>
 | 
					        </Button>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </Modal>
 | 
					    </Modal>
 | 
				
			||||||
@ -287,11 +287,6 @@ export default {
 | 
				
			|||||||
            display: "inline-block",
 | 
					            display: "inline-block",
 | 
				
			||||||
            cursor: "pointer",
 | 
					            cursor: "pointer",
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          on: {
 | 
					 | 
				
			||||||
            click: () => {
 | 
					 | 
				
			||||||
              data.checked = !data.checked;
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        [
 | 
					        [
 | 
				
			||||||
          h("span", [
 | 
					          h("span", [
 | 
				
			||||||
@ -307,9 +302,29 @@ export default {
 | 
				
			|||||||
            }),
 | 
					            }),
 | 
				
			||||||
            h("span", data.title),
 | 
					            h("span", data.title),
 | 
				
			||||||
            h(
 | 
					            h(
 | 
				
			||||||
              "span",
 | 
					              "Tag",
 | 
				
			||||||
              { class: { tips: true } },
 | 
					              {
 | 
				
			||||||
              data.isSuper ? "操作权限" : "查看权限"
 | 
					                props: {
 | 
				
			||||||
 | 
					                  type:
 | 
				
			||||||
 | 
					                    data.isSuper == true
 | 
				
			||||||
 | 
					                      ? "red"
 | 
				
			||||||
 | 
					                      : data.isSuper == false
 | 
				
			||||||
 | 
					                      ? "default"
 | 
				
			||||||
 | 
					                      : "",
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					                style: {
 | 
				
			||||||
 | 
					                  "margin-left": "10px",
 | 
				
			||||||
 | 
					                  display:
 | 
				
			||||||
 | 
					                    data.isSuper == true || data.isSuper == false
 | 
				
			||||||
 | 
					                      ? "inline-block"
 | 
				
			||||||
 | 
					                      : "none",
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					              },
 | 
				
			||||||
 | 
					              data.isSuper == true
 | 
				
			||||||
 | 
					                ? "操作权限"
 | 
				
			||||||
 | 
					                : data.isSuper == false
 | 
				
			||||||
 | 
					                ? "查看权限"
 | 
				
			||||||
 | 
					                : ""
 | 
				
			||||||
            ),
 | 
					            ),
 | 
				
			||||||
          ]),
 | 
					          ]),
 | 
				
			||||||
        ]
 | 
					        ]
 | 
				
			||||||
@ -510,6 +525,24 @@ export default {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    // 菜单权限
 | 
					    // 菜单权限
 | 
				
			||||||
    async editPerm(v) {
 | 
					    async editPerm(v) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      /**
 | 
				
			||||||
 | 
					       * 点击菜单权限每次将赋值的isSuper数据给清空掉
 | 
				
			||||||
 | 
					       */
 | 
				
			||||||
 | 
					      this.permData.map((item) => {
 | 
				
			||||||
 | 
					        item.children.length != 0
 | 
				
			||||||
 | 
					          ? item.children.map((child) => {
 | 
				
			||||||
 | 
					              child.children.length != 0
 | 
				
			||||||
 | 
					                ? child.children.map((kid) => {
 | 
				
			||||||
 | 
					                    delete kid.isSuper;
 | 
				
			||||||
 | 
					                  })
 | 
				
			||||||
 | 
					                : "";
 | 
				
			||||||
 | 
					              delete child.isSuper;
 | 
				
			||||||
 | 
					            })
 | 
				
			||||||
 | 
					          : "";
 | 
				
			||||||
 | 
					        delete item.isSuper;
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      if (this.treeLoading) {
 | 
					      if (this.treeLoading) {
 | 
				
			||||||
        this.$Message.warning("菜单权限数据加载中,请稍后点击查看");
 | 
					        this.$Message.warning("菜单权限数据加载中,请稍后点击查看");
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
@ -524,9 +557,8 @@ export default {
 | 
				
			|||||||
        rolePerms = res.result;
 | 
					        rolePerms = res.result;
 | 
				
			||||||
        this.rolePermsWay = res.result;
 | 
					        this.rolePermsWay = res.result;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      // 递归判断子节点
 | 
					      // 递归判断子节点是否可以选中
 | 
				
			||||||
      this.checkPermTree(this.permData, rolePerms);
 | 
					      this.checkPermTree(this.permData, rolePerms);
 | 
				
			||||||
 | 
					 | 
				
			||||||
      this.permModalVisible = true;
 | 
					      this.permModalVisible = true;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // 递归判断子节点
 | 
					    // 递归判断子节点
 | 
				
			||||||
@ -576,8 +608,8 @@ export default {
 | 
				
			|||||||
      this.selectIsSuperModel = true; //打开选择权限
 | 
					      this.selectIsSuperModel = true; //打开选择权限
 | 
				
			||||||
      let selectedNodes = this.$refs.tree.getCheckedNodes();
 | 
					      let selectedNodes = this.$refs.tree.getCheckedNodes();
 | 
				
			||||||
      let way = [];
 | 
					      let way = [];
 | 
				
			||||||
 | 
					 | 
				
			||||||
      selectedNodes.forEach((e) => {
 | 
					      selectedNodes.forEach((e) => {
 | 
				
			||||||
 | 
					       
 | 
				
			||||||
        let perm = {
 | 
					        let perm = {
 | 
				
			||||||
          title: e.title,
 | 
					          title: e.title,
 | 
				
			||||||
          isSuper: e.isSuper,
 | 
					          isSuper: e.isSuper,
 | 
				
			||||||
@ -597,7 +629,7 @@ export default {
 | 
				
			|||||||
        if (res.success) {
 | 
					        if (res.success) {
 | 
				
			||||||
          this.$Message.success("操作成功");
 | 
					          this.$Message.success("操作成功");
 | 
				
			||||||
          // 标记重新获取菜单数据
 | 
					          // 标记重新获取菜单数据
 | 
				
			||||||
          this.$store.commit('setAdded', false);
 | 
					          this.$store.commit("setAdded", false);
 | 
				
			||||||
          util.initRouter(this);
 | 
					          util.initRouter(this);
 | 
				
			||||||
          this.getRoleList();
 | 
					          this.getRoleList();
 | 
				
			||||||
          this.permModalVisible = false;
 | 
					          this.permModalVisible = false;
 | 
				
			||||||
@ -609,7 +641,7 @@ export default {
 | 
				
			|||||||
      loadDepartment(item.id, { openDataFilter: false }).then((res) => {
 | 
					      loadDepartment(item.id, { openDataFilter: false }).then((res) => {
 | 
				
			||||||
        if (res.success) {
 | 
					        if (res.success) {
 | 
				
			||||||
          res.result.forEach(function (e) {
 | 
					          res.result.forEach(function (e) {
 | 
				
			||||||
            e.selected = false;
 | 
					            e.checked = false;
 | 
				
			||||||
            if (e.isParent) {
 | 
					            if (e.isParent) {
 | 
				
			||||||
              e.loading = false;
 | 
					              e.loading = false;
 | 
				
			||||||
              e.children = [];
 | 
					              e.children = [];
 | 
				
			||||||
@ -632,9 +664,9 @@ export default {
 | 
				
			|||||||
      let that = this;
 | 
					      let that = this;
 | 
				
			||||||
      depData.forEach(function (p) {
 | 
					      depData.forEach(function (p) {
 | 
				
			||||||
        if (that.hasDepPerm(p, roleDepIds)) {
 | 
					        if (that.hasDepPerm(p, roleDepIds)) {
 | 
				
			||||||
          p.selected = true;
 | 
					          p.checked = true;
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
          p.selected = false;
 | 
					          p.checked = false;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
				
			|||||||
@ -8,21 +8,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        </RadioGroup>
 | 
					        </RadioGroup>
 | 
				
			||||||
      </FormItem>
 | 
					      </FormItem>
 | 
				
			||||||
      <div class="label-item">
 | 
					 | 
				
			||||||
        <FormItem label="小图宽" prop="smallPictureWidth">
 | 
					 | 
				
			||||||
          <Input type="number" v-model="formValidate.smallPictureWidth">
 | 
					 | 
				
			||||||
          <span slot="prepend">宽</span>
 | 
					 | 
				
			||||||
          <span slot="append">px</span>
 | 
					 | 
				
			||||||
          </Input>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        </FormItem>
 | 
					 | 
				
			||||||
        <FormItem label="小图高" class="label-item" prop="smallPictureHeight">
 | 
					 | 
				
			||||||
          <Input type="number" v-model="formValidate.smallPictureHeight">
 | 
					 | 
				
			||||||
          <span slot="prepend">高</span>
 | 
					 | 
				
			||||||
          <span slot="append">px</span>
 | 
					 | 
				
			||||||
          </Input>
 | 
					 | 
				
			||||||
        </FormItem>
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
      <div class="label-item">
 | 
					      <div class="label-item">
 | 
				
			||||||
        <FormItem class="label-item" label="缩略图宽" prop="abbreviationPictureWidth">
 | 
					        <FormItem class="label-item" label="缩略图宽" prop="abbreviationPictureWidth">
 | 
				
			||||||
          <Input type="number" v-model="formValidate.abbreviationPictureWidth">
 | 
					          <Input type="number" v-model="formValidate.abbreviationPictureWidth">
 | 
				
			||||||
@ -38,6 +23,21 @@
 | 
				
			|||||||
          </Input>
 | 
					          </Input>
 | 
				
			||||||
        </FormItem>
 | 
					        </FormItem>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
 | 
					      <div class="label-item">
 | 
				
			||||||
 | 
					        <FormItem label="小图宽" prop="smallPictureWidth">
 | 
				
			||||||
 | 
					          <Input type="number" v-model="formValidate.smallPictureWidth">
 | 
				
			||||||
 | 
					          <span slot="prepend">宽</span>
 | 
				
			||||||
 | 
					          <span slot="append">px</span>
 | 
				
			||||||
 | 
					          </Input>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        </FormItem>
 | 
				
			||||||
 | 
					        <FormItem label="小图高" class="label-item" prop="smallPictureHeight">
 | 
				
			||||||
 | 
					          <Input type="number" v-model="formValidate.smallPictureHeight">
 | 
				
			||||||
 | 
					          <span slot="prepend">高</span>
 | 
				
			||||||
 | 
					          <span slot="append">px</span>
 | 
				
			||||||
 | 
					          </Input>
 | 
				
			||||||
 | 
					        </FormItem>
 | 
				
			||||||
 | 
					      </div>
 | 
				
			||||||
      <div class="label-item">
 | 
					      <div class="label-item">
 | 
				
			||||||
        <FormItem class="label-item" label="原图宽高" prop="originalPictureWidth">
 | 
					        <FormItem class="label-item" label="原图宽高" prop="originalPictureWidth">
 | 
				
			||||||
          <Input type="number" v-model="formValidate.originalPictureWidth">
 | 
					          <Input type="number" v-model="formValidate.originalPictureWidth">
 | 
				
			||||||
@ -70,7 +70,8 @@ export default {
 | 
				
			|||||||
  props: ["res", "type"],
 | 
					  props: ["res", "type"],
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      formValidate: { // 表单数据
 | 
					      formValidate: {
 | 
				
			||||||
 | 
					        // 表单数据
 | 
				
			||||||
        goodsCheck: 1,
 | 
					        goodsCheck: 1,
 | 
				
			||||||
        smallPictureHeight: "0",
 | 
					        smallPictureHeight: "0",
 | 
				
			||||||
        smallPictureWidth: "0",
 | 
					        smallPictureWidth: "0",
 | 
				
			||||||
@ -82,7 +83,7 @@ export default {
 | 
				
			|||||||
      progressVal: 0,
 | 
					      progressVal: 0,
 | 
				
			||||||
      showProgress: false,
 | 
					      showProgress: false,
 | 
				
			||||||
      intervalProgress: null,
 | 
					      intervalProgress: null,
 | 
				
			||||||
      ruleValidate: {} // 验证规则
 | 
					      ruleValidate: {}, // 验证规则
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  created() {
 | 
					  created() {
 | 
				
			||||||
@ -93,7 +94,7 @@ export default {
 | 
				
			|||||||
    submit(name) {
 | 
					    submit(name) {
 | 
				
			||||||
      let that = this;
 | 
					      let that = this;
 | 
				
			||||||
      if (handleSubmit(that, name)) {
 | 
					      if (handleSubmit(that, name)) {
 | 
				
			||||||
        this.setupSetting()
 | 
					        this.setupSetting();
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    //重新生成所有商品索引
 | 
					    //重新生成所有商品索引
 | 
				
			||||||
@ -104,14 +105,16 @@ export default {
 | 
				
			|||||||
          this.showProgress = true;
 | 
					          this.showProgress = true;
 | 
				
			||||||
          setTimeout(() => {
 | 
					          setTimeout(() => {
 | 
				
			||||||
            this.intervalProgress = setInterval(() => {
 | 
					            this.intervalProgress = setInterval(() => {
 | 
				
			||||||
              getProgress().then(resp => {
 | 
					              getProgress().then((resp) => {
 | 
				
			||||||
                let progressResult = resp.result
 | 
					                let progressResult = resp.result;
 | 
				
			||||||
                if (progressResult != null && progressResult.flag === 0) {
 | 
					                if (progressResult != null && progressResult.flag === 0) {
 | 
				
			||||||
                  clearInterval(this.intervalProgress);
 | 
					                  clearInterval(this.intervalProgress);
 | 
				
			||||||
                  this.showProgress = false;
 | 
					                  this.showProgress = false;
 | 
				
			||||||
                  this.$Message.success("生成成功!");
 | 
					                  this.$Message.success("生成成功!");
 | 
				
			||||||
                } else {
 | 
					                } else {
 | 
				
			||||||
                  this.progressVal = Math.floor((progressResult.processed / progressResult.total) * 100);
 | 
					                  this.progressVal = Math.floor(
 | 
				
			||||||
 | 
					                    (progressResult.processed / progressResult.total) * 100
 | 
				
			||||||
 | 
					                  );
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
              });
 | 
					              });
 | 
				
			||||||
            }, 1000);
 | 
					            }, 1000);
 | 
				
			||||||
@ -119,21 +122,21 @@ export default {
 | 
				
			|||||||
        } else if (res.code === 100000) {
 | 
					        } else if (res.code === 100000) {
 | 
				
			||||||
          this.showProgress = true;
 | 
					          this.showProgress = true;
 | 
				
			||||||
          this.intervalProgress = setInterval(() => {
 | 
					          this.intervalProgress = setInterval(() => {
 | 
				
			||||||
            getProgress().then(resp => {
 | 
					            getProgress().then((resp) => {
 | 
				
			||||||
              let progressResult = resp.result
 | 
					              let progressResult = resp.result;
 | 
				
			||||||
              if (progressResult != null && progressResult.flag === 0) {
 | 
					              if (progressResult != null && progressResult.flag === 0) {
 | 
				
			||||||
                clearInterval(this.intervalProgress);
 | 
					                clearInterval(this.intervalProgress);
 | 
				
			||||||
                this.showProgress = false;
 | 
					                this.showProgress = false;
 | 
				
			||||||
                this.$Message.success("生成成功!");
 | 
					                this.$Message.success("生成成功!");
 | 
				
			||||||
              } else {
 | 
					              } else {
 | 
				
			||||||
                this.progressVal = Math.floor((progressResult.processed / progressResult.total) * 100);
 | 
					                this.progressVal = Math.floor(
 | 
				
			||||||
 | 
					                  (progressResult.processed / progressResult.total) * 100
 | 
				
			||||||
 | 
					                );
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
          }, 1000);
 | 
					          }, 1000);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // 保存设置
 | 
					    // 保存设置
 | 
				
			||||||
    setupSetting() {
 | 
					    setupSetting() {
 | 
				
			||||||
@ -173,7 +176,6 @@ export default {
 | 
				
			|||||||
          },
 | 
					          },
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
 | 
					 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user