yumeng il y a 1 an
Parent
commit
f5776523fc

+ 139 - 139
package.json

@@ -1,139 +1,139 @@
-{
-  "name": "ant-design-vue-jeecg",
-  "version": "2.0.2",
-  "private": true,
-  "scripts": {
-    "serve": "vue-cli-service serve --open",
-    "build": "vue-cli-service build",
-    "lint": "vue-cli-service lint",
-    "test:unit": "vue-cli-service test:unit",
-    "test:e2e": "vue-cli-service test:e2e"
-  },
-  "dependencies": {
-    "@antv/data-set": "^0.10.2",
-    "@femessage/upload-to-ali": "^1.8.1",
-    "@jeecg/antd-online-beta220": "^1.0.1",
-    "@riophae/vue-treeselect": "^0.4.0",
-    "@tinymce/tinymce-vue": "^2.0.0",
-    "ali-oss": "^6.1.1",
-    "ant-design-vue": "^1.3.9",
-    "apexcharts": "^3.6.5",
-    "area-data": "^5.0.6",
-    "axios": "^0.18.0",
-    "babel-loader": "^8.0.6",
-    "blueimp-md5": "^2.11.0",
-    "browser-md5-file": "^1.1.1",
-    "clipboard": "^2.0.4",
-    "codemirror": "^5.46.0",
-    "core-js": "^2.6.12",
-    "cos-js-sdk-v5": "^0.5.26",
-    "dayjs": "^1.8.0",
-    "echarts": "^4.9.0",
-    "echarts-gl": "^1.1.2",
-    "element-ui": "^2.13.0",
-    "enquire.js": "^2.1.6",
-    "html2canvas": "^1.0.0-rc.3",
-    "jquery": "^3.4.1",
-    "js-cookie": "^2.2.0",
-    "lodash.get": "^4.4.2",
-    "lodash.pick": "^4.4.0",
-    "mcanvas": "^1.3.9",
-    "md5": "^2.2.1",
-    "nprogress": "^0.2.0",
-    "promise.prototype.finally": "^3.1.1",
-    "tinymce": "^5.0.2",
-    "viser-vue": "^2.4.4",
-    "vue": "^2.6.10",
-    "vue-apexcharts": "^1.3.2",
-    "vue-class-component": "^6.0.0",
-    "vue-count-to": "^1.0.13",
-    "vue-cropper": "^0.4.8",
-    "vue-i18n": "^8.7.0",
-    "vue-infinite-scroll": "^2.0.2",
-    "vue-layer": "^1.0.2",
-    "vue-lazyload": "^1.3.3",
-    "vue-loader": "^15.7.0",
-    "vue-ls": "^3.2.0",
-    "vue-oss-uploader": "^0.1.10",
-    "vue-photo-preview": "^1.1.3",
-    "vue-preview": "^1.1.3",
-    "vue-print-nb": "^1.7.5",
-    "vue-print-nb-jeecg": "^1.0.8",
-    "vue-property-decorator": "^7.3.0",
-    "vue-router": "^3.0.1",
-    "vue-splitpane": "^1.0.4",
-    "vue-video-player": "^5.0.2",
-    "vue-waterfall-easy": "^2.4.3",
-    "vuedraggable": "^2.20.0",
-    "vuex": "^3.0.1",
-    "vuex-class": "^0.3.1"
-  },
-  "devDependencies": {
-    "@babel/polyfill": "^7.2.5",
-    "@vue/cli-plugin-babel": "^3.3.0",
-    "@vue/cli-plugin-eslint": "^3.3.0",
-    "@vue/cli-service": "^3.3.0",
-    "@vue/eslint-config-standard": "^4.0.0",
-    "babel-eslint": "^10.0.1",
-    "babel-plugin-component": "^1.1.1",
-    "compression-webpack-plugin": "^5.0.1",
-    "eslint": "^5.16.0",
-    "eslint-plugin-vue": "^5.1.0",
-    "html-webpack-plugin": "^3.2.0",
-    "less": "^3.9.0",
-    "less-loader": "^4.1.0",
-    "node-sass": "^4.11.0",
-    "sass-loader": "^7.0.1",
-    "style-resources-loader": "^1.3.2",
-    "vue-cli-plugin-style-resources-loader": "^0.1.3",
-    "vue-template-compiler": "^2.6.10"
-  },
-  "eslintConfig": {
-    "root": true,
-    "env": {
-      "node": true
-    },
-    "extends": [
-      "plugin:vue/strongly-recommended",
-      "eslint:recommended"
-    ],
-    "parserOptions": {
-      "parser": "babel-eslint"
-    },
-    "rules": {
-      "generator-star-spacing": "off",
-      "no-mixed-operators": 0,
-      "vue/max-attributes-per-line": [
-        2,
-        {
-          "singleline": 5,
-          "multiline": {
-            "max": 1,
-            "allowFirstLine": false
-          }
-        }
-      ],
-      "vue/attribute-hyphenation": 0,
-      "vue/html-self-closing": 0,
-      "vue/component-name-in-template-casing": 0,
-      "vue/html-closing-bracket-spacing": 0,
-      "vue/singleline-html-element-content-newline": 0,
-      "vue/no-unused-components": 0,
-      "vue/multiline-html-element-content-newline": 0,
-      "vue/no-use-v-if-with-v-for": 0,
-      "vue/html-closing-bracket-newline": 0,
-      "vue/no-parsing-error": 0,
-      "no-console": 0
-    }
-  },
-  "postcss": {
-    "plugins": {
-      "autoprefixer": {}
-    }
-  },
-  "browserslist": [
-    "> 1%",
-    "last 2 versions",
-    "not ie <= 8"
-  ]
-}
+{
+  "name": "ant-design-vue-jeecg",
+  "version": "2.0.2",
+  "private": true,
+  "scripts": {
+    "serve": "node --max_old_space_size=4096 node_modules/@vue/cli-service/bin/vue-cli-service.js serve",
+    "build": "node --max_old_space_size=4096 node_modules/@vue/cli-service/bin/vue-cli-service.js  build",
+    "lint": "vue-cli-service lint",
+    "test:unit": "vue-cli-service test:unit",
+    "test:e2e": "vue-cli-service test:e2e"
+  },
+  "dependencies": {
+    "@antv/data-set": "^0.10.2",
+    "@femessage/upload-to-ali": "^1.8.1",
+    "@jeecg/antd-online-beta220": "^1.0.1",
+    "@riophae/vue-treeselect": "^0.4.0",
+    "@tinymce/tinymce-vue": "^2.0.0",
+    "ali-oss": "^6.1.1",
+    "ant-design-vue": "^1.3.9",
+    "apexcharts": "^3.6.5",
+    "area-data": "^5.0.6",
+    "axios": "^0.18.0",
+    "babel-loader": "^8.0.6",
+    "blueimp-md5": "^2.11.0",
+    "browser-md5-file": "^1.1.1",
+    "clipboard": "^2.0.4",
+    "codemirror": "^5.46.0",
+    "core-js": "^2.6.12",
+    "cos-js-sdk-v5": "^0.5.26",
+    "dayjs": "^1.8.0",
+    "echarts": "^4.9.0",
+    "echarts-gl": "^1.1.2",
+    "element-ui": "^2.13.0",
+    "enquire.js": "^2.1.6",
+    "html2canvas": "^1.0.0-rc.3",
+    "jquery": "^3.4.1",
+    "js-cookie": "^2.2.0",
+    "lodash.get": "^4.4.2",
+    "lodash.pick": "^4.4.0",
+    "mcanvas": "^1.3.9",
+    "md5": "^2.2.1",
+    "nprogress": "^0.2.0",
+    "promise.prototype.finally": "^3.1.1",
+    "tinymce": "^5.0.2",
+    "viser-vue": "^2.4.4",
+    "vue": "^2.6.10",
+    "vue-apexcharts": "^1.3.2",
+    "vue-class-component": "^6.0.0",
+    "vue-count-to": "^1.0.13",
+    "vue-cropper": "^0.4.8",
+    "vue-i18n": "^8.7.0",
+    "vue-infinite-scroll": "^2.0.2",
+    "vue-layer": "^1.0.2",
+    "vue-lazyload": "^1.3.3",
+    "vue-loader": "^15.7.0",
+    "vue-ls": "^3.2.0",
+    "vue-oss-uploader": "^0.1.10",
+    "vue-photo-preview": "^1.1.3",
+    "vue-preview": "^1.1.3",
+    "vue-print-nb": "^1.7.5",
+    "vue-print-nb-jeecg": "^1.0.8",
+    "vue-property-decorator": "^7.3.0",
+    "vue-router": "^3.0.1",
+    "vue-splitpane": "^1.0.4",
+    "vue-video-player": "^5.0.2",
+    "vue-waterfall-easy": "^2.4.3",
+    "vuedraggable": "^2.20.0",
+    "vuex": "^3.0.1",
+    "vuex-class": "^0.3.1"
+  },
+  "devDependencies": {
+    "@babel/polyfill": "^7.2.5",
+    "@vue/cli-plugin-babel": "^3.3.0",
+    "@vue/cli-plugin-eslint": "^3.3.0",
+    "@vue/cli-service": "^3.3.0",
+    "@vue/eslint-config-standard": "^4.0.0",
+    "babel-eslint": "^10.0.1",
+    "babel-plugin-component": "^1.1.1",
+    "compression-webpack-plugin": "^5.0.1",
+    "eslint": "^5.16.0",
+    "eslint-plugin-vue": "^5.1.0",
+    "html-webpack-plugin": "^3.2.0",
+    "less": "^3.9.0",
+    "less-loader": "^4.1.0",
+    "node-sass": "^4.11.0",
+    "sass-loader": "^7.0.1",
+    "style-resources-loader": "^1.3.2",
+    "vue-cli-plugin-style-resources-loader": "^0.1.3",
+    "vue-template-compiler": "^2.6.10"
+  },
+  "eslintConfig": {
+    "root": true,
+    "env": {
+      "node": true
+    },
+    "extends": [
+      "plugin:vue/strongly-recommended",
+      "eslint:recommended"
+    ],
+    "parserOptions": {
+      "parser": "babel-eslint"
+    },
+    "rules": {
+      "generator-star-spacing": "off",
+      "no-mixed-operators": 0,
+      "vue/max-attributes-per-line": [
+        2,
+        {
+          "singleline": 5,
+          "multiline": {
+            "max": 1,
+            "allowFirstLine": false
+          }
+        }
+      ],
+      "vue/attribute-hyphenation": 0,
+      "vue/html-self-closing": 0,
+      "vue/component-name-in-template-casing": 0,
+      "vue/html-closing-bracket-spacing": 0,
+      "vue/singleline-html-element-content-newline": 0,
+      "vue/no-unused-components": 0,
+      "vue/multiline-html-element-content-newline": 0,
+      "vue/no-use-v-if-with-v-for": 0,
+      "vue/html-closing-bracket-newline": 0,
+      "vue/no-parsing-error": 0,
+      "no-console": 0
+    }
+  },
+  "postcss": {
+    "plugins": {
+      "autoprefixer": {}
+    }
+  },
+  "browserslist": [
+    "> 1%",
+    "last 2 versions",
+    "not ie <= 8"
+  ]
+}

+ 17 - 0
src/api/actor.js

@@ -9,6 +9,23 @@ export function actorList(parameter) {
     })
 }
 
