保安服务企业管理项目备份
guoshilong
2023-12-29 0e9a0eb30199a4cb41307633a54b2cd4eb37a330
src/page/index/top/userSManual.vue
@@ -4,7 +4,7 @@
    <basic-container id="PDFmain">
      <iframe
        id="PDFmainIFRAM"
        src="/pfd/build/generic/web/viewer.html"
        :src="src"
        width="100%"
        height="100%"
      >
@@ -38,6 +38,7 @@
export default {
  data() {
    return {
      src:"/pfd/build/generic/web/viewer.html",
      openUp: false,
      userSManual_upBut: "none",
      index: 0,
@@ -62,7 +63,7 @@
                //   text: " ",
                //   ratio: 0.1,
                // },
                action: "/api/blade-resource/oss/endpoint/put-file",
                action: "/api/blade-resource/oss/endpoint/put-files",
                // action: "/api/blade-resource/oss/endpoint/put-file-attach",
                // tip: "只能上传jpg/png用户头像,且不超过500kb",
                span: 24,
@@ -94,54 +95,54 @@
              },
            ],
          },
          {
            label: "上传用户手册-民警版",
            prop: "info",
            column: [
              {
                label: "用户手册",
                type: "upload",
                // listType: "picture-img",
                propsHttp: {
                  res: "data",
                  url: "link",
                },
                // canvasOption: {
                //   text: " ",
                //   ratio: 0.1,
                // },
                action: "/api/blade-resource/oss/endpoint/put-file",
                // action: "/api/blade-resource/oss/endpoint/put-file-attach",
                // tip: "只能上传jpg/png用户头像,且不超过500kb",
                span: 24,
                row: true,
                prop: "link",
                labelWidth: 180,
              },
              {
                label: "首次上传时间",
                span: 24,
                row: true,
                prop: "createTime",
                labelWidth: 180,
                type: "datetime",
                disabled: true,
                format: "yyyy-MM-dd HH:mm:ss",
                valueFormat: "yyyy-MM-dd HH:mm:ss",
              },
              {
                label: "上次更新时间",
                span: 24,
                row: true,
                prop: "updateTime",
                labelWidth: 180,
                type: "datetime",
                disabled: true,
                format: "yyyy-MM-dd HH:mm:ss",
                valueFormat: "yyyy-MM-dd HH:mm:ss",
              },
            ],
          },
          // {
          //   label: "上传用户手册-民警版",
          //   prop: "info",
          //   column: [
          //     {
          //       label: "用户手册",
          //       type: "upload",
          //       // listType: "picture-img",
          //       propsHttp: {
          //         res: "data",
          //         url: "link",
          //       },
          //       // canvasOption: {
          //       //   text: " ",
          //       //   ratio: 0.1,
          //       // },
          //       action: "/api/blade-resource/oss/endpoint/put-file",
          //       // action: "/api/blade-resource/oss/endpoint/put-file-attach",
          //       // tip: "只能上传jpg/png用户头像,且不超过500kb",
          //       span: 24,
          //       row: true,
          //       prop: "link",
          //       labelWidth: 180,
          //     },
          //     {
          //       label: "首次上传时间",
          //       span: 24,
          //       row: true,
          //       prop: "createTime",
          //       labelWidth: 180,
          //       type: "datetime",
          //       disabled: true,
          //       format: "yyyy-MM-dd HH:mm:ss",
          //       valueFormat: "yyyy-MM-dd HH:mm:ss",
          //     },
          //     {
          //       label: "上次更新时间",
          //       span: 24,
          //       row: true,
          //       prop: "updateTime",
          //       labelWidth: 180,
          //       type: "datetime",
          //       disabled: true,
          //       format: "yyyy-MM-dd HH:mm:ss",
          //       valueFormat: "yyyy-MM-dd HH:mm:ss",
          //     },
          //   ],
          // },
        ],
      },
      form: {},
@@ -152,9 +153,9 @@
    ...mapGetters(["userInfo"]),
  },
  created() {
    if (this.userInfo.role_name == "民警") {
      this.index = 1;
    }
    // if (this.userInfo.role_name == "民警") {
    //   this.index = 1;
    // }
    this.handleWitch();
    if (this.userInfo.role_name == "administrator") {
      this.userSManual_upBut = "block";
@@ -162,7 +163,7 @@
      this.userSManual_upBut = "none";
    }
  },
  methods: {
    openUps() {
@@ -174,7 +175,7 @@
      done();
    },
    uploadAfter(res, done, loading, column) {
      this.link = res.link;
      this.link = res.url;
      done();
    },
    handleSubmit(form, done) {
@@ -267,8 +268,12 @@
    },
    handleWitch() {
      if (this.index === 0) {
        //获取文件详情
        getDetails(10).then((res) => {
          const att = res.data.data;
          console.log(att,"+++++++++++++++++++++++++++++")
          if (this.intime) {
            clearInterval(this.intime);
            this.setUrl(att.link);
@@ -327,4 +332,4 @@
    height: 100%;
  }
}
</style>
</style>