dev
yujialong 3 years ago
parent debe04726c
commit 910fb70e3e
  1. 5
      src/setting.js
  2. 5
      src/utils/api.js
  3. 60
      src/views/customer/AddCustomer.vue
  4. 91
      src/views/data/Framework.vue
  5. 99
      src/views/data/Introduce.vue
  6. 3
      src/views/data/Product.vue
  7. 72
      src/views/order/AddOrder.vue
  8. 1
      src/views/serve/projectList.vue
  9. 11
      src/views/user/User.vue

@ -12,8 +12,8 @@ if (isDev) {
// jumpPath = "http://39.108.250.202/judgmentPoint/";
jumpPath = "http://192.168.31.154:8087/"; // 本地调试-需要启动本地判分点系统
host = "http://39.108.250.202:9000";
// host = 'http://192.168.31.151:9000'// 榕
// host = "http://39.108.250.202:9000";
host = 'http://192.168.31.151:9000'// 榕
// host = 'http://192.168.31.125:9000'// 坤
// host = 'http://192.168.31.137:9000'// 赓
} else if (isTest) {
@ -29,6 +29,7 @@ const Setting = {
/**
* 基础配置
* */
platformId: 3, // 平台标识,1职站,2数据平台,3中台
jumpPath, // 判分点系统跳转路径前缀
host, // 请求路径前缀
};

@ -160,6 +160,7 @@ export default {
previewData: `${host}/data/data/preview`,
staticPreview: `${host}/data/data/staticPreview`,
editTableName: `${host}/data/data/table/editTableName`,
updateTableCommit: `${host}/data/data/updateTableCommit`,
// 产品管理
deleteProduct: `${host}/data/data/product/delete`,
@ -168,7 +169,9 @@ export default {
saveProduct: `${host}/data/data/product/save`,
updateProduct: `${host}/data/data/product/update`,
saveRecord: `${host}/data/data/dataRecord/saveRecord`,
// 关键词
addKeyword: `${host}/data/keyword/addKeyword`,
deleteKeyword: `${host}/data/keyword/deleteKeyword`,
getKeywordByTableId: `${host}/data/keyword/getKeywordByTableId`
getKeywordByCategoryId: `${host}/data/keyword/getKeywordByCategoryId`
};

@ -28,33 +28,30 @@
<el-option v-for="(item,index) in countryList" :key="index" :label="item.name" :value="item.name"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="provinceId" label="省份">
<el-select v-model="form.provinceId" placeholder="" disabled>
<el-option v-for="(item,index) in provinceList" :key="index" :label="item.provinceName" :value="item.provinceId"></el-option>
<el-form-item prop="schoolId" label="客户名称">
<el-select v-model="form.schoolId" filterable clearable placeholder="请选择学校" @change="SchoolChange" @clear="clearSchool">
<el-option v-for="(item,index) in schoolList" :key="index" :label="item.schoolName" :value="item.schoolId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="到期时间">
<el-date-picker type="date" disabled v-model="form.expireDate" style="width: 100%;" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item prop="industryClassId" label="行业类型">
<el-select v-model="form.industryClassId" clearable placeholder="请选择行业类型" @change="changIndustry" @clear="clearIndustry()">
<el-option v-for="(item,index) in IndustryClassList" :key="index" :label="item.industryClassName" :value="item.industryClassId"></el-option>
<el-form-item prop="cityId" label="城市">
<el-select v-model="form.cityId" placeholder="" disabled>
<el-option v-for="(item,index) in cityList" :key="index" :label="item.cityName" :value="item.cityId"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="name" label="联系人姓名">
<el-input placeholder="请输入联系人姓名" v-model="form.name"></el-input>
<el-form-item prop="industryId" label="行业">
<el-select v-model="form.industryId" clearable placeholder="请选择行业" :disabled="form.industryClassId ? false : true">
<el-option v-for="(item,index) in industryList" :key="index" :label="item.industryName" :value="item.industryId"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="account" label="账号">
<el-input placeholder="请输入账号" v-model="form.account"></el-input>
</el-form-item>
<el-form-item prop="email" label="邮箱">
<el-input placeholder="请输入邮箱" v-model="form.email"></el-input>
<el-form-item label="职务">
<el-input placeholder="请输入职务名称" v-model="form.position" maxlength="11"></el-input>
</el-form-item>
<el-form-item label="产品到期时间">
<el-date-picker type="date" disabled v-model="form.expireDate" style="width: 100%;" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
</el-col>
@ -64,31 +61,24 @@
<el-option v-for="(item,index) in customerTypeList" :key="index" :label="item.name" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="cityId" label="城市">
<el-select v-model="form.cityId" placeholder="" disabled>
<el-option v-for="(item,index) in cityList" :key="index" :label="item.cityName" :value="item.cityId"></el-option>
<el-form-item prop="provinceId" label="省份">
<el-select v-model="form.provinceId" placeholder="" disabled>
<el-option v-for="(item,index) in provinceList" :key="index" :label="item.provinceName" :value="item.provinceId"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="schoolId" label="客户名称">
<el-select v-model="form.schoolId" filterable clearable placeholder="请选择学校" @change="SchoolChange" @clear="clearSchool">
<el-option v-for="(item,index) in schoolList" :key="index" :label="item.schoolName" :value="item.schoolId"></el-option>
<el-form-item prop="industryClassId" label="行业类型">
<el-select v-model="form.industryClassId" clearable placeholder="请选择行业类型" @change="changIndustry" @clear="clearIndustry()">
<el-option v-for="(item,index) in IndustryClassList" :key="index" :label="item.industryClassName" :value="item.industryClassId"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="industryId" label="行业">
<el-select v-model="form.industryId" clearable placeholder="请选择行业" :disabled="form.industryClassId ? false : true">
<el-option v-for="(item,index) in industryList" :key="index" :label="item.industryName" :value="item.industryId"></el-option>
</el-select>
<el-form-item prop="name" label="联系人姓名">
<el-input placeholder="请输入联系人姓名" v-model="form.name"></el-input>
</el-form-item>
<el-form-item prop="phone" label="手机号">
<el-input placeholder="请输入联系人手机号" v-model="form.phone" maxlength="11"></el-input>
</el-form-item>
<el-form-item label="职务">
<el-input placeholder="请输入职务名称" v-model="form.position" maxlength="11"></el-input>
<el-form-item prop="email" label="邮箱">
<el-input placeholder="请输入邮箱" v-model="form.email"></el-input>
</el-form-item>
</el-col>
</el-form>

@ -9,7 +9,7 @@
<span class="custom-tree-node" slot-scope="{ node, data }">
<span :title="node.label">{{ node.label }}</span>
<span class="actions">
<i v-if="data.level != 3" class="el-icon-circle-plus-outline" @click.stop="addType(node)"></i>
<i class="el-icon-circle-plus-outline" @click.stop="addType(node)" v-if="data.level != 6"></i>
<i class="el-icon-edit" @click.stop="editType(node)"></i>
<i class="el-icon-delete" @click.stop="delType(node)"></i>
</span>
@ -33,19 +33,27 @@
</el-form>
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="showName" label="数据表名称" align="center"></el-table-column>
<el-table-column prop="dataTotal" label="数据总量" align="center"></el-table-column>
<el-table-column prop="dataSize" label="数据大小" align="center">
<el-table-column type="index" width="70" label="序号" align="center"></el-table-column>
<el-table-column prop="tableComment" label="数据表名称" align="center"></el-table-column>
<el-table-column prop="showName" label="产品表名称" align="center"></el-table-column>
<el-table-column label="起止日期" align="center">
<template slot-scope="scope">
{{scope.row.startTime + ' ~ ' + scope.row.endTime}}
</template>
</el-table-column>
<el-table-column prop="dataTotal" label="数据总量" width="100" align="center"></el-table-column>
<el-table-column prop="dataSize" label="数据大小" width="100" align="center">
<template slot-scope="scope">
{{scope.row.dataSize}}M
</template>
</el-table-column>
<el-table-column prop="updateTime" label="更新时间" align="center"></el-table-column>
<el-table-column label="操作" width="220" align="center">
<el-table-column prop="updateTime" label="更新时间" width="180" align="center"></el-table-column>
<el-table-column label="操作" width="260" align="center">
<template slot-scope="scope">
<el-button type="text" @click="preview(scope.row)">预览</el-button>
<el-button type="text" @click="delTable(scope.row)">删除</el-button>
<el-button type="text" @click="editName(scope.row)">编辑产品表名</el-button>
<el-button type="text" @click="editHead(scope.row)">编辑产品表头</el-button>
</template>
</el-table-column>
</el-table>
@ -111,6 +119,32 @@
<el-table-column v-for="(item,index) in previewHead" :prop="item.field" :key="index" :label="item.comment" align="center"></el-table-column>
</el-table>
</el-dialog>
<el-dialog title="编辑产品数据表名称" :visible.sync="nameVisible" width="24%" center :close-on-click-modal="false">
<el-input placeholder="请输入产品数据表名称" v-model="curRow.showName"></el-input>
<span slot="footer" class="dialog-footer">
<el-button @click="nameVisible = false"> </el-button>
<el-button type="primary" @click="confirmName"> </el-button>
</span>
</el-dialog>
<el-dialog title="自定义表头" :visible.sync="headVisible" width="60%" center :close-on-click-modal="false">
<el-table :data="previewData" class="table" stripe header-align="center" row-key="id" :key="editIndex">
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column v-for="(item,index) in previewHead" :prop="item.field" :key="index" :label="item.oldComment" align="center">
<template slot-scope="scope">
<template v-if="scope.row.custom">
<el-input placeholder="请输入" :key="item.comment" v-model="item.comment"></el-input>
</template>
<template v-else>{{scope.row[item.field]}}</template>
</template>
</el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
<el-button @click="headVisible = false"> </el-button>
<el-button type="primary" @click="confirmHead"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
@ -154,7 +188,11 @@ export default {
previewData: [],
submited: false,
names: [],
showNames: []
showNames: [],
nameVisible: false,
curRow: {},
headVisible: false,
editIndex: 0
};
},
watch: {
@ -271,7 +309,7 @@ export default {
this.levelId = 0
this.categoryName = ''
},
preview(row){
preview(row, isEdit){
this.$get(`${this.api.previewData}?tableName=${row.name}&tableId=${row.id}`).then(res => {
let comment = res.comment
let previewHead = []
@ -281,14 +319,18 @@ export default {
this.previewHead = previewHead
let data = res.data
isEdit && data.unshift({
custom: true
})
data.map(n => {
for(let i in n){
// +0000,,
if(typeof n[i] == 'string' && n[i].endsWith('+0000')) n[i] = this.formatDate('yyyy-MM-dd hh:mm:ss',new Date(n[i]))
}
})
console.log(11, data)
this.previewData = data
this.previewVisible = true
if (!isEdit) this.previewVisible = true
}).catch(res => {})
},
delTable(row){
@ -301,6 +343,35 @@ export default {
}).catch(res => {})
}).catch(() => {})
},
editName(row){
this.curRow = JSON.parse(JSON.stringify(row))
this.nameVisible = true
},
confirmName(){
this.$post(this.api.editTableName, {
id: this.curRow.id,
showName: this.curRow.showName,
}).then(res => {
this.$message.success('修改成功')
this.nameVisible = false
this.getData()
}).catch(res => {})
},
editHead(row){
this.curRow = JSON.parse(JSON.stringify(row))
this.preview(row, 1)
this.editIndex++
this.headVisible = true
},
confirmHead(){
let data = JSON.parse(JSON.stringify(this.previewHead))
// data.map(e => delete e.oldComment)
this.$post(`${this.api.updateTableCommit}?tableName=${this.curRow.name}`, data).then(res => {
this.$message.success('修改成功')
this.nameVisible = false
this.getData()
}).catch(res => {})
},
handleSelectionChange(val) {
this.multipleSelection = val
},

@ -18,11 +18,40 @@
<el-button type="primary" size="small" @click="edit">添加</el-button>
</div>
</div>
<el-input v-if="introduceText || editing" placeholder="请输入简介" v-model="introduce" type="textarea" rows="5" :disabled="!editing"></el-input>
<template v-if="introduceText || editing">
<el-input placeholder="请输入简介" v-model="introduce" type="textarea" rows="5" :disabled="!editing"></el-input>
<div class="field">
<p class="label">数据源</p>
<el-input style="width: 250px" placeholder="请输入数据源" v-model="source" type="text"></el-input>
</div>
</template>
<div class="btns" v-if="editing">
<el-button @click="editing = false"> </el-button>
<el-button type="primary" @click="confirmEdit"> </el-button>
</div>
<div class="field">
<p class="label">关键字</p>
<div class="tag-wrap">
<el-tag
:key="tag.id"
v-for="tag in keywordList"
closable
:disable-transitions="false"
@close="delKeyword(tag)">
{{tag.keyword}}
</el-tag>
<el-input
class="input-new-tag"
v-if="inputVisible"
v-model="newKeyword"
ref="saveTagInput"
size="small"
@keyup.enter.native="handleInputConfirm"
>
</el-input>
<el-button v-else class="button-new-tag" size="small" @click="showInput">+</el-button>
</div>
</div>
</el-card>
</el-col>
</el-main>
@ -41,8 +70,12 @@ export default {
defaultActive: [],
editing: false,
introduce: '',
source: '',
introduceText: '',
categoryId: ''
categoryId: '',
keywordList: [],
inputVisible: false,
newKeyword: ''
};
},
watch: {
@ -84,6 +117,7 @@ export default {
this.introduceText = res[0].introduce
this.introduce = res[0].introduce
}
this.getKeyword()
}).catch(res => {})
},
typeClick(data,node){
@ -91,6 +125,15 @@ export default {
this.categoryId = data.id
this.introduceText = data.introduce
this.introduce = data.introduce
console.log(11, data, node)
this.getKeyword()
},
getKeyword(){
this.$get(this.api.getKeywordByCategoryId,{
categoryId: this.categoryId
}).then(res => {
this.keywordList = res.keywords
}).catch(res => {})
},
edit(){
this.editing = true
@ -105,6 +148,32 @@ export default {
this.introduceText = this.introduce
this.editing = false
}).catch(res => {})
},
delKeyword(item) {
this.$post(`${this.api.deleteKeyword}?categoryId=${this.categoryId}&keyword=${item.keyword}`).then(res => {
this.$message.success('删除成功')
this.getKeyword()
}).catch(res => {})
},
showInput() {
this.inputVisible = true
this.$nextTick(_ => {
this.$refs.saveTagInput.$refs.input.focus()
})
},
handleInputConfirm() {
const keyword = this.newKeyword
if (keyword) {
if (this.keywordList.find(e => e.keyword === keyword)) return this.$message.error('请不要输入重复关键字!')
this.inputVisible = false
this.$post(this.api.addKeyword,{
categoryId: this.categoryId,
keyword
}).then(res => {
this.newKeyword = ''
this.getKeyword()
}).catch(res => {})
}
}
}
};
@ -125,6 +194,17 @@ export default {
margin-bottom: 20px;
}
}
.field {
margin-top: 20px;
text-align: left;
.label {
margin-bottom: 10px;
}
}
.tag-wrap {
display: flex;
align-items: center;
}
.btns{
margin-top: 20px;
}
@ -133,4 +213,19 @@ export default {
margin-right: 20px;
margin-left: 20px;
}
.el-tag + .el-tag {
margin-left: 10px;
}
.button-new-tag {
margin-left: 10px;
height: 32px;
line-height: 30px;
padding-top: 0;
padding-bottom: 0;
}
.input-new-tag {
width: 90px;
margin-left: 10px;
vertical-align: bottom;
}
</style>

