diff --git a/.env.development b/.env.development index c363340..e279ae7 100644 --- a/.env.development +++ b/.env.development @@ -9,11 +9,11 @@ ENV = 'development' # 接口地址 http://8.130.96.163:8899 # 线上 - VUE_APP_BASE_API = 'http://39.100.77.21:8899' - +# VUE_APP_BASE_API = 'http://39.100.77.21:8899' +# VUE_APP_BASE_API = 'https://baiyee.vip' # ts -# VUE_APP_BASE_API = 'http://172.18.0.228:8899' -VUE_APP_BASE_IMG = 'https://baiyee.vip' +VUE_APP_BASE_API = 'http://172.18.0.228:8899' +# VUE_APP_BASE_IMG = 'https://baiyee.vip' # 测试 # VUE_APP_BASE_IMG = 'http://39.100.77.21:8899' VUE_APP_WS_API = 'wss://baiyee.vip' diff --git a/package.json b/package.json index 6e837ae..8b701de 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,8 @@ "vuedraggable": "2.20.0", "vuex": "3.1.0", "wangeditor": "^3.1.1", - "xlsx": "^0.17.3" + "xlsx": "^0.18.5", + "xlsx-style": "^0.8.13" }, "devDependencies": { "@babel/core": "7.0.0", diff --git a/src/api/index.js b/src/api/index.js index 40f0c70..72563e8 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -33,6 +33,14 @@ export function fileUploads(data) { data }) } +// 导入文件-ai +export function trafficUpload(data) { + return request({ + url: 'api-management/api/telephone/traffic/upload', + method: 'post', + data + }) +} // 上传记录 export function queryRecordList(userId) { const param = { @@ -329,7 +337,7 @@ export function taskDel(params) { params }) } -// 编辑备注 +// 编辑任务 export function taskUpdate(data) { return request({ url: baseObj.url + 'api/task/update', @@ -1178,9 +1186,17 @@ export function modeUploadFiles(data) { }) } // 广告模型-建模 -export function recordBuild(params) { +export function recordBuild(data) { return request({ url: baseObj.url + 'api/mode/record/build', + method: 'post', + data + }) +} +// ai任务开光 +export function trafficUpdate(params) { + return request({ + url: baseObj.url + 'api/telephone/traffic/update', method: 'get', params }) diff --git a/src/layout/index.vue b/src/layout/index.vue index df40e4d..8a8a93a 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -1,116 +1,116 @@ - - - - - + + + + + diff --git a/src/views/adminGroup/group/formulaIndex.vue b/src/views/adminGroup/group/formulaIndex.vue index 10469da..50a84c9 100644 --- a/src/views/adminGroup/group/formulaIndex.vue +++ b/src/views/adminGroup/group/formulaIndex.vue @@ -273,7 +273,7 @@ export default { watch: { 'crud.data': { handler(newVal, oldV) { - this.topScript = newVal.top.answer + this.topScript = newVal.top && newVal.top.answer ? newVal.top.answer : '' }, deep: true } @@ -284,6 +284,7 @@ export default { window.onresize = function temp() { that.height = document.documentElement.clientHeight - 180 + 'px;' } + console.log('=crud.data', crud.data) }, methods: { changevisible(v) { diff --git a/src/views/administration/index.vue b/src/views/administration/index.vue index 3bc012b..71663f2 100644 --- a/src/views/administration/index.vue +++ b/src/views/administration/index.vue @@ -83,7 +83,7 @@ - +
-
+
只能上传.xls,.xlsx文件,且不超过100M + 模板下载
@@ -33,7 +34,7 @@
- +
@@ -73,9 +74,9 @@ class="filter-item" @keyup.enter.native="crud.toQuery" /> - +
@@ -86,6 +87,52 @@ :header-cell-style="{ 'text-align': 'left' }" style="width: 100%;" > + + + {{ statecCmparison('uploadTypeList', scope.row.recordType) }} - {{ statecCmparison('statusList', scope.row.recordStatus) }} + --> + + @@ -154,7 +250,8 @@ import DateRangePicker from '@/components/DateRangePicker' import { getAdvertisingQualityScore } from '@/api/login.js' import advertisingQualityscore from '@/components/Echarts/Radar' import { - modeUploadFiles + modeUploadFiles, + recordBuild } from '@/api/index' import { mapGetters } from 'vuex' import '@riophae/vue-treeselect/dist/vue-treeselect.css' @@ -183,6 +280,12 @@ export default { taskValue: '', uploadType: '', uploading: false, + dialogFormVisible: false, + modelingForm: { + ids: [], + actId: '', + actName: '' + }, uploadTypeList: [ { key: '方式一', @@ -219,6 +322,8 @@ export default { value: '3' } ], + selectModel: 'single', + selectTagList: [], advertisingQualityScoreData: {} // 充值记录模块消费统计柱状图 } }, @@ -226,7 +331,9 @@ export default { ...mapGetters(['user', 'fileUpload']) }, created() { - this.getAdvertisingQualityScoreData() + if (this.user.roles[0].level !== 1) { + this.getAdvertisingQualityScoreData() + } }, mounted: function() { const that = this @@ -235,6 +342,30 @@ export default { } }, methods: { + openModeling(row, type) { + this.selectModel = type + if (type === 'single') { + this.modelingForm.ids = [row.id] + } else if (type === 'multiple') { + this.selectTagList = row.treeList.filter(item => item.recordStatus === 1).sort((a, b) => a.analysisNum - b.analysisNum) + } + this.dialogFormVisible = true + }, + closeDialog() { + this.modelingForm.ids = [] + this.$refs.refForm.resetFields() + }, + recordBuildFun() { + this.$refs.refForm.validate((valid) => { + if (valid) { + recordBuild(this.modelingForm).then(res => { + this.$message.success('操作成功') + this.dialogFormVisible = false + this.crud.resetQuery() + }) + } + }) + }, // 获取广告质量分 async getAdvertisingQualityScoreData() { const res = await getAdvertisingQualityScore() @@ -244,6 +375,10 @@ export default { this.$message.error(res.msg) } }, + // 下载源文件 + downFile(params) { + window.open(params.downUrl) + }, // 上传 updtaFils(file) { this.fileData.append('file', file.file) diff --git a/src/views/advertisement/manageIndex.vue b/src/views/advertisement/manageIndex.vue index 28076e5..65fbc40 100644 --- a/src/views/advertisement/manageIndex.vue +++ b/src/views/advertisement/manageIndex.vue @@ -30,6 +30,51 @@ :header-cell-style="{ 'text-align': 'left' }" style="width: 100%;" > + + + {{ statecCmparison('uploadTypeList', scope.row.recordType) }} - {{ statecCmparison('statusList', scope.row.recordStatus) }} - - --> +