+
+export function getCityList(parameter) {
+    return axios({
+      url: "/ctop/actor/getCityList",
+      method: 'get',
+      params: parameter
+    })
+}
+
+export function getTagList(parameter) {
+    return axios({
+      url: "/ctop/actor/getTagList",
+      method: 'get',
+      params: parameter
+    })
+}
+
 export function propList(parameter) {
     return axios({
       url: "/ctop/prop/list",

BIN
src/assets/img/huichuanglogo.png


+ 352 - 192
src/components/ctop/ActorModal.vue

@@ -1,214 +1,374 @@
 <template>
-  <a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading" @ok="handleOk"
-    @cancel="handleCancel" cancelText="关闭">
-    <a-spin :spinning="confirmLoading">
-      <a-form :form="form">
-
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="演员姓名">
-          <a-input placeholder="请输入演员姓名" v-decorator="['name', validatorRules.name ]" />
-        </a-form-item>
-        <a-form-item label="封面" :labelCol="labelCol" :wrapperCol="wrapperCol">
-          <!-- <upload-to-ali
-            v-model="coverUrl"
-            :customDomain="customDomain"
-            preview
-            :region="region"
-            :bucket="bucket"
-            :accept="acceptImage"
-            :max="1"
-            :size="1024000"
-            :accessKeyId="accessKeyId"
-            :accessKeySecret="accessKeySecret"
-          ></upload-to-ali> -->
-
-          <uploadFile :value.sync="coverUrl" :fileCount="1" uploadType="image" :multiple="false" :sizeCheck="false"/>
-        </a-form-item>
-        <a-form-item label="照片" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="!model.name">
-          <uploadFile :value.sync="imageUrl" :fileCount="10" uploadType="image"  :sizeCheck="false"/>
-          <!-- <upload-to-ali v-model="imageUrl" :customDomain="customDomain" multiple preview :region="region"
-            :bucket="bucket" :accept="acceptImage" :max="10" :size="1024000" :accessKeyId="accessKeyId"
-            :accessKeySecret="accessKeySecret"></upload-to-ali> -->
-        </a-form-item>
-        <a-form-item label="视频作品" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="!model.name">
-          <uploadFile :value.sync="videoUrl" :fileCount="10" uploadType="video" :sizeCheck="false"/>
-          <!-- <upload-to-ali v-model="videoUrl" :customDomain="customDomain" multiple preview :region="region"
-            :bucket="bucket" :accept="acceptVideo" :max="10" :size="1024000" :accessKeyId="accessKeyId"
-            :accessKeySecret="accessKeySecret"></upload-to-ali> -->
-        </a-form-item>
-        <a-form-item label="生日" :labelCol="labelCol" :wrapperCol="wrapperCol">
-          <a-date-picker style="width: 100%" placeholder="请选择生日"
-            v-decorator="['birthday', {initialValue:!model.birthday?null:moment(model.birthday,dateFormat)}]" />
-        </a-form-item>
-
-        <a-form-item label="性别" :labelCol="labelCol" :wrapperCol="wrapperCol">
-          <a-select v-decorator="[ 'sex', {}]" placeholder="请选择性别">
-            <a-select-option :value="1">男</a-select-option>
-            <a-select-option :value="2">女</a-select-option>
-          </a-select>
-        </a-form-item>
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="特长">
-          <a-input placeholder="请输入特长" v-decorator="['speciality']" />
-        </a-form-item>
-
-
-      </a-form>
-    </a-spin>
-  </a-modal>
+    <a-modal :title="title" :width="1000" :visible="visible" :confirmLoading="confirmLoading" @ok="handleOk"
+             @cancel="handleCancel" cancelText="关闭"  :maskClosable="false">
+        <a-spin :spinning="confirmLoading">
+            <a-form :form="form">
+                <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="演员姓名">
+                    <a-input @click="getCity" placeholder="请输入演员姓名"
+                             v-decorator="['name', validatorRules.name ]"/>
+                </a-form-item>
+                <a-form-item label="封面" :labelCol="labelCol" :wrapperCol="wrapperCol">
+                    <uploadFile :value.sync="coverUrl" :fileCount="1" uploadType="image" :multiple="false"
+                                :sizeCheck="false"/>
+                </a-form-item>
+                <a-form-item label="照片" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="!model.name">
+                    <uploadFile :value.sync="imageUrl" :fileCount="10" uploadType="image" :sizeCheck="false"/>
+                </a-form-item>
+                <a-form-item label="视频作品" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="!model.name">
+                    <uploadFile :value.sync="videoUrl" :fileCount="10" uploadType="video" :sizeCheck="false"/>
+                </a-form-item>
+
+
+                <a-form-item label="是否合作" :labelCol="labelCol" :wrapperCol="wrapperCol">
+                    <a-select  v-decorator="[ 'isCooperate', {}]" placeholder="是否合作">
+                        <a-select-option :value="1">已合作</a-select-option>
+                        <a-select-option :value="2">未合作</a-select-option>
+                    </a-select>
+                </a-form-item>
+
+
+                <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="城市">
+                    <a-select
+                        v-decorator="['actorCityId' ]"
+                        placeholder="请选择城市"
+                        showSearch
+                        optionFilterProp="children"
+                        :filterOption="filterOption"
+                        allow-clear
+                    >
+                        <a-select-option
+                            :value="item.cityId"
+                            v-for="(item, index) of cityList"
+                            :key="index"
+                        >
+                            {{ item.cityName }}
+                        </a-select-option>
+                    </a-select>
+                </a-form-item>
+
+
+                <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="手机号码" v-if="roleCode == 'production'">
+                    <a-input placeholder="请输入手机号码" v-decorator="['phone', validatorRules.phone ]"></a-input>
+                </a-form-item>
+
+                <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="身份证号">
+                    <a-input placeholder="请输入身份证号" v-decorator="['idCard', validatorRules.idCard ]"></a-input>
+                </a-form-item>
+
+                <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单价/时薪">
+                    <a-input placeholder="请输入单价/时薪"
+                             v-decorator="['unitPrice', validatorRules.unitPrice ]"></a-input>
+                </a-form-item>
+
+                <a-form-item label="性别" :labelCol="labelCol" :wrapperCol="wrapperCol">
+                    <a-select v-decorator="[ 'sex', {}]" placeholder="请选择性别">
+                        <a-select-option :value="1">男</a-select-option>
+                        <a-select-option :value="2">女</a-select-option>
+                    </a-select>
+                </a-form-item>
+
+                <a-form-item label="身高" :labelCol="labelCol" :wrapperCol="wrapperCol">
+                    <a-input placeholder="请输入身高" addonAfter="cm"
+                             v-decorator="['actorHeight']"></a-input>
+
+                </a-form-item>
+
+                <a-form-item label="体重" :labelCol="labelCol" :wrapperCol="wrapperCol">
+                    <a-input placeholder="请输入体重" addonAfter="kg"
+                             v-decorator="['actorWeight']"></a-input>
+                </a-form-item>
+                <a-form-item label="三围" :labelCol="labelCol" :wrapperCol="wrapperCol">
+                    <a-input placeholder="请输入三围"
+                             v-decorator="['actorThree']"></a-input>
+
+                </a-form-item>
+
+                <a-form-item label="鞋码" :labelCol="labelCol" :wrapperCol="wrapperCol">
+                    <a-input placeholder="请输入鞋码" addonAfter='码'
+                             v-decorator="['actorShoeSize']"></a-input>
+
+                </a-form-item>
+
+
+                <a-form-item label="生日" :labelCol="labelCol" :wrapperCol="wrapperCol">
+                    <a-date-picker style="width: 100%" placeholder="请选择生日"
+                                   v-decorator="['birthday', {initialValue:!model.birthday?null:moment(model.birthday,dateFormat)}]"/>
+                </a-form-item>
+
+                <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="银行名称">
+                    <a-input placeholder="请输入银行名称"
+                             v-decorator="['bankName']"></a-input>
+                </a-form-item>
+
+                <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="银行卡号">
+                    <a-input placeholder="请输入银行名称"
+                             v-decorator="['bankCode']"></a-input>
+                </a-form-item>
+
+
+                <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="标签">
+                    <a-select
+                        v-decorator="['tagList' ]"
+                        placeholder="请选择标签"
+                        showSearch
+                        optionFilterProp="children"
+                        :filterOption="filterOption"
+                        allow-clear
+                        mode="multiple"
+
+                    >
+                        <a-select-option
+                            :value="item.tagId"
+                            v-for="(item, index) of tagArray"
+                            :key="index"
+                        >
+                            {{ item.tagName }}
+                        </a-select-option>
+                    </a-select>
+                </a-form-item>
+
+
+                <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="备注">
+                    <a-input placeholder="请输入备注" v-decorator="['actorRemark']"/>
+                </a-form-item>
+
+            </a-form>
+        </a-spin>
+    </a-modal>
 </template>
 
 <script>
-  import uploadFile from '@/components/uploadFile.vue'
-  import {
+import uploadFile from '@/components/liveUploadFile.vue'
+import {
     httpAction
-  } from '@/api/manage'
-  import pick from 'lodash.pick'
-  import JTreeSelect from '@/components/jeecg/JTreeSelect'
-  import moment from 'moment'
-  import UploadToAli from '@femessage/upload-to-ali'
-  export default {
+} from '@/api/manage'
+import pick from 'lodash.pick'
+import JTreeSelect from '@/components/jeecg/JTreeSelect'
+import moment from 'moment'
+import UploadToAli from '@femessage/upload-to-ali'
+import {actorList, getCityList, getTagList} from "@api/actor";
+import {mapGetters} from "vuex";
+
+export default {
     name: "ActorModal",
     components: {
-      UploadToAli,
-      JTreeSelect,
-      uploadFile
+        UploadToAli,
+        JTreeSelect,
+        uploadFile
     },
     data() {
-      return {
-        title: "操作",
-        visible: false,
-        model: {},
-        videoUrl: [],
-        imageUrl: [],
-        coverUrl: "",
-        customDomain: '',
-        region: 'oss-cn-beijing',
-        bucket: 'ctop-media',
-        acceptVideo: 'video/mpeg,video/mp4',
-        acceptImage: 'image/jpeg,image/jpg,image/png',
-        accessKeyId: 'LTAIbNbqWzSOklQV',
-        accessKeySecret: '1rkPz7JNoXk8sJevPaeYHWqfkQXBGh',
-        dateFormat: "YYYY-MM-DD",
-        labelCol: {
-          xs: {
-            span: 24
-          },
-          sm: {
-            span: 5
-          },
+        return {
+            roleCode: localStorage.getItem('roleCode'),
+            cityList: [],
+            tagArray: [],
+            title: "操作",
+            visible: false,
+            model: {},
+            videoUrl: [],
+            imageUrl: [],
+            coverUrl: "",
+            customDomain: '',
+            region: 'oss-cn-beijing',
+            bucket: 'ctop-media',
+            acceptVideo: 'video/mpeg,video/mp4',
+            acceptImage: 'image/jpeg,image/jpg,image/png',
+            accessKeyId: 'LTAIbNbqWzSOklQV',
+            accessKeySecret: '1rkPz7JNoXk8sJevPaeYHWqfkQXBGh',
+            dateFormat: "YYYY-MM-DD",
+            labelCol: {
+                xs: {
+                    span: 24
+                },
+                sm: {
+                    span: 5
+                },
+            },
+            wrapperCol: {
+                xs: {
+                    span: 24
+                },
+                sm: {
+                    span: 16
+                },
+            },
+
+            confirmLoading: false,
+            form: this.$form.createForm(this),
+            validatorRules: {
+                name: {
+                    rules: [{
+                        required: true,
+                        message: '请输入演员姓名!'
+                    }]
+                },
+
+                phone: {
+                    rules: [{
+                        required: true,
+                        message: '请输入手机号码!'
+                    }]
+                },
+                idCard: {
+                    rules: [{
+                        required: true,
+                        message: '请输入身份证号!'
+                    }]
+                },
+
+                unitPrice: {
+                    rules: [{
+                        required: true,
+                        message: '请输入单价/时薪!'
+                    }]
+                },
+
+            },
+            url: {
+                add: "/ctop/actor/add",
+                edit: "/ctop/actor/edit",
+            },
+        }
+    },
+    created() {
+    },
+    mounted() {
+
+        console.log("654564564564")
+        console.log(this.roleCode)
+    },
+    methods: {
+        moment,
+        ...mapGetters(["nickname", "avatar", "userInfo"]),
+        getCity() {
+            getCityList().then(res => {
+                if (res.code == 0) {
+                    this.cityList = res.result
+                }
+            }),
+                getTagList().then(res => {
+                    if (res.code == 0) {
+                        this.tagArray = res.result
+                    }
+                })
         },
-        wrapperCol: {
-          xs: {
-            span: 24
-          },
-          sm: {
-            span: 16
-          },
+
+
+        filterOption(input, option) {
+            return (
+                option.componentOptions.children[0].text
+                    .toLowerCase()
+                    .indexOf(input.toLowerCase()) >= 0
+            );
         },
 
-        confirmLoading: false,
-        form: this.$form.createForm(this),
-        validatorRules: {
-          name: {
-            rules: [{
-              required: true,
-              message: '请输入演员姓名!'
-            }]
-          },
-          // sex:{initialValue:((!this.model.sex)?"": (this.model.sex+""))},
+
+        fileWater() {
+            return new Promise(function (resolve, reject) {
+            })
         },
-        url: {
-          add: "/ctop/actor/add",
-          edit: "/ctop/actor/edit",
+        add() {
+            this.imageUrl = []
+            this.videoUrl = []
+            this.coverUrl = ""
+            this.edit({});
         },
-      }
-    },
-    created() {},
-    methods: {
-      fileWater() {
-        return new Promise(function (resolve, reject) {
-
-        })
-      },
-      add() {
-        this.imageUrl = []
-        this.videoUrl = []
-        this.coverUrl = ""
-        this.edit({});
-      },
-      edit(record) {
-        console.log(record)
-        let that = this;
-        that.form.resetFields();
-        that.model = Object.assign({}, record);
-        that.visible = true;
-        that.coverUrl = record.coverUrl?record.coverUrl:''
-        // that.imageUrl = ""
-        // that.videoUrl = ""
-        that.$nextTick(() => {
-          that.form.setFieldsValue(pick(this.model, 'name', 'sex', 'speciality'))
-          //时间格式化
-        });
-
-      },
-      close() {
-        this.$emit('close');
-        this.visible = false;
-      },
-      moment,
-      handleOk() {
-        const that = this;
-        // 触发表单验证
-        this.form.validateFields((err, values) => {
-          if (!err) {
-            that.confirmLoading = true;
-            let httpurl = '';
-            let method = '';
-            if (!this.model.id) {
-              httpurl += this.url.add;
-              method = 'post';
-            } else {
-              httpurl += this.url.edit;
-              method = 'put';
-            }
-            if (!values.birthday) {
-              values.birthday = '';
-            } else {
-              values.birthday = values.birthday.format(this.dateFormat);
-            }
-            values.imageUrl = this.imageUrl;
-            values.coverUrl = this.coverUrl
-            values.videoUrl = this.videoUrl;
-            let formData = Object.assign(this.model, values);
-            //时间格式化
-
-            console.log(formData)
-            httpAction(httpurl, formData, method).then((res) => {
-              if (res.success) {
-                that.$message.success(res.message);
-                that.$emit('ok');
-                that.$emit("updateList")
-                this.imageUrl = []
-                this.videoUrl = []
-                this.coverUrl = ""
-              } else {
-                that.$message.warning(res.message);
-              }
-            }).finally(() => {
-              that.confirmLoading = false;
-              that.close();
-            })
+        edit(record) {
 
+            getCityList().then(res => {
+                if (res.code == 0) {
+                    this.cityList = res.result
+                }
+            }),
+                getTagList().then(res => {
+                    if (res.code == 0) {
+                        this.tagArray = res.result
+                    }
+                })
 
-          }
-        })
-      },
-      handleCancel() {
-        this.close()
-      },
+
+            console.log(record)
+            let that = this;
+            that.form.resetFields();
+            that.model = Object.assign({}, record);
+            that.visible = true;
+            that.coverUrl = record.coverUrl ? record.coverUrl : ''
+            // that.imageUrl = ""
+            // that.videoUrl = ""
+            that.$nextTick(() => {
+                that.form.setFieldsValue(pick(this.model, 'id', 'name', 'sex', 'speciality', 'bankName', 'actorCityId', 'actorCityName',
+                    'actorHeight', 'actorRemark', 'actorShoeSize', 'actorThree', 'actorWeight', 'bankCode', 'idCard', 'isCooperate', 'phone',
+                    'unitPrice', 'tagList'
+                ))
+
+                //时间格式化
+            });
+
+
+            console.log("88888888888888")
+            console.log(this.model)
+
+        },
+        close() {
+            this.$emit('close');
+            this.visible = false;
+        },
+
+        handleOk() {
+            console.log(this.imageUrl)
+            const that = this;
+            // 触发表单验证
+            this.form.validateFields((err, values) => {
+                if (!err) {
+                    that.confirmLoading = true;
+                    let httpurl = '';
+                    let method = '';
+                    if (!this.model.id) {
+                        httpurl += this.url.add;
+                        method = 'post';
+                    } else {
+                        httpurl += this.url.edit;
+                        method = 'put';
+                    }
+                    if (!values.birthday) {
+                        values.birthday = '';
+                    } else {
+                        values.birthday = values.birthday.format(this.dateFormat);
+                    }
+                    values.imageUrl = this.imageUrl;
+                    values.coverUrl = this.coverUrl
+                    values.videoUrl = this.videoUrl;
+                    let formData = Object.assign(this.model, values);
+                    formData.userId = this.userInfo().id
+
+                    //时间格式化
+                    console.log(formData)
+                    httpAction(httpurl, formData, method).then((res) => {
+                        if (res.success) {
+                            that.$message.success(res.message);
+                            that.$emit('ok');
+                            that.$emit("updateList")
+                            this.imageUrl = []
+                            this.videoUrl = []
+                            this.coverUrl = ""
+                        } else {
+                            that.$message.warning(res.message);
+                        }
+                    }).finally(() => {
+                        that.confirmLoading = false;
+                        that.close();
+                    })
+
+
+                }
+            })
+        },
+        handleCancel() {
+            this.close()
+        },
 
 
     }
-  }
+}
 </script>
 
 <style lang="less" scoped>

+ 1 - 16
src/components/ctop/propModal.vue

@@ -11,26 +11,11 @@
         <a-form-item label="照片" :labelCol="labelCol" :wrapperCol="wrapperCol">
           <uploadFile  v-if="visible" :value.sync="imageUrl" :fileCount="10"
             uploadType="image" :sizeCheck="false"/>
-          <!-- <upload-to-ali v-model="imageUrl" :customDomain="customDomain" multiple preview :region="region"
-            :bucket="bucket" :accept="acceptImage" :max="10" :size="1024000" :accessKeyId="accessKeyId"
-            :accessKeySecret="accessKeySecret"></upload-to-ali> -->
+
         </a-form-item>
         <a-form-item label="道具类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
           <a-input placeholder="请输入道具类型" v-decorator="['type']" />
         </a-form-item>
-        <!-- <a-form-item label="生日" :labelCol="labelCol" :wrapperCol="wrapperCol">
-          <a-date-picker
-            style="width: 100%"
-            placeholder="请选择生日"
-            v-decorator="['birthday', {initialValue:!model.birthday?null:moment(model.birthday,dateFormat)}]"/>
-        </a-form-item>
-
-        <a-form-item label="性别" :labelCol="labelCol" :wrapperCol="wrapperCol">
-          <a-select v-decorator="[ 'sex', {}]" placeholder="请选择性别">
-            <a-select-option :value="1">男</a-select-option>
-            <a-select-option :value="2">女</a-select-option>
-          </a-select>
-        </a-form-item> -->
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="描述">
           <a-input placeholder="请输入道具描述" v-decorator="['desc']" />
         </a-form-item>

Fichier diff supprimé car celui-ci est trop grand
+ 755 - 585
src/components/ctop/vm-card.vue


+ 273 - 198
src/components/ctop/vm-image-list.vue

@@ -1,19 +1,23 @@
 <style>
 @media (min-width: 1024px) {
-  .checkbox_item_container {
-    width: 70%;
-  }
-} /*>=1024的设备*/
+    .checkbox_item_container {
+        width: 70%;
+    }
+}
+
+/*>=1024的设备*/
 
 @media (min-width: 1100px) {
-  .checkbox_item_container {
-    width: 70%;
-  }
-} /*>=1100的设备*/
+    .checkbox_item_container {
+        width: 70%;
+    }
+}
+
+/*>=1100的设备*/
 @media (min-width: 1280px) {
-  .checkbox_item_container_size {
-    width: 70%;
-  }
+    .checkbox_item_container_size {
+        width: 70%;
+    }
 }
 
 /*>=1280的设备*/
@@ -26,68 +30,114 @@
 
 @media (min-width: 1680px) {
 }
+
 @media (min-width: 1920px) {
-  .checkbox_item_container_size {
-    width: 50%;
-  }
+    .checkbox_item_container_size {
+        width: 50%;
+    }
 }
 </style>
 <template>
-  <div class="vm-image-list">
-    <a-row class="image-list-heading vm-panel">
-      <div class="panel-heading">{{ title }}</div>
-      <a-row type="flex" align="middle" justify="space-between" class="panel-body">
-        <div class="search-bar">
-          <a-button @click="handleAdd" type="primary" icon="plus" style="margin-right:10px">新增</a-button>
-          <a-input placeholder="请输入搜索内容" v-model="keyword" style="width: 300px">
-            <a-icon slot="addonAfter" type="search" style="cursor: pointer;" @click="search" />
-          </a-input>
-          <!--          <Button type="ghost" @click="search"><i class="fa fa-search"></i></Button>-->
-        </div>
-        <a-row type="flex" align="middle" class="page">
-          <!-- <span>第</span>
-          <a-input
-            :max="40"
-            :min="1"
-            :number="true"
-            v-model="showNum"
-            class="input-number"
-            @change="updateDataShow"
-          ></a-input>
-          <span class="margin-end">/ 页</span>
-          <span class="total">总共 {{ data.length }}条</span>
-          <a-pagination
-            :total="data.length"
-            :current="currentPage"
-            :pageSize="showNum"
-            @change="pageChange"
-          ></a-pagination>-->
-
-          <a-pagination showQuickJumper :total="total" @change="pageChange" :pageSize.sync="showNum" />
+    <div class="vm-image-list">
+        <a-row>
+
+            <div class="table-page-search-wrapper">
+                <a-form layout="inline">
+                    <a-row :gutter="24" style="margin-left:10px">
+                        <a-col :md="6" :sm="8">
+                            <a-form-item label="演员名称">
+                                <a-input placeholder="请输入演员名称" v-model="queryParam.name"></a-input>
+                            </a-form-item>
+                        </a-col>
+
+                        <a-col :md="6" :sm="8">
+                            <a-form-item label="标签">
+                                <a-select
+                                    v-model="queryParam.tagList"
+                                    placeholder="请选择标签"
+                                    showSearch
+                                    optionFilterProp="children"
+                                    :filterOption="filterOption"
+                                    allow-clear
+                                    mode="multiple"
+                                >
+                                    <a-select-option
+                                        :value="item.tagId"
+                                        v-for="(item, index) of tagArray"
+                                        :key="index"
+                                    >
+                                        {{ item.tagName }}
+                                    </a-select-option>
+                                </a-select>
+                            </a-form-item>
+                        </a-col>
+                        <a-col :md="6" :sm="8">
+                            <a-form-item label="城市">
+                                <a-select
+                                    v-model="queryParam.cityId"
+                                    placeholder="请选择城市"
+                                    showSearch
+                                    optionFilterProp="children"
+                                    :filterOption="filterOption"
+                                    allow-clear>
+                                    <a-select-option
+                                        :value="item.cityId"
+                                        v-for="(item, index) of cityList"
+                                        :key="index"
+                                    >
+                                        {{ item.cityName }}
+                                    </a-select-option>
+                                </a-select>
+                            </a-form-item>
+                        </a-col>
+
+
+                        <a-col :md="6" :sm="8">
+
+                            <a-button type="primary" @click="search" icon="search" :loading="searchLoading">查询 </a-button>
+                            <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px" :loading="searchLoading">重置
+                            </a-button>
+                            <a-button @click="handleAdd" type="primary" icon="plus" style="margin-left:8px">新增  </a-button>
+                        </a-col>
+
+
+                    </a-row>
+                </a-form>
+            </div>
         </a-row>
-      </a-row>
-    </a-row>
-    <a-row class="image-list" :gutter="16" style="padding:0 8px">
-      <a-col :lg="6" :sm="12" class="vm-margin" style="padding:0"  v-for="(item, index) of dataShow" :key="index" >
-          <vm-card
-          style="margin: 0 15px;"
-          :editable="true"
-          :title="item.name"
-          :img="item.coverUrl"
-          :desc="item.speciality"
-          :detailUrl="item.videoUrl"
-          :editUrl="item.editUrl"      
-          :pageTitle='title'   
-          :id="item.id"
-          :record="item"          
-          @delete-ok="deleteOk({...item,'page':currentPage})"
-          @updateList="updateList"
-        ></vm-card>
-      </a-col>
-    </a-row>
-    <actor-modal ref="modalForm" @ok="modalFormOk" @updateList="updateList" v-if="title=='演员列表'"></actor-modal>
-    <propModal ref="modalForm" @ok="modalFormOk" @updateList="updateList" v-if="title=='道具列表'"></propModal>
-  </div>
+
+
+        <a-row class="image-list" :gutter="16" style="padding:0 8px">
+            <a-col :lg="6" :sm="12" class="vm-margin" style="padding:0" v-for="(item, index) of dataShow" :key="index">
+                <vm-card
+                    style="margin: 0 15px;"
+                    :editable="true"
+                    :title="item.name"
+                    :img="item.coverUrl"
+                    :desc="item.speciality"
+                    :detailUrl="item.videoUrl"
+                    :editUrl="item.editUrl"
+                    :pageTitle='title'
+                    :id="item.id"
+                    :record="item"
+                    @delete-ok="deleteOk({...item,'page':currentPage})"
+                    @updateList="updateList"
+                ></vm-card>
+
+            </a-col>
+        </a-row>
+        <a-row class="image-list-heading vm-panel">
+            <a-row type="flex" align="middle" justify="space-between" class="panel-body">
+                <div class="search-bar">
+                </div>
+                <a-row type="flex" align="middle" class="page">
+                    <a-pagination showQuickJumper :total="total" @change="pageChange" :pageSize.sync="showNum"/>
+                </a-row>
+            </a-row>
+        </a-row>
+        <actor-modal ref="modalForm" @ok="modalFormOk" @updateList="updateList" v-if="title=='演员列表'"></actor-modal>
+        <propModal ref="modalForm" @ok="modalFormOk" @updateList="updateList" v-if="title=='道具列表'"></propModal>
+    </div>
 </template>
 
 <script>
@@ -96,149 +146,174 @@ import ARow from 'ant-design-vue/es/grid/Row'
 import ACol from 'ant-design-vue/es/grid/Col'
 import actorModal from './ActorModal'
 import propModal from './propModal'
-import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import {JeecgListMixin} from '@/mixins/JeecgListMixin'
+import {getCityList, getTagList} from "@api/actor";
+
 export default {
-  name: 'VmImageList',
-  components: {
-    ACol,
-    ARow,
-    VmCard,
-    actorModal,
-    propModal
-  },
-  mixins: [JeecgListMixin],
-  
-  props: {
-    title: {
-      type: String,
-      // default: '演员列表'
+    name: 'VmImageList',
+    components: {
+        ACol,
+        ARow,
+        VmCard,
+        actorModal,
+        propModal
     },
-    // origin data
-    data: {
-      type: Array,
-      default: function() {
-        return [
-          {
-            id: '19920805',
-            title: 'Title',
-            img: require('@/assets/img/img-1.jpg'),
-            desc:
-              "Lorem Ipsum is simply dummy text of the printing and typesetting industry,Lorem Ipsum has been the industry's standard dummy text ever since the 1500s ly dummy tly dummy tly dummy tly dummy tly dummy tly dummy t",
-            to: '#'
-          }
-        ]
-      }
+    mixins: [JeecgListMixin],
+
+    props: {
+        title: {
+            type: String,
+            // default: '演员列表'
+        },
+        // origin data
+        data: {
+            type: Array,
+            default: function () {
+                return [
+                    {
+                        id: '19920805',
+                        title: 'Title',
+                        img: require('@/assets/img/img-1.jpg'),
+                        desc:
+                            "Lorem Ipsum is simply dummy text of the printing and typesetting industry,Lorem Ipsum has been the industry's standard dummy text ever since the 1500s ly dummy tly dummy tly dummy tly dummy tly dummy tly dummy t",
+                        to: '#'
+                    }
+                ]
+            }
+        },
+        total: {
+            type: Number,
+            default() {
+                return 0
+            }
+        }
     },
-    total: {
-      type: Number,
-      default() {
-        return 0
-      }
-    }
-  },
-  data: function() {
-    return {
-      keyword: '', // keyword for search
-      dataShow: [], // data for showing
-      showNum: 8, // number of item per page
-      currentPage: 1,
-      url: {
-        list: '/ctop/actor/list'
-      },
-      columns: [
-        {
-          title: 'ID',
-          align: 'center',
-          dataIndex: 'id'
+    data: function () {
+        return {
+            searchLoading: false,
+            cityList: [],
+            tagArray: [],
+            queryParam: {
+                tagList: []
+
+            },
+            keyword: '', // keyword for search
+            dataShow: [], // data for showing
+            showNum: 8, // number of item per page
+            currentPage: 1,
+            url: {
+                list: '/ctop/actor/list'
+            },
+            columns: [
+                {
+                    title: 'ID',
+                    align: 'center',
+                    dataIndex: 'id'
+                },
+                {
+                    title: '姓名',
+                    align: 'center',
+                    dataIndex: 'name'
+                },
+                {
+                    title: '生日',
+                    align: 'center',
+                    dataIndex: 'birthday'
+                },
+                {
+                    title: '性别',
+                    align: 'center',
+                    dataIndex: 'sex_dictText'
+                },
+                {
+                    title: '特长',
+                    align: 'center',
+                    dataIndex: 'speciality'
+                },
+                {
+                    title: '创建时间',
+                    align: 'center',
+                    dataIndex: 'createTime'
+                },
+                {
+                    title: '操作',
+                    dataIndex: 'action',
+                    align: 'center',
+                    scopedSlots: {customRender: 'action'}
+                }
+            ]
+        }
+    },
+    // provide:{
+    //   page:this.currentPage,
+    // },
+    created() {
+        getCityList().then(res => {
+            if (res.code == 0) {
+                this.cityList = res.result
+            }
+        }),
+            getTagList().then(res => {
+                if (res.code == 0) {
+                    this.tagArray = res.result
+                }
+            })
+    },
+
+    methods: {
+
+        filterOption(input, option) {
+            return (
+                option.componentOptions.children[0].text
+                    .toLowerCase()
+                    .indexOf(input.toLowerCase()) >= 0
+            );
         },
-        {
-          title: '姓名',
-          align: 'center',
-          dataIndex: 'name'
+        updateList() {
+            this.$emit('updateList')
         },
-        {
-          title: '生日',
-          align: 'center',
-          dataIndex: 'birthday'
+        updateDataShow: function () {
+            let startPage = (this.currentPage - 1) * this.showNum
+            let endPage = startPage + this.showNum
+            this.dataShow = this.data.slice(startPage, endPage)
         },
-        {
-          title: '性别',
-          align: 'center',
-          dataIndex: 'sex_dictText'
+        pageChange: function (page) {
+            console.log(page)
+            this.currentPage = page
+
+            this.updateDataShow()
+            this.$emit('getList', page)
         },
-        {
-          title: '特长',
-          align: 'center',
-          dataIndex: 'speciality'
+        deleteOk: function (data) {
+            this.$emit('delete-ok', {page: this.currentPage, ...data})
         },
-        {
-          title: '创建时间',
-          align: 'center',
-          dataIndex: 'createTime'
+        search() {
+            this.searchLoading = true
+            if (this.queryParam) {
+                console.log("开始查询")
+
+                this.$emit('getList', 1, this.queryParam)
+                this.searchLoading = false
+            } else {
+                this.$emit('getList')
+                this.searchLoading = false
+            }
         },
-        {
-          title: '操作',
-          dataIndex: 'action',
-          align: 'center',
-          scopedSlots: { customRender: 'action' }
+        searchReset() {
+            this.searchLoading = true
+            this.queryParam = {}
+            this.$emit('getList')
+            this.searchLoading = false
         }
-      ]
-    }
-  },
-  // provide:{
-  //   page:this.currentPage,
-  // },
-  methods: {
-    updateList() {
-      this.$emit('updateList')
-    },
-    updateDataShow: function() {
-      let startPage = (this.currentPage - 1) * this.showNum
-      let endPage = startPage + this.showNum
-      this.dataShow = this.data.slice(startPage, endPage)
-    },
-    pageChange: function(page) {
-      console.log(page)
-      this.currentPage = page
 
-      this.updateDataShow()
-      this.$emit('getList', page)
     },
-    // search: function() {
-    //   let that = this
-    //   let tempData = that.data
-    //   that.dataShow = []
-    //   tempData.forEach(function(elem) {
-    //     for (let i in elem) {
-    //       if (elem[i].toString().indexOf(that.keyword) > -1) {
-    //         that.dataShow.push(elem)
-    //         return
-    //       }
-    //     }
-    //   })
-    // },
-    // deleteItem(data){
-    //     console.log(data,1)
-    //     this.$emit('delete-ok', {page:this.currentPage,...data})
-    // },
-    deleteOk: function(data) {
-      this.$emit('delete-ok', {page:this.currentPage,...data})
+    watch: {
+        data: function () {
+            this.dataShow = this.data.slice(0, this.showNum) // update dataShow once data changed
+        }
     },
-    search() {
-      if (this.keyword) {
-        this.$emit('getList', 1, this.keyword + '')
-      } else {
-        this.$emit('getList')
-      }
-    }
-  },
-  watch: {
-    data: function() {
-      this.dataShow = this.data.slice(0, this.showNum) // update dataShow once data changed
+    mounted: function () {
+        this.dataShow = this.data.slice(0, this.showNum)
     }
-  },
-  mounted: function() {
-    this.dataShow = this.data.slice(0, this.showNum)
-  }
 }
 </script>

+ 336 - 0
src/components/liveUploadFile.vue

@@ -0,0 +1,336 @@
+<style>
+</style>
+<style lang="scss" scoped>
+</style>
+<template>
+  <div class="upload-file">
+    <a-upload
+      name="file"
+      :multiple="multiple"
+      list-type="picture-card"
+      class="avatar-uploader"
+      action="https://live-1301855440.cos.ap-chongqing.myqcloud.com/"
+      :before-upload="beforeUpload"
+      @change="handleChange"
+      :accept="uploadType == 'script'?'.doc,.txt,.pdf,.xlsx':uploadType + '/' + (uploadType == 'image' ? 'jpeg,image/png' : 'mp4')"
+      :file-list="fileList"
+      :remove="removeFile"
+      @preview="handlePreview"
+      :disabled="loadingElse || disabled"
+    >
+      <div v-if="fileList.length < fileCount || fileList.length < 1">
+        <a-progress v-if="loadingElse" :percent="percent" :show-info="false" />
+        <div class="ant-upload-text">点击上传</div>
+      </div>
+    </a-upload>
+    <div style="color: red" v-if="sizeCheck">
+      {{ uploadType == 'image' ? '请上传jpg,jpeg,png格式的图片,并且大小在'+(size/1024)+'m之内' : uploadType == 'video'?'请上传mp4格式,大小在'+(size/1024)+'m之内':'' }}
+    </div>
+    <a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">
+      <img alt="example" style="width: 100%" :src="previewImage" v-if="uploadType == 'image'" />
+      <video :src="previewImage" v-else-if="uploadType == 'video'" style="width: 100%" controls="controls">您的浏览器不支持 video 标签。</video>
+      <iframe id="iframeData" v-show="uploadType == 'script'" style="width: 100%; height: 500px" :src="previewImage+'?page=hsn#toolbar=0'"></iframe>
+    </a-modal>
+  </div>
+</template>
+
+<script>
+import { stopOtherVideo, closeAllVideoFun } from '@/utils/videoControl' // 停止除当前外的其他视频播放,及停止所有视频播放的方法
+import { mapGetters } from 'vuex'
+import moment from 'moment'
+
+import BMF from 'browser-md5-file'
+
+import qs from 'qs'
+var COS = require('cos-js-sdk-v5')
+var cos = new COS({
+  SecretId: 'AKIDE6IpMi8fJQRCg1iuWzFajjRs43kbbets',
+  SecretKey: 'tXzuwMfplTTK3c9GFUyETilasvQfePu9',
+})
+var i = 0
+const oneKB = 1024
+
+function getBase64(file) {
+  return new Promise((resolve, reject) => {
+    const reader = new FileReader()
+    reader.readAsDataURL(file)
+    reader.onload = () => resolve(reader.result)
+    reader.onerror = (error) => reject(error)
+  })
+}
+export default {
+  name: 'upload-file',
+  components: {},
+  props: {
+    uploadType: {
+      //上传类型  值为  image/video,同时目录名称也是这样
+      type: String,
+      default() {
+        return 'image'
+      },
+    },
+    multiple: {
+      // true 可以批量上传  false 不可以
+      type: Boolean,
+      default() {
+        return true
+      },
+    },
+    fileCount: {
+      //最大上传数量
+      type: Number,
+      default() {
+        return 20
+      },
+    },
+    checkFile: {
+      //返回promise方法,判读文件是否上传过,进行上传拦截
+      type: Function,
+      default() {
+        return Promise.resolve()
+      },
+    },
+    disabled: {
+      type: Boolean,
+      default() {
+        return false
+      },
+    },
+    value: {
+      required: true,
+      default() {
+        return ''
+      },
+    },
+    size: {
+      type: Number,
+      default() {
+
+          if (this.uploadType == 'image') {
+            return 2048
+          } else {
+            return 1024000
+          }
+        
+      },
+    },
+    sizeCheck: {
+      type: Boolean,
+      default() {
+        return true
+      },
+    },
+    onOversize: {
+      type: Function,
+      default() {
+        alert(`请选择${this.size}KB内的文件!`)
+      },
+    },
+  },
+  data() {
+    return {
+      fileList: [],
+      loadingElse: false,
+      imageUrl: '',
+      percent: 0,
+      previewVisible: false,
+      previewImage: '',
+    }
+  },
+  filters: {},
+  computed: {},
+  mounted() {},
+  watch: {
+    //    fileListAll
+    value: {
+      immediate: true,
+      handler(n, o) {
+        this.$nextTick(() => {
+          if (this.fileList && this.fileList.length == 0) {
+            if (typeof n == 'object') {
+              this.fileList = n.map((item, index) => {
+                return {
+                  uid: index + 1,
+                  name: index + 1,
+                  status: 'done',
+                  url: item,
+                }
+              })
+            } else {
+              if (n === '') {
+                this.fileList = []
+              } else {
+                this.fileList = []
+                var data = {
+                  uid: 1,
+                  name: '回显',
+                  status: 'done',
+                  url: n,
+                }
+                this.fileList.push(data)
+              }
+            }
+          } else {
+            if (n.length == 0 || n == '') {
+              this.clearAll()
+            }
+          }
+        })
+      },
+      deep: true,
+    },
+  },
+  methods: {
+    handleCancel() {
+      closeAllVideoFun()
+      this.previewVisible = false
+    },
+    handleChange(info) {
+      if (info.file.status === 'uploading') {
+        this.loading = true
+        return
+      }
+      if (info.file.status === 'done') {
+        // Get this url from response in real world.
+        getBase64(info.file.originFileObj, (imageUrl) => {
+          this.imageUrl = imageUrl
+          this.loading = false
+        })
+      }
+    },
+    removeFile(file) {
+      // console.log(file)
+      var index = this.fileList.findIndex((v) => v.uid === file.uid)
+      this.fileList.splice(index, 1)
+      this.$emit('removeUpload', file)
+    },
+    async handlePreview(file) {
+      if (!file.url && !file.preview) {
+        file.preview = await getBase64(file.originFileObj)
+      }
+      this.previewImage = file.url || file.preview
+      this.previewVisible = true
+    },
+    beforeUpload(file) {
+      this.percent = 0
+      this.loadingElse = true
+      const fileOvesize = file.size > this.size * oneKB
+      // console.log(fileOvesize)
+      if (fileOvesize && this.sizeCheck) {
+        this.onOversize()
+        this.loadingElse = false
+        return
+      } else {
+        this.checkFile(file)
+          .then((res) => {
+            this.cosUpload(file)
+          })
+          .catch(() => {
+            this.loadingElse = false
+          })
+        return new Promise(function (resolve, reject) {
+          reject()
+        })
+      }
+    },
+    clearAll() {
+      this.fileList = []
+    },
+    cosUpload(file) {
+      var that = this
+      let date = new Date()
+      let y = date.getFullYear()
+      let MM = date.getMonth() + 1
+      MM = MM < 10 ? '0' + MM : MM
+      let d = date.getDate()
+      d = d < 10 ? '0' + d : d
+      var timeElse = new Date().getTime()
+      var arr = file.name.split('.')
+
+      var str = ''
+      for (let i = 0; i < arr.length; i++) {
+        if (i == arr.length - 1) {
+        } else {
+          if (i == arr.length - 2) {
+            str += arr[i]
+          } else {
+            str += arr[i] + '.'
+          }
+        }
+      }
+      // console.log(str + '-' + timeElse + '.' + arr[arr.length - 1])
+      cos.putObject(
+        {
+          Bucket: 'live-1301855440',
+          /* 必须 */
+          Region: 'ap-chongqing',
+          /* 存储桶所在地域,必须字段 */
+          Key: that.uploadType + '/' + y + '-' + MM + '-' + d + '/' + str + '-' + timeElse + '.' + arr[arr.length - 1],
+          /* 必须 */
+          StorageClass: 'STANDARD',
+          Body: file, // 上传文件对象
+          onProgress: function (progressData) {
+            //进度条方法
+
+            that.percent = progressData.percent * 100
+          },
+          onTaskReady: function (tid) {
+            // console.log('onTaskReady', tid);
+          },
+          onTaskStart: function (info) {
+            //开始上传
+            // console.log('onTaskStart', info);
+          },
+        },
+        function (err, data) {
+          if (err) {
+            that.loadingElse = false
+            that.$message.error('上传失败!!!' + err)
+            return
+          }
+          // alert('成功')
+          that.loadingElse = false
+          if (that.fileList.length < that.fileCount) {
+            that.fileList.push({
+              uid: file.name,
+              name: file.name,
+              status: 'done',
+              url: '//' + data.Location,
+            })
+
+            // that.$emit('overUpload', that.fileList.map(item => {
+            //                 return item.url
+            //               }))
+            that.$emit('overUpload', that.fileList)
+
+            if (that.multiple) {
+              let urlList =  that.fileList.map((item) => {
+                return item.url
+              })
+             
+                that.$emit(
+                  'update:value',urlList
+                 
+                )
+    
+              
+            } else {
+              that.$emit(
+                'update:value',
+                that.fileList.map((item) => {
+                  return item.url
+                })[0]
+              )
+            }
+          } else {
+            that.$message.error('上传已达上限' + that.fileCount + '张')
+          }
+        }
+      )
+    },
+  },
+}
+</script>
+<style scoped>
+@import '~@assets/less/common.less';
+</style>

+ 11 - 11
src/utils/request.js

@@ -15,18 +15,18 @@ const key = '1';
 
 window.axiosCancel = []
 if (process.env.NODE_ENV === 'development') {
-	axios.defaults.baseURL = '/jeecg-boot';
-}
-else if (process.env.NODE_ENV === 'debug') {
-}
-else if (process.env.NODE_ENV === 'production') {
-	// axios.defaults.baseURL = 'http://apipre.tjyourong.com.cn/jeecg-boot'; // 预生产
-	// axios.defaults.baseURL = 'http://gateway.tjyourong.com.cn/jeecg-boot';//测试
-	axios.defaults.baseURL = 'http://api.tjyourong.com.cn/jeecg-boot'; // 生产环境
-	// axios.defaults.baseURL = 'http://gateway.tjyourong.com.cn/jeecg-boot'; // 测试环境
-	// axios.defaults.baseURL = 'http://192.168.0.195:9999/jeecg-boot'; // 测试环境
-	// axios.defaults.baseURL = 'http://192.168.1.134:9999/jeecg-boot'; // 泽宇环境
+    axios.defaults.baseURL = '/jeecg-boot';
+} else if (process.env.NODE_ENV === 'debug') {
+} else if (process.env.NODE_ENV === 'production') {
+    ACCESS_TOKEN
+    // axios.defaults.baseURL = 'http://apipre.tjyourong.com.cn/jeecg-boot'; // 预生产
+    // axios.defaults.baseURL = 'http://gateway.tjyourong.com.cn/jeecg-boot';//测试
+    // axios.defaults.baseURL = 'http://gateway.tjyourong.com.cn/jeecg-boot'; // 测试环境
+    // axios.defaults.baseURL = 'http://192.168.0.195:9999/jeecg-boot'; // 测试环境
+    // axios.defaults.baseURL = 'http://192.168.1.134:9999/jeecg-boot'; // 泽宇环境2
+    //   axios.defaults.baseURL = 'http://api.tjyourong.com.cn/jeecg-boot'; // 生产环境
 
+    axios.defaults.baseURL = 'http://127.0.0.1:7001/jeecg-boot/'; // 西安
 }
 const service = axios.create({
     // baseURL: '/jeecg-boot', // api base_url

+ 319 - 262
src/views/modules/Statistics/components/live-data-service.js

@@ -4,223 +4,115 @@
  */
 
 class liveDataAll {
-    constructor() { }
+    constructor() {
+    }
+
     // 相关账户的table列表
-    materialColumns() {
+    projectDataColumns() {
         return [
             {
-                title: '时间',
-                dataIndex: 'statDate',
-                scopedSlots: { customRender: 'statDate' },
+                title: '项目',
+                dataIndex: 'projectName',
+                scopedSlots: {customRender: 'projectName'},
                 align: 'center',
-                key: 'statDate',
+                key: 'projectName',
             },
             {
-                title: '视频ID',
-                dataIndex: 'videoId',
-                scopedSlots: { customRender: 'videoId' },
-                align: 'center',
-                key: 'videoId',
-            },
-            {
-                title: '视频url',
-                dataIndex: 'videoUrl',
-                scopedSlots: { customRender: 'videoUrl' },
-                align: 'center',
-                key: 'videoUrl',
-                width: 200,
-            },
-            {
-                title: '花费(元)',
-                dataIndex: 'charge',
-                scopedSlots: { customRender: 'charge' },
+                title: '运营负责人',
+                dataIndex: 'projectLeaderName',
+                scopedSlots: {customRender: 'projectLeaderName'},
                 align: 'center',
-                key: 'charge',
-            },
-            {
-                title: '曝光数',
-                dataIndex: 'shows',
-                scopedSlots: { customRender: 'shows' },
-                align: 'center',
-                key: 'shows',
-            },
-            {
-                title: '封面曝光数',
-                dataIndex: 'photoShow',
-                scopedSlots: { customRender: 'photoShow' },
-                align: 'center',
-                key: 'photoShow',
-            },
-            {
-                title: '封面点击率',
-                dataIndex: 'photoClickRatio',
-                align: 'center',
-                key: 'photoClickRatio',
-                customRender:function(t){
-                    if(t){
-                        return (t*100).toFixed(2)+'%'
-                    }else{
-                        return '-'
-                    }
-                }
-            },
-            {
-                title: '素材曝光数',
-                dataIndex: 'aclick',
-                scopedSlots: { customRender: 'aclick' },
-                align: 'center',
-                key: 'aclick',
-            },
-            {
-                title: '行为数',
-                dataIndex: 'bclick',
-                scopedSlots: { customRender: 'bclick' },
-                align: 'center',
-                key: 'bclick',
-            },
-            {
-                title: '行为率',
-                dataIndex: 'actionRatio',
-                customRender:function(t){
-                    if(t){
-                        return (t*100).toFixed(2)+'%'
-                    }else{
-                        return '-'
-                    }
-                },
-                align: 'center',
-                key: 'actionRatio',
-            },
-            {
-                title: '作品点赞数',
-                dataIndex: 'likes',
-                scopedSlots: { customRender: 'likes' },
-                align: 'center',
-                key: 'likes',
-            },
-            {
-                title: '作品分享数',
-                dataIndex: 'shares',
-                scopedSlots: { customRender: 'shares' },
-                align: 'center',
-                key: 'shares',
-            },
-            {
-                title: '作品评论数',
-                dataIndex: 'comments',
-                scopedSlots: { customRender: 'comments' },
-                align: 'center',
-                key: 'comments',
-            },
-            {
-                title: '作品3秒播放数',
-                dataIndex: 'play3sCount',
-                scopedSlots: { customRender: 'play3sCount' },
-                align: 'center',
-                key: 'play3sCount',
+                key: 'projectLeaderName',
             },
+
             {
-                title: '预约成功数',
-                dataIndex: 'eventAppointSuccess',
-                scopedSlots: { customRender: 'eventAppointSuccess' },
+                title: '设计负责人',
+                dataIndex: 'dessLeaderName',
+                scopedSlots: {customRender: 'dessLeaderName'},
                 align: 'center',
-                key: 'eventAppointSuccess',
+                key: 'dessLeaderName',
             },
+
             {
-                title: '直播观看数',
-                dataIndex: 'liveWatchCount',
-                scopedSlots: { customRender: 'liveWatchCount' },
+                title: '政策类型',
+                dataIndex: 'rebateType',
+                scopedSlots: {customRender: 'rebateType'},
                 align: 'center',
-                key: 'liveWatchCount',
+                key: 'rebateType',
             },
+
             {
-                title: '直接订单数',
-                dataIndex: 'liveOrderCount',
-                scopedSlots: { customRender: 'liveOrderCount' },
+                title: '一级行业',
+                dataIndex: 'settlement1l',
+                scopedSlots: {customRender: 'settlement1l'},
                 align: 'center',
-                key: 'liveOrderCount',
+                key: 'settlement1l',
             },
             {
-                title: '直接GMV',
-                dataIndex: 'liveGmv',
-                scopedSlots: { customRender: 'liveGmv' },
+                title: '二级行业',
+                dataIndex: 'settlement2l',
+                scopedSlots: {customRender: 'settlement2l'},
                 align: 'center',
-                key: 'liveGmv',
+                key: 'settlement2l',
             },
             {
-                title: '直接ROI',
-                dataIndex: 'liveRoi',
-                scopedSlots: { customRender: 'liveRoi' },
+                title: '素材量',
+                dataIndex: 'materialNum',
+                scopedSlots: {customRender: 'materialNum'},
                 align: 'center',
-                key: 'liveRoi',
-            },
-            {
-                title: '涨粉数',
-                dataIndex: 'liveFans',
-                scopedSlots: { customRender: 'liveFans' },
-                align: 'center',
-                key: 'liveFans',
+                key: 'materialNum',
             },
+
             {
-                title: '次日涨粉留存数',
-                dataIndex: 'liveNextDayFans',
-                scopedSlots: { customRender: 'liveNextDayFans' },
+                title: '有效首投数',
+                dataIndex: 'effCount',
+                scopedSlots: {customRender: 'effCount'},
                 align: 'center',
-                key: 'liveNextDayFans',
+                key: 'effCount',
             },
+
             {
-                title: '次日涨粉留存率',
-                dataIndex: 'liveNextDayFansRoi',
-                customRender:function(t){
-                    if(t){
-                        return (t*100).toFixed(2)+'%'
-                    }else{
-                        return '-'
-                    }
-                },
+
+                title: "有效首投率",
+                dataIndex: "color",
+                key: "color",
+                scopedSlots: {customRender: "color"},
                 align: 'center',
-                key: 'liveNextDayFansRoi',
+
             },
+
             {
-                title: '7日涨粉留存数',
-                dataIndex: 'liveFans7d',
-                scopedSlots: { customRender: 'liveFans7d' },
+                title: '媒体考核有效率',
+                dataIndex: 'mediaEffRate',
+                scopedSlots: {customRender: 'mediaEffRate'},
                 align: 'center',
-                key: 'liveFans7d',
+                key: 'mediaEffRate',
             },
             {
-                title: '7日涨粉留存率',
-                dataIndex: 'liveFans7dRoi',
-                customRender:function(t){
-                    if(t){
-                        return (t*100).toFixed(2)+'%'
-                    }else{
-                        return '-'
-                    }
-                },
+                title: '自产素材有效数',
+                dataIndex: 'selfEffCount',
+                scopedSlots: {customRender: 'selfEffCount'},
                 align: 'center',
-                key: 'liveFans7dRoi',
+                key: 'selfEffCount',
             },
+
             {
-                title: '15日涨粉留存数',
-                dataIndex: 'liveFans15d',
-                scopedSlots: { customRender: 'liveFans15d' },
+                title: '自产素材有效占比',
+                dataIndex: 'selfEffRate',
+                scopedSlots: {customRender: 'selfEffRate'},
                 align: 'center',
-                key: 'liveFans15d',
+                key: 'selfEffRate',
             },
+
             {
-                title: '15日涨粉留存率',
-                dataIndex: 'liveFans15dRoi',
-                customRender:function(t){
-                    if(t){
-                        return (t*100).toFixed(2)+'%'
-                    }else{
-                        return '-'
-                    }
-                },
+                title: '三方素材有效数',
+                dataIndex: 'thirdEffCount',
+                scopedSlots: {customRender: 'thirdEffCount'},
                 align: 'center',
-                key: 'liveFans15dRoi',
+                key: 'thirdEffCount',
             },
+
+
         ]
 
     }
@@ -230,73 +122,73 @@ class liveDataAll {
             {
                 title: '时间',
                 dataIndex: 'statDate',
-                scopedSlots: { customRender: 'statDate' },
+                scopedSlots: {customRender: 'statDate'},
                 align: 'center',
                 key: 'statDate',
             },
             {
                 title: '粉丝分层',
                 dataIndex: 'fanStrat',
-                scopedSlots: { customRender: 'fanStrat' },
+                scopedSlots: {customRender: 'fanStrat'},
                 align: 'center',
                 key: 'fanStrat'
             },
             {
                 title: '客群分层',
                 dataIndex: 'customerStrat',
-                scopedSlots: { customRender: 'customerStrat' },
+                scopedSlots: {customRender: 'customerStrat'},
                 align: 'center',
                 key: 'customerStrat',
             },
             {
                 title: '花费(元)',
                 dataIndex: 'charge',
-                scopedSlots: { customRender: 'charge' },
+                scopedSlots: {customRender: 'charge'},
                 align: 'center',
                 key: 'charge',
             },
             {
                 title: '当日累计GMV',
                 dataIndex: 'todayCumulativeGmv',
-                scopedSlots: { customRender: 'todayCumulativeGmv' },
+                scopedSlots: {customRender: 'todayCumulativeGmv'},
                 align: 'center',
                 key: 'todayCumulativeGmv',
             },
             {
                 title: '当日累计ROI',
                 dataIndex: 'todayCumulativeRoi',
-                scopedSlots: { customRender: 'todayCumulativeRoi' },
+                scopedSlots: {customRender: 'todayCumulativeRoi'},
                 align: 'center',
                 key: 'todayCumulativeRoi',
             },
             {
                 title: '当日累计订单数',
                 dataIndex: 'todayCumulativeOrderCount',
-                scopedSlots: { customRender: 'todayCumulativeOrderCount' },
+                scopedSlots: {customRender: 'todayCumulativeOrderCount'},
                 align: 'center',
                 key: 'todayCumulativeOrderCount',
             },
             {
                 title: '曝光用户数',
                 dataIndex: 'showUsers',
-                scopedSlots: { customRender: 'showUsers' },
+                scopedSlots: {customRender: 'showUsers'},
                 align: 'center',
                 key: 'showUsers',
             },
             {
                 title: '购买用户数',
                 dataIndex: 'buyUsers',
-                scopedSlots: { customRender: 'buyUsers' },
+                scopedSlots: {customRender: 'buyUsers'},
                 align: 'center',
                 key: 'buyUsers',
             },
             {
                 title: '购买转化率',
                 dataIndex: 'buyRatio',
-                customRender:function(t){
-                    if(t){
-                        return (t*100).toFixed(2)+'%'
-                    }else{
+                customRender: function (t) {
+                    if (t) {
+                        return (t * 100).toFixed(2) + '%'
+                    } else {
                         return '-'
                     }
                 },
@@ -306,21 +198,21 @@ class liveDataAll {
             {
                 title: 'ARPU',
                 dataIndex: 'arpu',
-                scopedSlots: { customRender: 'arpu' },
+                scopedSlots: {customRender: 'arpu'},
                 align: 'center',
                 key: 'arpu',
             },
             {
                 title: 'UV价值',
                 dataIndex: 'uv',
-                scopedSlots: { customRender: 'uv' },
+                scopedSlots: {customRender: 'uv'},
                 align: 'center',
                 key: 'uv',
             },
             {
                 title: '单均价',
                 dataIndex: 'averagePrice',
-                scopedSlots: { customRender: 'averagePrice' },
+                scopedSlots: {customRender: 'averagePrice'},
                 align: 'center',
                 key: 'averagePrice',
             },
@@ -333,31 +225,31 @@ class liveDataAll {
             {
                 title: '花费',
                 dataIndex: 'charge',
-                scopedSlots: { customRender: 'charge' },
+                scopedSlots: {customRender: 'charge'},
                 align: 'center',
                 key: 'charge',
             },
             {
                 title: '曝光数',
                 dataIndex: 'shows',
-                scopedSlots: { customRender: 'shows' },
+                scopedSlots: {customRender: 'shows'},
                 align: 'center',
                 key: 'shows'
             },
             {
                 title: '封面曝光数',
                 dataIndex: 'photoShow',
-                scopedSlots: { customRender: 'photoShow' },
+                scopedSlots: {customRender: 'photoShow'},
                 align: 'center',
                 key: 'photoShow',
             },
             {
                 title: '封面点击率',
                 dataIndex: 'photoClickRatio',
-                customRender:function(t){
-                    if(t){
-                        return (t*100).toFixed(2)+'%'
-                    }else{
+                customRender: function (t) {
+                    if (t) {
+                        return (t * 100).toFixed(2) + '%'
+                    } else {
                         return '-'
                     }
                 },
@@ -367,24 +259,24 @@ class liveDataAll {
             {
                 title: '素材曝光数',
                 dataIndex: 'aclick',
-                scopedSlots: { customRender: 'aclick' },
+                scopedSlots: {customRender: 'aclick'},
                 align: 'center',
                 key: 'aclick',
             },
             {
                 title: '行为数',
                 dataIndex: 'bclick',
-                scopedSlots: { customRender: 'bclick' },
+                scopedSlots: {customRender: 'bclick'},
                 align: 'center',
                 key: 'bclick',
             },
             {
                 title: '行为率',
                 dataIndex: 'actionRatio',
-                customRender:function(t){
-                    if(t){
-                        return (t*100).toFixed(2)+'%'
-                    }else{
+                customRender: function (t) {
+                    if (t) {
+                        return (t * 100).toFixed(2) + '%'
+                    } else {
                         return '-'
                     }
                 },
@@ -394,42 +286,42 @@ class liveDataAll {
             {
                 title: '直播间商品点击数',
                 dataIndex: 'productClick',
-                scopedSlots: { customRender: 'productClick' },
+                scopedSlots: {customRender: 'productClick'},
                 align: 'center',
                 key: 'productClick',
             },
             {
                 title: '作品点赞数',
                 dataIndex: 'likes',
-                scopedSlots: { customRender: 'likes' },
+                scopedSlots: {customRender: 'likes'},
                 align: 'center',
                 key: 'likes',
             },
             {
                 title: '作品分享数',
                 dataIndex: 'shares',
-                scopedSlots: { customRender: 'shares' },
+                scopedSlots: {customRender: 'shares'},
                 align: 'center',
                 key: 'shares',
             },
             {
                 title: '作品评论数',
                 dataIndex: 'comments',
-                scopedSlots: { customRender: 'comments' },
+                scopedSlots: {customRender: 'comments'},
                 align: 'center',
                 key: 'comments',
             },
             {
                 title: '作品3秒播放数',
                 dataIndex: 'play3sCount',
-                scopedSlots: { customRender: 'play3sCount' },
+                scopedSlots: {customRender: 'play3sCount'},
                 align: 'center',
                 key: 'play3sCount',
             },
             {
                 title: '预约成功数',
                 dataIndex: 'eventAppointSuccess',
-                scopedSlots: { customRender: 'eventAppointSuccess' },
+                scopedSlots: {customRender: 'eventAppointSuccess'},
                 align: 'center',
                 key: 'eventAppointSuccess',
             },
@@ -437,28 +329,28 @@ class liveDataAll {
             {
                 title: '直播观看数',
                 dataIndex: 'liveWatchCount',
-                scopedSlots: { customRender: 'liveWatchCount' },
+                scopedSlots: {customRender: 'liveWatchCount'},
                 align: 'center',
                 key: 'liveWatchCount',
             },
             {
                 title: '直播观看成本',
                 dataIndex: 'liveWatchCost',
-                scopedSlots: { customRender: 'liveWatchCost' },
+                scopedSlots: {customRender: 'liveWatchCost'},
                 align: 'center',
                 key: 'liveWatchCost',
             },
             {
                 title: '涨粉数',
                 dataIndex: 'liveFans',
-                scopedSlots: { customRender: 'liveFans' },
+                scopedSlots: {customRender: 'liveFans'},
                 align: 'center',
                 key: 'liveFans',
             },
             {
                 title: '涨粉成本',
                 dataIndex: 'liveFansCost',
-                scopedSlots: { customRender: 'liveFansCost' },
+                scopedSlots: {customRender: 'liveFansCost'},
                 align: 'center',
                 key: 'liveFansCost',
             },
@@ -471,91 +363,91 @@ class liveDataAll {
             {
                 title: '直播ID',
                 dataIndex: 'liveId',
-                scopedSlots: { customRender: 'liveId' },
+                scopedSlots: {customRender: 'liveId'},
                 align: 'center',
                 key: 'liveId',
             },
             {
                 title: '快手号',
                 dataIndex: 'kuaishouName',
-                scopedSlots: { customRender: 'kuaishouName' },
+                scopedSlots: {customRender: 'kuaishouName'},
                 align: 'center',
                 key: 'kuaishouName'
             },
             {
                 title: '直播开始时间',
                 dataIndex: 'liveStartTime',
-                scopedSlots: { customRender: 'liveStartTime' },
+                scopedSlots: {customRender: 'liveStartTime'},
                 align: 'center',
                 key: 'liveStartTime',
             },
             {
                 title: '直播结束时间',
                 dataIndex: 'liveEndTime',
-                scopedSlots: { customRender: 'liveEndTime' },
+                scopedSlots: {customRender: 'liveEndTime'},
                 align: 'center',
                 key: 'liveEndTime',
             },
             {
                 title: '直播持续时间(分钟)',
                 dataIndex: 'liveDuration',
-                scopedSlots: { customRender: 'liveDuration' },
+                scopedSlots: {customRender: 'liveDuration'},
                 align: 'center',
                 key: 'liveDuration',
             },
             {
                 title: '主播ID',
                 dataIndex: 'anchorId',
-                scopedSlots: { customRender: 'anchorId' },
+                scopedSlots: {customRender: 'anchorId'},
                 align: 'center',
                 key: 'anchorId',
             },
             {
                 title: '花费',
                 dataIndex: 'charge',
-                scopedSlots: { customRender: 'charge' },
+                scopedSlots: {customRender: 'charge'},
                 align: 'center',
                 key: 'charge',
             },
             {
                 title: '行为数',
                 dataIndex: 'bclick',
-                scopedSlots: { customRender: 'bclick' },
+                scopedSlots: {customRender: 'bclick'},
                 align: 'center',
                 key: 'bclick',
             },
             {
                 title: '直播平均观看时长',
                 dataIndex: 'liveWatchAverageTime',
-                scopedSlots: { customRender: 'liveWatchAverageTime' },
+                scopedSlots: {customRender: 'liveWatchAverageTime'},
                 align: 'center',
                 key: 'liveWatchAverageTime',
             },
             {
                 title: '直播间评论数',
                 dataIndex: 'liveComments',
-                scopedSlots: { customRender: 'liveComments' },
+                scopedSlots: {customRender: 'liveComments'},
                 align: 'center',
                 key: 'liveComments',
             },
             {
                 title: '直播间分享数',
                 dataIndex: 'liveShares',
-                scopedSlots: { customRender: 'liveShares' },
+                scopedSlots: {customRender: 'liveShares'},
                 align: 'center',
                 key: 'liveShares',
             },
             {
                 title: '直播间送礼数',
                 dataIndex: 'liveGifts',
-                scopedSlots: { customRender: 'liveGifts' },
+                scopedSlots: {customRender: 'liveGifts'},
                 align: 'center',
                 key: 'liveGifts',
             },
             {
                 title: '涨粉数',
                 dataIndex: 'liveFans',
-                scopedSlots: { customRender: 'liveFans' },
+                scopedSlots: {customRender: 'liveFans'},
                 align: 'center',
                 key: 'liveFans',
             },
@@ -563,35 +455,35 @@ class liveDataAll {
             {
                 title: '涨粉成本',
                 dataIndex: 'liveFansCost',
-                scopedSlots: { customRender: 'liveFansCost' },
+                scopedSlots: {customRender: 'liveFansCost'},
                 align: 'center',
                 key: 'liveFansCost',
             },
             {
                 title: '直播观看数',
                 dataIndex: 'liveWatchCount',
-                scopedSlots: { customRender: 'liveWatchCount' },
+                scopedSlots: {customRender: 'liveWatchCount'},
                 align: 'center',
                 key: 'liveWatchCount',
             },
             {
                 title: '直接订单数',
                 dataIndex: 'liveOrderCount',
-                scopedSlots: { customRender: 'liveOrderCount' },
+                scopedSlots: {customRender: 'liveOrderCount'},
                 align: 'center',
                 key: 'liveOrderCount',
             },
             {
                 title: '直接GMV',
                 dataIndex: 'liveGmv',
-                scopedSlots: { customRender: 'liveGmv' },
+                scopedSlots: {customRender: 'liveGmv'},
                 align: 'center',
                 key: 'liveGmv',
             },
             {
                 title: '直接ROI',
                 dataIndex: 'liveRoi',
-                scopedSlots: { customRender: 'liveRoi' },
+                scopedSlots: {customRender: 'liveRoi'},
                 align: 'center',
                 key: 'liveRoi',
             },
@@ -599,65 +491,230 @@ class liveDataAll {
     }
 
 
-    accountColumns() {
+    totalColumns() {
         return [
             {
-                title: '账户名称(id)',
-                dataIndex: 'accountName',
+                title: '年份',
+                dataIndex: 'delivery_year',
+                align: 'center',
+                key: 'delivery_year',
+                scopedSlots: {customRender: 'delivery_year'},
+            },
+
+            {
+                title: '核算业绩归属季度',
+                dataIndex: 'delivery_quarter',
+                align: 'center',
+                key: 'delivery_quarter',
+                scopedSlots: {customRender: 'delivery_quarter'},
+            },
+            {
+                title: '核算业绩归属月',
+                dataIndex: 'delivery_month',
+                align: 'center',
+                key: 'delivery_month',
+                scopedSlots: {customRender: 'delivery_month'},
+            },
+            {
+                title: '代理商集团',
+                dataIndex: 'agent_combine',
+                align: 'center',
+                key: 'agent_combine',
+                scopedSlots: {customRender: 'agent_combine'},
+            },
+            {
+                title: '竞价分类',
+                dataIndex: 'bid_type',
+                align: 'center',
+                key: 'bid_type',
+                scopedSlots: {customRender: 'bid_type'},
+            },
+            {
+                title: '结算行业统计类型',
+                dataIndex: 'settlement_type',
+                align: 'center',
+                key: 'settlement_type',
+                scopedSlots: {customRender: 'settlement_type'},
+            },
+            {
+                title: '结算二级行业',
+                dataIndex: 'settlement_2l',
+                align: 'center',
+                key: 'settlement_2l',
+                scopedSlots: {customRender: 'settlement_2l'},
+            },
+            {
+                title: '运营标签',
+                dataIndex: 'operation_label',
+                align: 'center',
+                key: 'operation_label',
+                scopedSlots: {customRender: 'operation_label'},
+            },
+            {
+                title: '月度首投视频素材数',
+                dataIndex: 'first_delivery_month_materials',
                 align: 'center',
-                key: 'accountName',
-                scopedSlots: { customRender: 'accountName' },
+                key: 'first_delivery_month_materials',
+                scopedSlots: {customRender: 'first_delivery_month_materials'},
             },
             {
-                title: '账户类型',
-                dataIndex: 'accountType',
+                title: '月度有效视频素材数',
+                dataIndex: 'first_delivery_month_valid_materials',
                 align: 'center',
-                scopedSlots: { customRender: 'accountType' },
+                key: 'first_delivery_month_valid_materials',
+                scopedSlots: {customRender: 'first_delivery_month_valid_materials'},
             },
             {
-                title: '产品名称',
-                dataIndex: 'productName',
+                title: '月度首投有效素材占比',
+                dataIndex: 'valid_material_ratio',
                 align: 'center',
-                scopedSlots: { customRender: 'productName' },
-                width:300
+                key: 'valid_material_ratio',
+                scopedSlots: {customRender: 'valid_material_ratio'},
             },
             {
-                title: '操作',
-                dataIndex: 'action',
+                title: '目标值',
+                dataIndex: 'target_value',
                 align: 'center',
-                scopedSlots: { customRender: 'action' },
+                key: 'target_value',
+                scopedSlots: {customRender: 'target_value'},
             },
+            {
+                title: '返点比例',
+                dataIndex: 'rebate_ratio',
+                align: 'center',
+                key: 'rebate_ratio',
+                scopedSlots: {customRender: 'rebate_ratio'},
+            },
+            {
+                title: '满点差值',
+                dataIndex: 'full_dot_dif',
+                align: 'center',
+                key: 'full_dot_dif',
+                scopedSlots: {customRender: 'full_dot_dif'},
+            },
+            {
+                title: '返点比例上限',
+                dataIndex: 'rebate_ratio_ceiling',
+                align: 'center',
+                key: 'rebate_ratio_ceiling',
+                scopedSlots: {customRender: 'rebate_ratio_ceiling'},
+            },
+            {
+                title: '业绩消耗',
+                dataIndex: 'cost',
+                align: 'center',
+                key: 'cost',
+                scopedSlots: {customRender: 'cost'},
+            },
+            {
+                title: '返点金额',
+                dataIndex: 'rebate_cost',
+                align: 'center',
+                key: 'rebate_cost',
+                scopedSlots: {customRender: 'rebate_cost'},
+            },
+            {
+                title: '满点差值金额',
+                dataIndex: 'full_dot_dif_cost',
+                align: 'center',
+                key: 'full_dot_dif_cost',
+                scopedSlots: {customRender: 'full_dot_dif_cost'},
+            },
+
+
         ]
+
     }
 
 
-    recordColumns() {
+    designColumns() {
         return [
             {
-                title: '账户ID',
-                dataIndex: 'accountId',
+                title: '项目名称',
+                dataIndex: 'projectName',
                 align: 'center',
-                key: 'accountId',
-                scopedSlots: { customRender: 'accountId' },
+                key: 'projectName',
+                scopedSlots: {customRender: 'projectName'},
             },
             {
-                title: '创建时间',
-                dataIndex: 'statDate',
+                title: '项目设计负责人',
+                dataIndex: 'projectDesignLeaderName',
+                align: 'center',
+                key: 'projectDesignLeaderName',
+                scopedSlots: {customRender: 'projectDesignLeaderName'},
+            },
+            {
+                title: '项目运营负责人',
+                dataIndex: 'projectLeaderName',
+                align: 'center',
+                key: 'projectLeaderName',
+                scopedSlots: {customRender: 'projectLeaderName'},
+            },
+            {
+                title: '设计leader',
+                dataIndex: 'leaderName',
+                align: 'center',
+                key: 'leaderName',
+                scopedSlots: {customRender: 'leaderName'},
+            },
+            {
+                title: '设计',
+                dataIndex: 'designName',
+                align: 'center',
+                key: 'designName',
+                scopedSlots: {customRender: 'designName'},
+            },
+            {
+                title: '政策类型',
+                dataIndex: 'rebateType',
+                align: 'center',
+                key: 'rebateType',
+                scopedSlots: {customRender: 'rebateType'},
+            },
+            {
+                title: '一级行业',
+                dataIndex: 'settlement1l',
+                align: 'center',
+                key: 'settlement1l',
+                scopedSlots: {customRender: 'settlement1l'},
+            },
+            {
+                title: '二级行业',
+                dataIndex: 'settlement2l',
+                align: 'center',
+                key: 'settlement2l',
+                scopedSlots: {customRender: 'settlement2l'},
+            },
+            {
+                title: '首投素材量',
+                dataIndex: 'materialNum',
+                align: 'center',
+                key: 'materialNum',
+                scopedSlots: {customRender: 'materialNum'},
+            },
+            {
+                title: '有效首投素材量',
+                dataIndex: 'effMaterialNum',
                 align: 'center',
-                scopedSlots: { customRender: 'statDate' },
+                key: 'effMaterialNum',
+                scopedSlots: {customRender: 'effMaterialNum'},
             },
             {
-                title: '操作人ID',
-                dataIndex: 'userId',
+                title: '有效率',
+                dataIndex: 'effRate',
                 align: 'center',
-                scopedSlots: { customRender: 'userId' },
+                key: 'effRate',
+                scopedSlots: {customRender: 'effRate'},
             },
             {
-                title: '修改时间',
-                dataIndex: 'updateTime',
+                title: '媒体考核有效率',
+                dataIndex: 'mediaEffRate',
                 align: 'center',
-                scopedSlots: { customRender: 'updateTime' },
+                key: 'mediaEffRate',
+                scopedSlots: {customRender: 'mediaEffRate'},
             },
+
+
         ]
     }
 }

Fichier diff supprimé car celui-ci est trop grand
+ 345 - 993
src/views/modules/Statistics/liveData.vue


Fichier diff supprimé car celui-ci est trop grand
+ 992 - 993
src/views/modules/Statistics/salesBudget.vue


+ 48 - 50
src/views/modules/actor/ActorList.vue

@@ -1,67 +1,65 @@
 <template>
-  <vm-image-list :data="dataImageList" :total="total" title="演员列表" @delete-ok="deletefn" class="vm-margin" @getList="getActorList"
-    @updateList="getActorList(1, '')"></vm-image-list>
+    <vm-image-list :data="dataImageList" title="演员列表" @delete-ok="deletefn" class="vm-margin"
+                   @getList="getActorList"
+                   @updateList="getActorList(1, '')" :total="total"></vm-image-list>
 </template>
 
 <script>
-  import VmImageList from '@/components/ctop/vm-image-list'
-  import {
+import VmImageList from '@/components/ctop/vm-image-list'
+import {
     actorList,
     actorListDelete
-  } from '@/api/actor'
-  export default {
+} from '@/api/actor'
+
+export default {
     name: 'ImageList',
     components: {
-      VmImageList
+        VmImageList
     },
     // inject:[page],
     mounted() {
-      this.$nextTick(() => {
-        this.getActorList(1)
-      })
+        this.$nextTick(() => {
+            this.getActorList(1)
+
+        })
     },
     methods: {
-      deletefn: function (data) {
-        console.log('最外层deleteFn执行',data)
-        actorListDelete({
-          id:data.id
-        }).then(res=>{
-          if(res.success){
-            this.$message.success('删除成功')
-            // for (let i = 0; i < this.dataImageList.length; i++) {
-            //   if (this.dataImageList[i].id === data.id) {
-            //     this.dataImageList.splice(i, 1)
-            //   }
-            // }
-            this.getActorList(data.page)
-          }else{
-            this.$message.error('删除失败,稍后再试')
-          }
-          
-        })
-        
-      },
-      getActorList(page, name) {
-        this.dataImageList = []
-        actorList({
-          pageNo: page,
-          pageSize: 8,
-          name: name
-        }).then(res => {
-          if (res.code == 0) {
-            this.dataImageList = res.result.records
-            this.total = res.result.total
-          }
-        })
-      }
+        deletefn: function (data) {
+            console.log('最外层deleteFn执行', data)
+            actorListDelete({
+                id: data.id
+            }).then(res => {
+                if (res.success) {
+                    this.$message.success('删除成功')
+                    this.getActorList(data.page)
+                } else {
+                    this.$message.error('删除失败,稍后再试')
+                }
+            })
+
+        },
+        getActorList(page, name) {
+            this.listLoading = true
+            this.dataImageList = []
+            actorList({
+                pageNo: page,
+                pageSize: 8,
+                name: name
+            }).then(res => {
+                if (res.code == 0) {
+                    this.dataImageList = res.result.records
+                    this.total = res.result.total
+                    this.listLoading = false
+                }
+            })
+            this.listLoading = false
+        }
     },
     data: function () {
-      return {
-        dataImageList: [
-
-        ],
-        total: null
-      }
+        return {
+            dataImageList: [],
+            total: null
+        }
     }
-  }
+}
 </script>

Fichier diff supprimé car celui-ci est trop grand
+ 587 - 616
src/views/modules/advertiser/modules/ProjectModal.vue


Fichier diff supprimé car celui-ci est trop grand
+ 567 - 599
src/views/modules/advertiser/modules/projectListModal.vue


+ 5 - 0
src/views/modules/image/ImageList.vue

@@ -6,6 +6,7 @@
     class="vm-margin"
     @getList="getActorList"
     @updateList="getActorList(1,'')"
+    :loading="listLoading"
   ></vm-image-list>
 </template>
 
@@ -31,17 +32,21 @@ export default {
       }
     },
     getActorList(page,name) {
+        this.listLoading = true
       this.dataImageList = []
       actorList({ pageNo: page, pageSize: 8,name:name }).then(res => {
         if (res.code == 0) {
           this.dataImageList = res.result.records
           this.total = res.result.total
+            this.listLoading = false
         }
+          this.listLoading = false
       })
     }
   },
   data: function() {
     return {
+        listLoading:false,
       dataImageList: [
         {
           id: '1',

+ 0 - 9
src/views/modules/material/videoMaterial.vue

@@ -1330,15 +1330,6 @@ a {
             :multiple="true"
             v-if="batchUploadVisible"
           />
-          <!-- <uploadFile
-            :checkFile="file"
-            :value.sync="urlList.url"
-            @overUpload="overUpload"
-            @removeUpload="removeUpload"
-            :fileCount="2"
-            uploadType="video"
-            :multiple="true"
-          /> -->
         </a-form-model-item>
 
         <a-form-model-item :wrapper-col="{ span: 14, offset: 4 }">

Fichier diff supprimé car celui-ci est trop grand
+ 715 - 699
src/views/modules/stockWatch/modules/new-keepManage/personal-keepManage.vue


+ 17 - 33
src/views/modules/yard/YardList.vue

@@ -54,42 +54,9 @@
     <!-- 操作按钮区域 -->
     <div class="table-operator">
       <a-button @click="handleAdd" v-show="show" type="primary" icon="plus">新增</a-button>
-      <a-pagination showQuickJumper :total="ipagination.total" v-model="ipagination.current" style="float:right" @change="totalpageChange" :pageSize.sync="ipagination.pageSize" />
     </div>
 
-    <!-- table区域-begin -->
     <div>
-      <!-- <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource"
-        :pagination="ipagination" :loading="loading">
-        
-        <span slot="esContent" slot-scope="text">
-          <j-ellipsis :value="text" :length="10" />
-        </span>
-
-        <span slot="action" slot-scope="text, record">
-          <a href="javascript:;" @click="handleDetail(record)">详情</a>
-          <a-divider type="vertical" />
-          <a-dropdown>
-            <a class="ant-dropdown-link">
-              更多
-              <a-icon type="down" />
-            </a>
-            <a-menu slot="overlay">
-              <a-menu-item v-show="show">
-                <a @click="handleEdit(record)">编辑</a>
-              </a-menu-item>
-              <a-menu-item v-show="show">
-                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
-                  <a>删除</a>
-                </a-popconfirm>
-              </a-menu-item>
-            </a-menu>
-          </a-dropdown>
-          <a-divider type="vertical" />
-          <a href="javascript:;" @click="showDetail(record)">场地信息</a>
-        </span>
-      </a-table> -->
-
 
       <a-row class="image-list" :gutter="16" style="padding:0 8px">
       <a-col :lg="6" :sm="12" class="vm-margin" style="padding:0"  v-for="(item, index) of dataSource" :key="index" >
@@ -111,6 +78,21 @@
         ></vm-card>
       </a-col>
     </a-row>
+
+        <a-row class="image-list-heading vm-panel">
+            <a-row type="flex" align="middle" justify="space-between" class="panel-body">
+                <div class="search-bar">
+                </div>
+                <a-row type="flex" align="middle" class="page">
+                    <a-pagination showQuickJumper :total="ipagination.total" v-model="ipagination.current" style="float:right" @change="totalpageChange" :pageSize.sync="ipagination.pageSize" />
+                </a-row>
+            </a-row>
+        </a-row>
+
+
+<!--        <div class="table-operator">
+            <a-pagination showQuickJumper :total="ipagination.total" v-model="ipagination.current" style="float:right" @change="totalpageChange" :pageSize.sync="ipagination.pageSize" />
+        </div>-->
     </div>
     <!-- table区域-end -->
 
@@ -220,10 +202,12 @@
     yardVideoAdd,
     yardListDelete
   } from '@/api/yard'
+  import ARow from "_ant-design-vue@1.7.8@ant-design-vue/lib/grid/Row";
   export default {
     name: 'YardList',
     mixins: [JeecgListMixin],
     components: {
+        ARow,
       JEllipsis,
       YardModal,
       UploadToAli,

Fichier diff supprimé car celui-ci est trop grand
+ 661 - 660
src/views/user/Login.vue


+ 132 - 132
vue.config.js

@@ -1,133 +1,133 @@
-const path = require('path')
-const CompressionPlugin = require('compression-webpack-plugin')
-const TerserPlugin = require("terser-webpack-plugin");
-function resolve(dir) {
-  return path.join(__dirname, dir)
-}
-// var appData = require('./json/video.json')//加载本地数据文件
-
-// vue.config.js
-module.exports = {
-  /*
-    Vue-cli3:
-    Crashed when using Webpack `import()` #2463
-    https://github.com/vuejs/vue-cli/issues/2463
-   */
-  // 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。
-  productionSourceMap: false,
-  /*
-  pages: {
-    index: {
-      entry: 'src/main.js',
-      chunks: ['chunk-vendors', 'chunk-common', 'index']
-    }
-  },
-  */
-  configureWebpack: () => {
-    if (process.env.NODE_ENV === 'production') {
-      return {
-        plugins: [new CompressionPlugin({
-          test: /\.js$|\.html$|\.css/,
-          threshold: 10240,
-          deleteOriginalAssets: false
-        }), new TerserPlugin({
-          cache: true,//降版本后添加
-          sourceMap: false,//降版本后添加
-          // 多进程
-          parallel: true,//降版本后添加
-          terserOptions: {
-            ecma: undefined,
-            warnings: false,
-            parse: {},
-            compress: {
-              drop_console: true,
-              drop_debugger: false,
-              pure_funcs: ['console.log'], // 移除console
-            },
-          },
-        }),]
-      }
-    }
-  },
-
-  chainWebpack: (config) => {
-    config.resolve.alias
-      .set('@$', resolve('src'))
-      .set('@base', resolve('src/base'))
-      .set('@api', resolve('src/api'))
-      .set('@assets', resolve('src/assets'))
-      .set('@comp', resolve('src/components'))
-      .set('@views', resolve('src/views'))
-      .set('@layout', resolve('src/layout'))
-      .set('@static', resolve('src/static'));
-    config.plugins.delete('prefetch')
-  },
-  pluginOptions: {
-    'style-resources-loader': {
-      preProcessor: 'less',
-      patterns: [
-        resolve('src/styles/var.less'),
-        resolve('src/styles/mixin.less')
-      ]
-    }
-  },
-  css: {
-    loaderOptions: {
-      less: {
-        modifyVars: {
-          /* less 变量覆盖,用于自定义 ant design 主题 */
-
-          /*
-          'primary-color': '#F5222D',
-          'link-color': '#F5222D',
-          'border-radius-base': '4px',
-          */
-        },
-        javascriptEnabled: true,
-      }
-    }
-  },
-
-  devServer: {
-    hot: true,
-    // inline: true,
-    port: 3000,
-    open: true,
-    proxy: {
-      '/jeecg-boot': {
-        // target: 'http://192.168.1.22:7001', //请求本地 需要jeecg-boot后台项目  蒙蒙
-        // target: 'http://192.168.1.181:7001', //请求本地 需要jeecg-boot后台项目  赵西安
-        // target: 'http://192.168.1.193:8080', //请求本地 需要jeecg-boot后台项目  李煜一
-        // target: 'http://192.168.1.193:31012', //请求本地 需要jeecg-boot后台项目  李煜一
-        target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
-        // target: 'https://trac.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
-        // target: 'http://39.106.184.70:8088/', //请求本地 需要jeecg-boot后台项目
-        //  target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目
-        // target: 'http://192.168.1.251/', //请求本地 需要jeecg-boot后台项目
-        // target:'http://118.24.244.213:8804',
-        // target: 'http://192.168.1.43:9999', // 子安
-        // target: 'http://192.168.1.8:9999', // 学超
-        // target:'http://192.168.0.195:9999',//测试
-
-
-        ws: false,
-
-        // changeOrigin: true,
-        // pathRewrite: {
-        //     '/jeecg-boot': ''  //默认所有请求都加了jeecg-boot前缀,需要去掉
-        // }
-      },
-    },
-    // before(app) {
-    //     app.get('/seller', (req, res) => {
-    //         res.json({
-    //           errno: 0,
-    //           data: appData
-    //         })//接口返回json数据,上面配置的数据seller就赋值给data请求后调用
-    //     })
-    // }
-  },
-
-  lintOnSave: undefined,
-  //   publicPath:'./',
+const path = require('path')
+const CompressionPlugin = require('compression-webpack-plugin')
+const TerserPlugin = require("terser-webpack-plugin");
+function resolve(dir) {
+  return path.join(__dirname, dir)
+}
+// var appData = require('./json/video.json')//加载本地数据文件
+
+// vue.config.js
+module.exports = {
+  /*
+    Vue-cli3:
+    Crashed when using Webpack `import()` #2463
+    https://github.com/vuejs/vue-cli/issues/2463
+   */
+  // 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。
+  productionSourceMap: false,
+  /*
+  pages: {
+    index: {
+      entry: 'src/main.js',
+      chunks: ['chunk-vendors', 'chunk-common', 'index']
+    }
+  },
+  */
+  configureWebpack: () => {
+    if (process.env.NODE_ENV === 'production') {
+      return {
+        plugins: [new CompressionPlugin({
+          test: /\.js$|\.html$|\.css/,
+          threshold: 10240,
+          deleteOriginalAssets: false
+        }), new TerserPlugin({
+          cache: true,//降版本后添加
+          sourceMap: false,//降版本后添加
+          // 多进程
+          parallel: true,//降版本后添加
+          terserOptions: {
+            ecma: undefined,
+            warnings: false,
+            parse: {},
+            compress: {
+              drop_console: true,
+              drop_debugger: false,
+              pure_funcs: ['console.log'], // 移除console
+            },
+          },
+        }),]
+      }
+    }
+  },
+
+  chainWebpack: (config) => {
+    config.resolve.alias
+      .set('@$', resolve('src'))
+      .set('@base', resolve('src/base'))
+      .set('@api', resolve('src/api'))
+      .set('@assets', resolve('src/assets'))
+      .set('@comp', resolve('src/components'))
+      .set('@views', resolve('src/views'))
+      .set('@layout', resolve('src/layout'))
+      .set('@static', resolve('src/static'));
+    config.plugins.delete('prefetch')
+  },
+  pluginOptions: {
+    'style-resources-loader': {
+      preProcessor: 'less',
+      patterns: [
+        resolve('src/styles/var.less'),
+        resolve('src/styles/mixin.less')
+      ]
+    }
+  },
+  css: {
+    loaderOptions: {
+      less: {
+        modifyVars: {
+          /* less 变量覆盖,用于自定义 ant design 主题 */
+
+          /*
+          'primary-color': '#F5222D',
+          'link-color': '#F5222D',
+          'border-radius-base': '4px',
+          */
+        },
+        javascriptEnabled: true,
+      }
+    }
+  },
+
+  devServer: {
+    hot: true,
+    // inline: true,
+    port: 3000,
+    open: true,
+    proxy: {
+      '/jeecg-boot': {
+        // target: 'http://192.168.1.22:7001', //请求本地 需要jeecg-boot后台项目  蒙蒙
+        // target: 'http://192.168.1.181:7001', //请求本地 需要jeecg-boot后台项目  赵西安
+        // target: 'http://192.168.1.193:8080', //请求本地 需要jeecg-boot后台项目  李煜一
+        // target: 'http://192.168.1.193:31012', //请求本地 需要jeecg-boot后台项目  李煜一
+       // target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
+        // target: 'https://trac.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
+        // target: 'http://39.106.184.70:8088/', //请求本地 需要jeecg-boot后台项目
+        //  target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目
+        // target: 'http://192.168.1.251/', //请求本地 需要jeecg-boot后台项目
+         target:'http://127.0.0.1:7001',
+        // target: 'http://192.168.1.43:9999', // 子安
+        // target: 'http://192.168.1.8:9999', // 学超
+        // target:'http://192.168.0.195:9999',//测试
+
+
+        ws: false,
+
+        // changeOrigin: true,
+        // pathRewrite: {
+        //     '/jeecg-boot': ''  //默认所有请求都加了jeecg-boot前缀,需要去掉
+        // }
+      },
+    },
+    // before(app) {
+    //     app.get('/seller', (req, res) => {
+    //         res.json({
+    //           errno: 0,
+    //           data: appData
+    //         })//接口返回json数据,上面配置的数据seller就赋值给data请求后调用
+    //     })
+    // }
+  },
+
+  lintOnSave: undefined,
+  //   publicPath:'./',
 }