@ -55,7 +55,7 @@
<el-switch v-model="scope.row.status" :active-text="scope.row.status ? '上架' : '下架'" :active-value="1" :inactive-value="0" @change="switchOff($event,scope.row,scope.$index)"></el-switch>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="text" @click="preview(scope.row)">预览</el-button>
<el-button type="text" @click="edit(scope.row)">编辑</el-button>
@ -307,6 +307,7 @@ export default {
getTable(res)
setTimeout(() => {
console.log(11, res)
this.typeList = res
},500)
this.importVisible = true

@ -173,7 +173,7 @@
</div>
</template>
</el-table-column>
<el-table-column label="端口地址 " align="center">
<el-table-column label="端口地址 " align="center" width="100">
<template slot-scope="scope">
<el-button @click="configure(scope.row)">配置</el-button>
</template>
@ -809,43 +809,43 @@ export default {
submitOrder() {
if (!this.coursePermissions.length && !this.dataPlatformPermissions.length) {
return this.$message.error("请选择课程权限或数据权限后再确认订单");
}
//
if (this.coursePermissions.length) {
let courseVerify =
this.coursePermissions.some(e => {
if (!e.periodOfUse || !e.finalPrice) {
return false;
} else {
return true;
}
});
if (!courseVerify) {
this.whetherSubmit = true;
setTimeout(() => {
this.whetherSubmit = false;
}, 4000);
return this.$message.error("请把课程参数输入完整");
} else {
//
if (this.coursePermissions.length) {
let courseVerify =
this.coursePermissions.some(e => {
if (!e.periodOfUse || !e.finalPrice) {
return false;
} else {
return true;
}
});
if (!courseVerify) {
this.whetherSubmit = true;
setTimeout(() => {
this.whetherSubmit = false;
}, 4000);
return this.$message.error("请把课程参数输入完整");
}
}
}
//
if (this.dataPlatformPermissions.length) {
let dataVerify =
this.dataPlatformPermissions.some(e => {
if (!e.periodOfUse || !e.finalPrice || !e.accountNum || !e.totalAmount) {
return false;
} else {
return true;
}
});
if (!dataVerify) {
this.whetherSubmit = true;
setTimeout(() => {
this.whetherSubmit = false;
}, 4000);
return this.$message.error("请把产品参数输入完整");
//
if (this.dataPlatformPermissions.length) {
let dataVerify =
this.dataPlatformPermissions.some(e => {
if (!e.periodOfUse || !e.finalPrice || !e.accountNum || !e.totalAmount) {
return false;
} else {
return true;
}
});
if (!dataVerify) {
this.whetherSubmit = true;
setTimeout(() => {
this.whetherSubmit = false;
}, 4000);
return this.$message.error("请把产品参数输入完整");
}
}
}

@ -74,7 +74,6 @@
<el-table-column type="index" width="100" label="序号" align="center">
<template slot-scope="scope">{{ scope.$index + (page - 1) * pageSize + 1 }}</template>
</el-table-column>
<el-table-column prop="projectId" label="实验项目ID" align="center"></el-table-column>
<el-table-column prop="projectName" label="实验项目名称" align="center"></el-table-column>
<el-table-column prop="founder" label="创建人" align="center">
<template slot-scope="scope">

@ -339,16 +339,11 @@ export default {
}).catch(res => {})
},
handleSelectionChange(val) {
this.multipleSelection = val.filter(e=>{
if(e.userId===1){
}
})
this.multipleSelection = val;
},
delAllSelection() {
if(this.multipleSelection.length != ''){
let newArr = this.multipleSelection
let delList = newArr.map(e => e.userId)
if(this.multipleSelection.length){
let delList = this.multipleSelection.map(e => e.userId);
this.$confirm('确定要删除选中用户吗?', '提示', {
type: 'warning'
}).then(() => {

Loading…
Cancel
Save