Commit 4e9e04b4 authored by 付清曌's avatar 付清曌

Merge branch 'strate' into 'master'

Strate

See merge request !3
parents 597f6441 634ef8ce
{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
}
}],
"stage-2"
],
"plugins": ["transform-vue-jsx", "transform-runtime"],
"env": {
"test": {
"presets": ["env", "stage-2"],
"plugins": ["transform-vue-jsx", "transform-es2015-modules-commonjs", "dynamic-import-node"]
}
}
}
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
/build/
/config/
/dist/
/*.js
/test/unit/coverage/
// https://eslint.org/docs/user-guide/configuring
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint'
},
env: {
browser: true,
},
extends: [
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
'plugin:vue/essential',
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
'standard'
],
// required to lint *.vue files
plugins: [
'vue'
],
// add your custom rules here
rules: {
// allow async-await
'generator-star-spacing': 'off',
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'arrow-parens': 0,
// allow async-await
'generator-star-spacing': 0,
"eqeqeq": 0,
"no-unused-vars": 0,
'semi': 0,
"handle-callback-err": 0,
"no-array-constructor": 0,
"no-irregular-whitespace": 0,
"no-tabs": 0,
"no-mixed-spaces-and-tabs": 0,
"no-useless-escape": 0,
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
"vue/no-parsing-error": [2, { "x-invalid-end-tag": false }]
}
}
// https://github.com/michael-ciniawsky/postcss-load-config
module.exports = {
"plugins": {
"postcss-import": {},
"postcss-url": {},
// to edit target browsers: use "browserslist" field in package.json
"autoprefixer": {}
}
}
......@@ -11,11 +11,11 @@ module.exports = {
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {
'/gateway': {
target: 'https://s-engine-ai3.liangkebang.net',
changeOrigin: true,
pathRewrite: {'^/gateway' : ''}
}
// '/gateway': {
// target: 'https://s-engine-ai3.liangkebang.net',
// changeOrigin: true,
// pathRewrite: {'^/gateway' : ''}
// }
},
// Various Dev Server settings
......
......@@ -4,8 +4,6 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>strategy-ui</title>
<script src="https://g.alicdn.com/dingding/dingtalk-jsapi/2.7.13/dingtalk.open.js"></script>
<script type="text/javascript" src="http://g.alicdn.com/dingding/dingtalk-pc-api/2.3.1/index.js"></script>
</head>
<body>
<div id="app"></div>
......
import axios from '../services/http.service'
import {
sapi
} from '../config'
export function getSoulSoother () {
return axios.get(`/gateway/api/sysStrategy/getTodaySoul`, {headers: {
return axios.get(`${sapi}/api/sysStrategy/getTodaySoul`, {headers: {
'Content-Type': 'application/json'
}})
}
export function getlist () {
return axios.get(`/gateway/api/sysStrategy/query`, {headers: {
return axios.get(`${sapi}/api/sysStrategy/query`, {headers: {
'Content-Type': 'application/json'
}})
}
export function addtitlelist (data) {
return axios.post(`/gateway/api/strategyObjectives/save`, data, {headers: {
return axios.post(`${sapi}/api/strategyObjectives/save`, data, {headers: {
'Content-Type': 'application/json'
}})
}
export function delatetitlelist (data) {
return axios.delete(`/gateway/api/strategyObjectives/delete/${data}`, {headers: {
return axios.post(`${sapi}/api/strategyObjectives/delete/${data}`, {headers: {
'Content-Type': 'application/json'
}})
}
export function savechildput (data) {
return axios.post(`/gateway/api/keyresults/save`, data, {headers: {
return axios.post(`${sapi}/api/keyresults/save`, data, {headers: {
'Content-Type': 'application/json'
}})
}
// 删除战略步骤
export function delatechildputchlid (data) {
return axios.delete(`/gateway/api/keyresults/delete/${data}`, {headers: {
return axios.post(`${sapi}/api/keyresults/delete/${data}`, {headers: {
'Content-Type': 'application/json'
}})
}
// 保存战略大标题
export function savehostTitle (data) {
return axios.post(`/gateway/api/sysStrategy/edit`, data, {headers: {
return axios.post(`${sapi}/api/sysStrategy/edit`, data, {headers: {
'Content-Type': 'application/json'
}})
}
// 排序战略
export function sortstrategy (arr, data) {
return axios.post(`/gateway/api/keyresults/${data}/order`, arr, {headers: {
return axios.post(`${sapi}/api/keyresults/${data}/order`, arr, {headers: {
'Content-Type': 'application/json'
}})
}
// 查询素材列表
export function getsourcelist (data) {
return axios.get(`/gateway/api/material/${data}/list`, {headers: {
return axios.get(`${sapi}/api/material/${data}/list`, {headers: {
'Content-Type': 'application/json'
}})
}
// 编辑素材
export function editsourceitem (data) {
return axios.post(`/gateway/api/material/save`, data, {headers: {
return axios.post(`${sapi}/api/material/save`, data, {headers: {
'Content-Type': 'application/json'
}})
}
// 删除素材
export function delatesourceitem (data) {
return axios.delete(`/gateway/api/material/delete/${data}`, {headers: {
return axios.post(`${sapi}/api/material/delete/${data}`, {headers: {
'Content-Type': 'application/json'
}})
}
// 查询战略详细列表
export function getdetailList (data) {
return axios.post(`/gateway/api/keyresultsDetail/${data}/list`, {headers: {
return axios.post(`${sapi}/api/keyresultsDetail/${data}/list`, {headers: {
'Content-Type': 'application/json'
}})
}
// 新增或修改战略详情
export function edutListitem (data) {
return axios.post(`/gateway/api/keyresultsDetail/save`, data, {headers: {
return axios.post(`${sapi}/api/keyresultsDetail/save`, data, {headers: {
'Content-Type': 'application/json'
}})
}
// 删除战略详情
export function delateListitem (data) {
return axios.delete(`/gateway/api/keyresultsDetail/delete/${data}`, {headers: {
return axios.post(`${sapi}/api/keyresultsDetail/delete/${data}`, {headers: {
'Content-Type': 'application/json'
}})
}
// 获取钉钉员工列表
export function getname (data) {
return axios.get(`/gateway/api/dingdingUser/searchDingDingUserByKey?key=${data}`, {headers: {
return axios.get(`${sapi}/api/dingdingUser/searchDingDingUserByKey?key=${data}`, {headers: {
'Content-Type': 'application/json'
}})
}
// 获取鉴权相关参数配置
export function getconfiglist () {
return axios.get(`/gateway/api/dingTalk/getDingTalkConfig`, {headers: {
return axios.get(`${sapi}/api/dingTalk/getDingTalkConfig`, {headers: {
'Content-Type': 'application/json'
}})
}
// 发送钉钉消息
export function sendding (data) {
return axios.post(`${sapi}/api/dingNotice/send`, data, {headers: {
'Content-Type': 'application/json'
}})
}
import axios from '../services/http.service'
// import {
// sapi
// } from '../config'
import {
sapi
} from '../config'
export function login (data) {
return axios.post(`/gateway/api/login/doLogin`, data, {headers: {
return axios.post(`${sapi}/api/login/doLogin`, data, {headers: {
'Content-Type': 'application/json'
}})
}
export function loginout () {
return axios.get(`/gateway/api/login/loginOut`, {headers: {
return axios.get(`${sapi}/api/login/loginOut`, {headers: {
'Content-Type': 'application/json'
}})
}
export function getmassage () {
return axios.get(`/gateway/api/login/me`, {headers: {
return axios.get(`${sapi}/api/login/me`, {headers: {
'Content-Type': 'application/json'
}})
}
<template>
<div class="layout">
<Layout class="layout_content">
<Sider breakpoint="md" collapsible :collapsed-width="78" v-model="isCollapsed">
<Sider breakpoint="md" ref="side1" hide-trigger collapsible :collapsed-width="78" v-model="isCollapsed">
<div class="title">
战略引擎
</div>
......@@ -13,10 +13,13 @@
</Menu>
<div slot="trigger"></div>
</Sider>
<Layout>
<Layout class="headerclass">
<Header class="layout-header-bar">
<!-- <Header :style="{padding: 0}" class="layout-header-bar"> -->
<Icon @click.native="collapsedSider" :class="rotateIcon" :style="{margin: '0 0px 0 -40px'}" type="md-menu" size="24"></Icon>
<span class="signout" @click="logOut">退出</span>
<span class="message">{{me}}</span>
<!-- </Header> -->
</Header>
<Content :style="{margin: '5px', background: '#fff', minHeight: '220px'}">
<router-view></router-view>
......@@ -35,6 +38,12 @@ export default {
}
},
computed: {
rotateIcon () {
return [
'menu-icon',
this.isCollapsed ? 'rotate-icon' : ''
];
},
menuitemClasses: function () {
return [
'menu-item',
......@@ -55,8 +64,11 @@ export default {
},
getmass () {
getmassage().then(data => {
this.me = data.data.userCode
this.me = data.data.body.userName
})
},
collapsedSider () {
this.$refs.side1.toggleCollapse();
}
},
mounted () {
......@@ -66,7 +78,7 @@ export default {
</script>
<style scoped>
.layout{
border: 1px solid #d7dde4;
/* border: 1px solid #d7dde4; */
background: #f5f7f9;
position: relative;
border-radius: 4px;
......@@ -106,7 +118,7 @@ export default {
font-size: 22px;
}
.signout{
font-size: 16px;
font-size: 14px;
float: right;
margin-right: 10px;
color: #0092ff
......@@ -121,9 +133,64 @@ export default {
font-weight: 900;
}
.message {
font-size: 16px;
font-size: 14px;
float: right;
margin-right: 30px;
color: #0092ff
}
.layout{
border: 1px solid #d7dde4;
background: #f5f7f9;
position: relative;
border-radius: 4px;
overflow: hidden;
}
.layout-header-bar{
background: #fff;
box-shadow: 0 1px 1px rgba(0,0,0,.1);
}
.layout-logo-left{
width: 90%;
height: 30px;
background: #5b6270;
border-radius: 3px;
margin: 15px auto;
}
.menu-icon{
transition: all .3s;
}
.rotate-icon{
transform: rotate(-90deg);
}
.menu-item span{
display: inline-block;
overflow: hidden;
width: 69px;
text-overflow: ellipsis;
white-space: nowrap;
vertical-align: bottom;
transition: width .2s ease .2s;
}
.menu-item i{
transform: translateX(0px);
transition: font-size .2s ease, transform .2s ease;
vertical-align: middle;
font-size: 16px;
}
.collapsed-menu span{
width: 0px;
transition: width .2s ease;
}
.collapsed-menu i{
transform: translateX(5px);
transition: font-size .2s ease .2s, transform .2s ease .2s;
vertical-align: middle;
font-size: 22px;
}
</style>
<style>
.headerclass .ivu-layout-header {
height: 48px;
line-height: 48px;
}
</style>
......@@ -82,8 +82,7 @@ export default {
height: 100%;
width: 100%;
position: relative;
background: url("../../static/logo.jpg") repeat;
background-size: 100% 100%;
background: url("../../static/bgss.jpg") no-repeat center 0 / cover;
}
.logincontent{
width:300px;
......
const sapi = 'https://s-engine-ai3.liangkebang.net'
// const sapi = 'http://192.168.29.88:5555'
export {
sapi
}
const sapi = 'http://heimdallr-arch.liangkebang.net'
// const sapi = 'http://192.168.29.88:5555'
const sapi = 'http://api.s-engine.quantgroup.cn'
// const sapi = 'https://s-engine.quantgroup.cn'
export {
sapi
}
<template>
<div class="detailstrategy">
<div class="detailstrategy_title">
<div class="detailstrategy_title_large">战略引擎</div>
<div class="detailstrategy_title_large" @click="returngo">战略引擎</div>
<div class="detailstrategy_title_icon"><Icon type="ios-arrow-forward" /></div>
<div class="detailstrategy_title_content">{{twotitle}}</div>
</div>
......@@ -10,7 +10,7 @@
<div class="content_warpleft">
<div class="content_warp_put">
<div class="warp_put_value">
<Input v-model="item.content" style="width:99%" type="textarea" v-show="item.showput" @on-blur="sele(item)"/>
<Input v-model="item.content" style="width:99%" type="textarea" placeholder="请输入具体内容" v-show="item.showput" @on-blur="sele(item)"/>
<span v-show="item.showspan" class="valuespan" :class="{'listorvaluespan':item.showstatus}">{{item.content}}</span>
</div>
<div class="content_warp_remarks" v-for="(item, index1) in item.dingRecordList" :key="index1">
......@@ -27,26 +27,26 @@
<div class="imgdiv">
<p class="imglist">
<img src="../../static/bianji.png" @click="editinput(item)" title="编辑" >
<img src="../../static/shanchu.png" title="删除" @click="delateitem(item)" style="margin-left:20px">
<img src="../../static/shanchu.png" title="删除" @click="delateitem(item,index)" style="margin-left:20px">
<img src="../../static/dingding.png" alt="钉钉" @click="ding(item)" style="margin-left:20px">
</p>
<p v-show="item.showselect">
<Select v-model="item.dingNamearr" size="small" clearable style="width:100%" multiple filterable :remote-method="remoteMethod" remote>
<Select v-model="item.dingNamearr" size="small" label-in-value @on-change="selectName" clearable style="width:100%" multiple filterable :remote-method="remoteMethod" remote>
<Option v-for="(item, index) in getNamearr" :value="item.userId" :key="index">{{item.name}}</Option>
</Select>
</p>
</div>
<div class="confirediv" v-show="item.showselect">
<p style="margin-top:22px">
<Button type="primary" size='small'>取消</Button>
<Button type="primary" size='small'>确认</Button>
<Button type="primary" size='small' @click="cancel(item)">取消</Button>
<Button type="primary" size='small' @click="confireding(item)">确认</Button>
</p>
</div>
</div>
</div>
</div>
<div class="classtitle_add">
<img src="../../static/tianjia.png" title="添加" @click="addchlidlist()">
<img src="../../static/tianjia.png" title="新增内容" @click="addchlidlist()">
</div>
</div>
<Modal
......@@ -65,8 +65,7 @@
</div>
</template>
<script>
// import dd from 'dingtalk-jsapi'
import {getdetailList, edutListitem, delateListitem, getname} from '../api/strategymange.serve'
import {getdetailList, edutListitem, delateListitem, getname, sendding} from '../api/strategymange.serve'
export default {
data () {
return {
......@@ -78,7 +77,12 @@ export default {
delateUid: '',
delatelefthostmodal: false,
dingNamearr: [],
getNamearr: []
getNamearr: [],
confiredingarr: [],
resultdingArr: [],
resultdingcontentarr: [],
busUid: '',
content: ''
}
},
methods: {
......@@ -90,7 +94,14 @@ export default {
item.showstatus = false
this.contentarr = [...this.contentarr]
},
returngo () {
this.$router.push({ path: '/strategymange' })
},
sele (item) {
if (item.content === '') {
this.$Message.error('内容为空,请输入')
return false
}
let data = {
keyResultsUid: this.$route.query.uid,
uid: item.uid === '' ? '' : item.uid,
......@@ -107,7 +118,12 @@ export default {
}
})
},
cancel (item) {
item.showselect = false
this.contentarr = [...this.contentarr]
},
ding (item) {
this.getNamearr = []
item.showselect = true
this.contentarr = [...this.contentarr]
},
......@@ -130,21 +146,30 @@ export default {
})
})
},
// getnamelist () {
// dd.biz.ding.post({
// users: ['100', '101'], // 用户列表,userid
// corpId: 'dingcdf747c33620747835c2f4657eb6378f', // 加密的企业id
// type: 2, // 钉类型 1:image 2:link
// alertType: 2,
// alertDate: {'format': 'yyyy-MM-dd HH:mm', 'value': '2015-05-09 08:00'},
// attachment: {
// images: [''] // 只取第一个image
// }, // 附件信息
// text: '', // 消息体
// onSuccess: function () {},
// onFail: function () {}
// })
// },
selectName (item) {
this.resultdingArr = item
},
confireding (item) {
this.busUid = item.uid
this.content = item.content
this.resultdingArr.map(item => {
this.resultdingcontentarr.push({
busUid: this.busUid,
name: item.label,
userId: item.value,
text: this.content
})
})
sendding(this.resultdingcontentarr).then(data => {
if (data.data.success === true) {
this.$Message.success('发送消息成功')
this.getlist()
} else {
this.$Message.error(data.data.body.message)
this.getlist()
}
})
},
async remoteMethod (query) {
if (query !== '') {
setTimeout(async () => {
......@@ -152,7 +177,6 @@ export default {
const list = await getname(query)
this.getNamearr = list.data.body || []
}, 200)
console.log(this.getNamearr, 99)
} else {
this.getNamearr = []
}
......@@ -162,10 +186,17 @@ export default {
keyResultsUid: this.$route.query.uid,
uid: '',
content: '',
orderNo: this.contentarr.length + 1
orderNo: this.contentarr.length + 1,
showspan: false,
showput: true
})
},
delateitem (item) {
delateitem (item, index) {
if (item.content === '') {
this.contentarr.splice(index, 1)
this.contentarr = [...this.contentarr]
return false
}
this.delateUid = item.uid
this.delatelefthostmodal = true
},
......@@ -193,8 +224,9 @@ export default {
.detailstrategy{
height: 100%;
width: 100%;
background: url('../../static/logo.jpg') repeat;
background-size: 100% 100%;
background: url("../../static/bgss.jpg") no-repeat center 0 / cover;
font-family:"Microsoft Yahei";
overflow: hidden;
}
.detailstrategy_title{
height: 40px;
......@@ -205,7 +237,8 @@ export default {
.detailstrategy_title_large{
width: 60px;
float: left;
margin-left: 20px
margin-left: 20px;
cursor: pointer;
}
.detailstrategy_title_icon{
width: 20px;
......@@ -216,51 +249,60 @@ export default {
width: 100%;
float: left;
overflow-y: auto;
/* border: 1px solid black */
}
.detailstrategy_content_warp::-webkit-scrollbar{
width:3px;
height:3px;
}
.detailstrategy_content_warp::-webkit-scrollbar-track{
background: rgba(239, 239, 239,0.1);
border-radius:2px;
}
.detailstrategy_content_warp::-webkit-scrollbar-thumb{
background: rgba(136,136,136,0.4);
border-radius:10px;
}
.detailstrategy_content_warp::-webkit-scrollbar-thumb:hover{
background: rgba(136,136,136,0.4);
}
.detailstrategy_content_warp::-webkit-scrollbar-corner{
background: #179a16;
}
.detailstrategy_content_warp{
width: 85%;
margin: 0 11%;
min-height: 80px;
/* border: 1px solid yellow */
}
.content_warpleft{
min-height: 80px;
width: 80%;
float: left;
/* border: 1px solid black; */
margin-top:5px;
}
.content_warpright{
height: 80px;
width: 20%;
float: left;
/* border: #848484 1px solid; */
margin-top:5px;
}
.content_warp_remarks{
min-height:60px;
min-height:20px;
width: 100%;
height: 40px;
float: left;
line-height: 20px;
padding: 10px 0;
color: #848484;
/* border: 1px solid yellow */
padding: 5px 0
}
.content_warp_put{
min-height:60px;
width: 100%;
float: left;
/* border: 1px solid yellow */
}
.warp_put_value{
min-height: 60px;
width: 100%;
float: left;
background: white;
/* margin-top:15px; */
/* border: 1px solid red */
border-radius: 5px
}
.warp_put_img{
width: 100%;
......@@ -270,18 +312,18 @@ export default {
.imgdiv{
height: 100%;
width: 50%;
/* border: 1px solid yellow; */
float: left;
cursor: pointer;
}
.imglist {
width: 100%;
height: 20px;
display: flex
display: flex;
cursor: pointer;
}
.confirediv{
height: 100%;
width: 50%;
/* border: 1PX solid red; */
float: left;
text-align: center
}
......@@ -298,6 +340,7 @@ export default {
float: left;
text-align: center;
line-height: 40px;
margin-left: -5%;
}
.classtitle_add img{
height: 20px;
......@@ -327,7 +370,8 @@ export default {
align-items:Center;
padding: 5px 5px;
border: 1px solid #a2825f;
border-radius: 2px
border-radius: 5px;
cursor: pointer;
}
.spansend{
display: inline-block;
......@@ -335,8 +379,48 @@ export default {
top: -40px */
}
.detailstrategy_title_content{
font-size: 16px;
font-size: 14px;
color: black;
font-weight: 900
}
</style>
<style>
.warp_put_value .ivu-input {
min-height:50px;
border:none;
text-align:center;
font-size:16px;
vertical-align: middle;
resize: none;
background:rgba(255,255,255,0);
word-wrap: break-word;
word-break: normal;
/* border-bottom: 1px solid #666 */
}
.warp_put_value .ivu-input{
min-height:30px;
/* border:none; */
text-align:center;
font-size:16px;
vertical-align: middle;
resize: none;
/* background:rgba(255,255,255,0); */
word-wrap: break-word;
word-break: normal;
}
.ivu-input:focus{
outline:none;
border:none;
box-shadow: 0 0 0 2px transparent;
}
.warp_put_value .ivu-input {
height:100%;
min-height: 50px;
border:none;
text-align:center;
font-size:16px;
vertical-align: middle;
resize: none;
background:rgba(255,255,255,0);
}
</style>
<template>
<div class="sourcematerial">
<div class="sourcematerial_title">
<div class="sourcematerialy_title_large">战略引擎</div>
<div class="sourcematerialy_title_large" @click="returngo">战略引擎</div>
<div class="sourcematerial_title_icon"><Icon type="ios-arrow-forward" /></div>
<div class="sourcematerial_title_content">素材</div>
</div>
......@@ -10,7 +10,7 @@
<div class="content_warpleft">
<div class="content_warp_put">
<div class="warp_put_value">
<Input v-model="item.content" style="width:99%" type="textarea" v-show="item.showput" @on-blur="pushcontent(item)"/>
<Input v-model="item.content" placeholder="请输入具体内容" style="width:99%" type="textarea" v-show="item.showput" @on-blur="pushcontent(item)"/>
<span v-show="item.showspan" class="valuespan" :class="{'listorvaluespan':item.showstatus}">{{item.content}}</span>
</div>
<div class="content_warp_remarks" v-for="(item, index1) in item.dingRecordList" :key="index1">
......@@ -27,18 +27,18 @@
<div class="imgdiv">
<p class="imglist">
<img src="../../static/bianji.png" @click="editinput(item)" title="编辑" >
<img src="../../static/shanchu.png" title="删除" @click="delateitem(item)" style="margin-left:20px">
<img src="../../static/shanchu.png" title="删除" @click="delateitem(item,index)" style="margin-left:20px">
<img src="../../static/dingding.png" alt="钉钉" @click="ding(item)" style="margin-left:20px">
</p>
<p v-show="item.showselect">
<Select v-model="item.dingNamearr" size="small" clearable style="width:100%" multiple filterable :remote-method="remoteMethod" remote>
<Option v-for="(item, index) in getNamearr" :value="item.userId" :key="index">{{item.name}}</Option>
<Select v-model="item.dingNamearr" size="small" label-in-value @on-change="selectName" clearable style="width:100%" multiple filterable :remote-method="remoteMethod" remote>
<Option v-for="(ele, index) in getNamearr" :value="ele.userId" :key="index">{{ele.name}}</Option>
</Select>
</p>
</div>
<div class="confirediv" v-show="item.showselect">
<p style="margin-top:22px">
<Button type="primary" size='small'>取消</Button>
<Button type="primary" size='small' @click="cancel(item)">取消</Button>
<Button type="primary" size='small' @click="confireding(item)">确认</Button>
</p>
</div>
......@@ -46,7 +46,7 @@
</div>
</div>
<div class="classtitle_add">
<img src="../../static/tianjia.png" title="添加" @click="addchlidlist()">
<img src="../../static/tianjia.png" title="新增内容" @click="addchlidlist()">
</div>
</div>
<Modal
......@@ -64,11 +64,8 @@
</Modal>
</div>
</template>
<script src="https://g.alicdn.com/dingding/dingtalk-jsapi/2.7.13/dingtalk.open.js"></script>
<script type="text/javascript" src="http://g.alicdn.com/dingding/dingtalk-pc-api/2.3.1/index.js"></script>
<script>
import {getsourcelist, editsourceitem, delatesourceitem, getname, getconfiglist} from '../api/strategymange.serve'
import * as dd from 'dingtalk-jsapi'
import {getsourcelist, editsourceitem, delatesourceitem, getname, getconfiglist, sendding} from '../api/strategymange.serve'
export default {
data () {
return {
......@@ -81,12 +78,16 @@ export default {
delateuid: '',
getNamearr: [],
confiredingarr: [],
agentId: '', //微应用ID
timeStamp: '', //生成签名的时间戳
corpId: '', //企业ID
resultdingArr: [],
resultdingcontentarr: [],
busUid: '',
content: '',
agentId: '', // 微应用ID
timeStamp: '', // 生成签名的时间戳
corpId: '', // 企业ID
nonceStr: '', // 生成签名的随机串
signature: '', // 签名
dingcode: '',
dingcode: ''
}
},
methods: {
......@@ -108,6 +109,10 @@ export default {
this.contentarr = [...this.contentarr]
},
pushcontent (item) {
if (item.content === '') {
this.$Message.error('内容为空,请输入')
return false
}
item.showput = false
item.showspan = true
this.contentarr = [...this.contentarr]
......@@ -126,18 +131,33 @@ export default {
}
})
},
cancel (item) {
item.showselect = false
this.contentarr = [...this.contentarr]
},
returngo () {
this.$router.push({ path: '/strategymange' })
},
addchlidlist () {
this.contentarr.push({
uid: '',
strategyUid: this.$route.query.uid,
content: ''
content: '',
showput: true,
showspan: false
})
},
delateitem (item) {
delateitem (item, index) {
if (item.content === '') {
this.contentarr.splice(index, 1)
this.contentarr = [...this.contentarr]
return false
}
this.delatelefthostmodal = true
this.delateuid = item.uid
},
async remoteMethod (query) {
this.getNamearr = []
if (query !== '') {
setTimeout(async () => {
query = query.split('(')[0]
......@@ -157,15 +177,33 @@ export default {
this.contentarr = [...this.contentarr]
},
ding (item) {
this.getNamearr = []
item.showselect = true
this.contentarr = [...this.contentarr]
},
selectName (item) {
this.resultdingArr = item
},
confireding (item) {
console.log(111)
console.log(dd)
this.confiredingarr = item.dingNamearr
// console.log(dd)
this.busUid = item.uid
this.content = item.content
this.resultdingArr.map(item => {
this.resultdingcontentarr.push({
busUid: this.busUid,
name: item.label,
userId: item.value,
text: this.content
})
})
sendding(this.resultdingcontentarr).then(data => {
if (data.data.success === true) {
this.$Message.success('发送消息成功')
this.getlist()
} else {
this.$Message.error(data.data.body.message)
this.getlist()
}
})
},
confiredelatehostListleft () {
delatesourceitem(this.delateuid).then(data => {
......@@ -179,116 +217,9 @@ export default {
this.getlist()
}
})
},
// 获取钉钉鉴权配置
getdingTokenconfig () {
getconfiglist().then(data => {
this.agentId = data.data.body.agentId
this.corpId = data.data.body.corpId
this.timeStamp = toString(data.data.body.timeStamp)
this.nonceStr = data.data.body.nonceStr
this.signature = data.data.body.signature
console.log(this.timeStamp, 8888, typeof(this.timeStamp), 999)
})
}
},
async mounted () {
await this.getdingTokenconfig ()
// if(DingTalkPC.ua.isDesktop&&DingTalkPC.ua.isInDingTalk){//PC端钉钉执行此方法
// dd.runtime.permission.requestAuthCode({
// corpId: this.corpId, // 企业id
// onSuccess: function (info) {
// this.dingcode = info.code // 通过该免登授权码可以获取用户身份
// }});
// dd.biz.ding.create({
// users : this.confiredingarr,//用户列表,userid
// corpId: this.corpId, //企业id
// type: 2, //钉类型 1:image 2:link
// alertType: 2,
// alertDate: {"format":"yyyy-MM-dd HH:mm","value":"2015-05-09 08:00"},
// attachment: {
// title: '', //附件的标题
// url: '', //附件点击后跳转url
// image: '', //附件显示时的图片 【可选】
// text: '', //附件显示时的消息体 【可选】
// showInApp: false, // 跳转url在PC客户端上的打开方式,true:从PC容器内打开,false:跳转到浏览器打开 【可选】
// },
// text: '', //消息体
// onSuccess : function() {
// console.log('成功回调')
// },
// onFail : function() {
// console.log('失败回调3333')
// }
// })
// }
// console.log(dd)
dd.config({
agentId: this.agentId, // 必填,微应用ID
corpId: this.corpId, // 必填,企业ID
timeStamp: this.timeStamp, // 必填,生成签名的时间戳
nonceStr: this.nonceStr, // 必填,生成签名的随机串
signature: this.signature , // 必填,签名
type: 0 / 1, // 选填。0表示微应用的jsapi,1表示服务窗的jsapi;不填默认为0。该参数从dingtalk.js的0.8.3版本开始支持
jsApiList: [
'runtime.info',
'biz.contact.choose',
'device.notification.confirm',
'device.notification.alert',
'device.notification.prompt',
'biz.ding.post',
'biz.util.openLink'
], // 必填,需要使用的jsapi列表,注意:不要带dd。
onSuccess : function () {
alert('成功回调')
},
onFail : function () {
alert('失败回调111')
}
})
dd.ready(function () {
alert(222)
dd.runtime.info({
onSuccess: function(info) {
logger.i('runtime info: ' + JSON.stringify(info));
},
onFail: function(err) {
logger.e('fail: ' + JSON.stringify(err));
}
});
dd.runtime.permission.requestAuthCode({
corpId: this.corpId, // 企业id
onSuccess: function (info) {
this.dingcode = info.code // 通过该免登授权码可以获取用户身份
console.log(code, 4444)
}});
dd.biz.ding.create({
users : this.confiredingarr,//用户列表,userid
corpId: this.corpId, //企业id
type: 2, //钉类型 1:image 2:link
alertType: 2,
alertDate: {"format":"yyyy-MM-dd HH:mm","value":"2015-05-09 08:00"},
attachment: {
title: '', //附件的标题
url: '', //附件点击后跳转url
image: '', //附件显示时的图片 【可选】
text: '', //附件显示时的消息体 【可选】
showInApp: false, // 跳转url在PC客户端上的打开方式,true:从PC容器内打开,false:跳转到浏览器打开 【可选】
},
text: '', //消息体
onSuccess : function() {
console.log('成功回调')
},
onFail : function() {
console.log('失败回调3333')
}
})
console.log(this.dingcode, 8888888888)
})
dd.error((error) => {
alert('error');
alert(`dd error: ${JSON.stringify(error)}`);
});
this.getlist()
}
}
......@@ -297,8 +228,9 @@ export default {
.sourcematerial{
height: 100%;
width: 100%;
background: url('../../static/logo.jpg') repeat;
background-size: 100% 100%;
background: url('../../static/bgss.jpg') no-repeat center 0 / cover;
font-family:"Microsoft Yahei";
overflow: hidden;
}
.sourcematerial_title{
height: 40px;
......@@ -309,7 +241,8 @@ export default {
.sourcematerialy_title_large{
width: 60px;
float: left;
margin-left: 20px
margin-left: 20px;
cursor: pointer;
}
.sourcematerial_title_icon{
width: 20px;
......@@ -321,6 +254,24 @@ export default {
float: left;
overflow-y: auto;
}
.detailstrategy_content_warp::-webkit-scrollbar{
width:3px;
height:3px;
}
.detailstrategy_content_warp::-webkit-scrollbar-track{
background: rgba(239, 239, 239,0.1);
border-radius:2px;
}
.detailstrategy_content_warp::-webkit-scrollbar-thumb{
background: rgba(136,136,136,0.1);
border-radius:10px;
}
.detailstrategy_content_warp::-webkit-scrollbar-thumb:hover{
background: rgba(136,136,136,0.4);
}
.detailstrategy_content_warp::-webkit-scrollbar-corner{
background: #179a16;
}
.detailstrategy_content_warp{
width: 86%;
margin: 0 11%;
......@@ -340,12 +291,9 @@ export default {
margin-right: 1%
}
.content_warp_remarks{
min-height:40px;
min-height:25px;
width: 100%;
height: 40px;
float: left;
line-height: 20px;
padding: 10px 0;
color: #848484;
}
.listorvaluespan {
......@@ -361,6 +309,7 @@ export default {
width: 100%;
float: left;
background: white;
border-radius: 5px
}
.warp_put_img{
width: 100%;
......@@ -371,11 +320,13 @@ export default {
height: 100%;
width: 52%;
float: left;
cursor: pointer;
}
.imglist {
width: 100%;
height: 20px;
display: flex;
cursor: pointer;
}
.confirediv{
height: 100%;
......@@ -399,13 +350,15 @@ export default {
align-items:Center;
padding: 5px 5px;
border: 1px solid #a2825f;
border-radius: 2px
border-radius: 5px;
cursor: pointer;
}
.classtitle_add{
height: 40px;
width: 100%;
float: left;
text-align: center;
margin-left: -6%;
line-height: 40px;
}
.classtitle_add img{
......@@ -428,7 +381,7 @@ export default {
.sourcematerial_title_content{
color: black;
font-weight: 900;
font-size: 16px;
font-size: 14px;
}
</style>
<style>
......@@ -445,4 +398,19 @@ export default {
word-break: normal;
/* border-bottom: 1px solid #666 */
}
.warp_put_value .ivu-input {
height:100%;
min-height: 50px;
border:none;
text-align:center;
font-size:16px;
vertical-align: middle;
resize: none;
background:rgba(255,255,255,0);
}
.ivu-input:focus{
outline:none;
border:none;
box-shadow: 0 0 0 2px transparent;
}
</style>
......@@ -9,13 +9,13 @@
<div class="leftdiv_title_class" @mousemove="move(item)" @mouseleave="leave(item)">
<div class="classtitle_icon">
<div v-show="item.showtitle">
<img src="../../static/tianjia.png" title="添加" @click="oneaddtitle">
<img src="../../static/add.png" title="新增主标题" @click="oneaddtitle">
<img src="../../static/bianji.png" title="编辑" @click="editimgtitle(item,index)">
<img src="../../static/shanchu.png" title="删除" @click="delateedittitle(item)">
<img src="../../static/shanchu.png" title="删除" @click="delateedittitle(item, index)">
</div>
</div>
<div class="classtitle_title">
<Input v-model="item.title" style="width:99%" v-show="item.editstaus" @on-blur="saveedittitle(item,index)"/>
<Input v-model="item.title" style="width:99%" v-show="item.editstaus" placeholder="请输入主标题" @on-blur="saveedittitle(item,index)"/>
<span v-show="item.editshowstaus" class="classtitle_title_title" :class="{'colorlisttitle':item.showtitle}">{{item.title}}</span>
</div>
</div>
......@@ -30,15 +30,15 @@
<div class="leftdiv_title_icon">
<div v-show="element.showtitlechlid">
<p>
<img src="../../static/bianji.png" title="编辑" @click="editchliidput(index, index1, element)">
<img src="../../static/bianji.png" title="编辑" @click="editchliidput(element,index, index1)">
</p>
<p>
<img src="../../static/shanchu.png" title="删除" @click="delatechlidListleft(index, index1, element)">
<img src="../../static/shanchu.png" title="删除" @click="delatechlidListleft(element, index, index1)">
</p>
</div>
</div>
<div class="leftdiv_title_title">
<Input v-model="element.title" style="width:99%" type="textarea" v-show="element.elementeditsta" @on-blur="saveeditchildput(element)"/>
<Input v-model="element.title" style="width:99%" placeholder="请输入子标题" type="textarea" v-show="element.elementeditsta" @on-blur="saveeditchildput(element, index)" ref="inputVal"/>
<span v-show="element.elementeditput" class="valuespan" @click="toscordpage(element.title,element)" :class="{'colorlistvaluespan':element.showtitlechlid}">{{element.title}}</span>
</div>
</div>
......@@ -48,11 +48,12 @@
</div>
</div>
<div class="classtitle_add">
<img src="../../static/tianjia.png" title="添加" @click="addchlidlist(index)">
<img src="../../static/tianjia.png" title="新增子标题" @click="addchlidlist(index)">
</div>
</div>
</div>
<div class="center">
<div class="center_content">
<div class="hosttitle" @mousemove="onmouseoverinput()" @mouseleave="movleave()">
<div class="hosttileinput">
<Input v-model="hosttitlespantitle" v-show="showinput" :readonly='hostreadonly' type="textarea" style="width: 100%;height:100%" @on-blur='blur' />
......@@ -69,18 +70,19 @@
相关素材
</div>
</div>
</div>
<div class="right">
<div class="leftdiv" v-for="(item, index3) in rightarr" :key="index3">
<div class="leftdiv_title_class" @mousemove="moveright(item)" @mouseleave="leaveright(item)">
<div class="classtitle_icon">
<div v-show="item.showtitle">
<img src="../../static/tianjia.png" title="添加" @click="oneaddtitleright">
<img src="../../static/tianjia.png" title="新增主标题" @click="oneaddtitleright">
<img src="../../static/bianji.png" title="编辑" @click="editimgtitleright(item,index3)">
<img src="../../static/shanchu.png" title="删除" @click="delateedittitle(item)">
<img src="../../static/shanchu.png" title="删除" @click="delateedittitleright(item,index3)">
</div>
</div>
<div class="classtitle_title">
<Input v-model="item.title" style="width:99%" v-show="item.editstaus" @on-blur="saveedittitleright(item,index3)"/>
<Input v-model="item.title" style="width:99%" placeholder="请输入主标题" v-show="item.editstaus" @on-blur="saveedittitleright(item,index3)"/>
<span v-show="item.editshowstaus" class="classtitle_title_title" :class="{'colorlisttitle':item.showtitle}">{{item.title}}</span>
</div>
</div>
......@@ -95,16 +97,16 @@
<div class="leftdiv_title_icon">
<div v-show="element.showtitlechlid">
<p>
<img src="../../static/bianji.png" title="编辑" @click="editchliidput(index3, index4, element)">
<img src="../../static/bianji.png" title="编辑" @click="editchliidput(element)">
</p>
<p>
<img src="../../static/shanchu.png" title="删除" @click="delatechlidListright(index3, index4, element)">
<img src="../../static/shanchu.png" title="删除" @click="delatechlidListright(element, index3, index4)">
</p>
</div>
</div>
<div class="leftdiv_title_title">
<Input v-model="element.title" style="width:99%" type="textarea" v-show="element.elementeditsta" @on-blur="saveeditchildputright(element)"/>
<span v-show="element.elementeditput" class="valuespan" :class="{'colorlistvaluespan':element.showtitlechlid}">{{element.title}}</span>
<Input v-model="element.title" style="width:99%" placeholder="请输入子标题" type="textarea" v-show="element.elementeditsta" @on-blur="saveeditchildputright(element, index3)"/>
<span v-show="element.elementeditput" class="valuespan" :class="{'colorlistvaluespan':element.showtitlechlid}" @click="toscordpage(element.title,element)">{{element.title}}</span>
</div>
</div>
</div>
......@@ -113,7 +115,7 @@
</div>
</div>
<div class="classtitle_add">
<img src="../../static/tianjia.png" title="添加" @click="addchlidrightlist(index3)">
<img src="../../static/tianjia.png" title="新增子标题" @click="addchlidrightlist(index3)">
</div>
</div>
</div>
......@@ -144,10 +146,22 @@
<Button type="primary" style="margin:0 20px" @click="confiredelatehostListleft">确认</Button>
</div>
</Modal>
<Modal
v-model="delatelefthosttitlemodal"
:mask-closable='false'
:width='300'
footer-hide
>
<h1 class="textalign">提示</h1>
<div class="textalign_content_host">删除一级标题将连同全部子标题及内容一同删除,您是否确认全部删除?</div>
<div class="textalign_btn">
<Button type="primary" @click="delatelefthosttitlemodal=false">取消</Button>
<Button type="primary" style="margin:0 20px" @click="confiredelatehostListleft">确认</Button>
</div>
</Modal>
</div>
</template>
<script>
// import Vue from 'vue'
import draggable from 'vuedraggable'
import {getSoulSoother, getlist, addtitlelist, delatetitlelist, savechildput, delatechildputchlid, savehostTitle, sortstrategy} from '../api/strategymange.serve'
export default {
......@@ -165,11 +179,13 @@ export default {
showinput: false,
delateleftchildmodal: false,
delatelefthostmodal: false,
delatelefthosttitlemodal: false,
elementuid: '',
hostuid: '',
maintitleuid: '',
detailtitleuid: '',
soul: '',
mainUid: '',
leftarr: [],
rightarr: [],
resultarr: [],
......@@ -177,12 +193,22 @@ export default {
addarr: [],
hosttitlespantitle: '',
objectivesUid: '',
updatetime: ''
updatetime: '',
focusState: false
}
},
components: {
draggable
},
directives: {
foucs: {
update: function (el, {value}) {
if (value) {
el.focus()
}
}
}
},
methods: {
move (item) {
item.showtitle = true
......@@ -236,7 +262,6 @@ export default {
this.$Message.error(data.data.body.message)
this.getList()
}
console.log(data)
})
},
onmouseoverinput () {
......@@ -256,39 +281,49 @@ export default {
this.rightarr = [...this.rightarr]
},
saveedittitle (item, ind) {
if (item.title === '') {
this.$Message.error('内容为空,请输入。')
return false
}
this.leftarr[ind].editshowstaus = true
this.leftarr[ind].editstaus = false
this.leftarr[ind].title = item.title
this.leftarr = [...this.leftarr]
let params = {
strategyUid: item.strategyUid,
strategyUid: item.strategyUid === '' ? this.mainUid : item.strategyUid,
uid: item.uid,
title: item.title,
orderNo: ind
orderNo: item.orderNo === '' ? this.leftarr.length : item.orderNo,
groupType: '1'
}
addtitlelist(params).then(data => {
// console.log(data, 99)
if (data.data.success === true) {
this.objectivesUid = data.data.body.uid
this.$Message.success('保存成功')
this.getList()
} else {
this.$Message.error(data.data.body.message)
this.getList()
}
})
},
saveedittitleright (item, ind) {
if (item.title === '') {
this.$Message.error('内容为空,请输入')
return false
}
this.rightarr[ind].editshowstaus = true
this.rightarr[ind].editstaus = false
this.rightarr[ind].title = item.title
this.rightarr = [...this.rightarr]
let params = {
strategyUid: item.strategyUid,
strategyUid: item.strategyUid === '' ? this.mainUid : item.strategyUid,
uid: item.uid,
title: item.title,
orderNo: ind
orderNo: item.orderNo === '' ? this.rightarr.length : item.orderNo,
groupType: '2'
}
addtitlelist(params).then(data => {
// console.log(data, 99)
if (data.data.success === true) {
this.objectivesUid = data.data.body.uid
this.$Message.success('保存成功')
......@@ -306,9 +341,9 @@ export default {
objectivesUid: this.leftarr[index].uid,
uid: '',
title: '',
orderNo: 0,
elementeditput: true,
elementeditsta: false,
orderNo: '',
elementeditput: false,
elementeditsta: true,
showtitlechlid: false
})
} else {
......@@ -316,9 +351,9 @@ export default {
objectivesUid: this.leftarr[index].uid,
uid: '',
title: '',
orderNo: 0,
elementeditput: true,
elementeditsta: false,
orderNo: '',
elementeditput: false,
elementeditsta: true,
showtitlechlid: false
})
}
......@@ -330,9 +365,9 @@ export default {
objectivesUid: this.rightarr[index].uid,
uid: '',
title: '',
orderNo: 0,
elementeditput: true,
elementeditsta: false,
orderNo: '',
elementeditput: false,
elementeditsta: true,
showtitlechlid: false
})
} else {
......@@ -340,41 +375,43 @@ export default {
objectivesUid: this.rightarr[index].uid,
uid: '',
title: '',
orderNo: 0,
elementeditput: true,
elementeditsta: false,
orderNo: '',
elementeditput: false,
elementeditsta: true,
showtitlechlid: false
})
}
},
editchliidput (index, index1, item) {
// 1
// Vue.set(this.leftarr[index]['keyResultsVOList'], index1, { ...item, elementeditput: false })
// 2
// this.leftarr[index]['keyResultsVOList'].splice(index1, 1, { ...item, elementeditput: false })
// 3
// this.leftarr[index]['keyResultsVOList'] = this.leftarr[index]['keyResultsVOList'].map((v, i) => {
// return (i === index1 && { ...v, elementeditput: false }) || v
// })
// 4
// this.leftarr[index]['keyResultsVOList'][index1].elementeditput = false
// 5
editchliidput (item, index, index1) {
item.elementeditput = !item.elementeditput
item.elementeditsta = !item.elementeditsta
item.showtitlechlid = !item.showtitlechlid
this.leftarr = [...this.leftarr]
this.$nextTick(function () {
this.$refs.inputVal.focus()
})
},
delatechlidListleft (index, index1, element) {
delatechlidListleft (element, index, ind) {
if (element.title === '') {
this.leftarr[index].keyResultsVOList.splice(ind, 1);
this.leftarr = [...this.leftarr]
return false
}
this.delateleftchildmodal = true
this.elementuid = element.uid
},
delatechlidListright (index, index1, element) {
delatechlidListright (element, index, ind) {
if (element.title === '') {
this.rightarr[index].keyResultsVOList.splice(ind, 1);
this.rightarr = [...this.rightarr]
return false
}
this.delateleftchildmodal = true
this.elementuid = element.uid
},
confiredelatechlidListleft () {
delatechildputchlid(this.elementuid).then(data => {
if (data.data.success === true) {
if (data.data.success) {
this.$Message.success('删除成功')
this.delateleftchildmodal = false
this.getList()
......@@ -385,7 +422,11 @@ export default {
}
})
},
saveeditchildput (item) {
saveeditchildput (item, index) {
if (item.title === '') {
this.$Message.error('内容为空,请输入')
return false
}
item.elementeditput = !item.elementeditput
item.elementeditsta = !item.elementeditsta
this.leftarr = [...this.leftarr]
......@@ -393,7 +434,7 @@ export default {
objectivesUid: item.objectivesUid,
uid: item.uid === '' ? '' : item.uid,
title: item.title === '' ? '' : item.title,
orderNo: item.orderNo === '' ? '' : item.orderNo
orderNo: item.orderNo === '' ? this.leftarr[index].keyResultsVOList.length : item.orderNo
}
savechildput(data).then(data => {
if (data.data.success === true) {
......@@ -402,7 +443,11 @@ export default {
}
})
},
saveeditchildputright (item) {
saveeditchildputright (item, index) {
if (item.title === '') {
this.$Message.error('内容为空,请输入')
return false
}
item.elementeditput = !item.elementeditput
item.elementeditsta = !item.elementeditsta
this.rightarr = [...this.rightarr]
......@@ -410,7 +455,7 @@ export default {
objectivesUid: item.objectivesUid,
uid: item.uid === '' ? '' : item.uid,
title: item.title === '' ? '' : item.title,
orderNo: item.orderNo === '' ? '' : item.orderNo
orderNo: item.orderNo === '' ? this.rightarr[index].keyResultsVOList.length : item.orderNo
}
savechildput(data).then(data => {
if (data.data.success === true) {
......@@ -473,42 +518,62 @@ export default {
},
oneaddtitle () {
this.leftarr.push({
strategyUid: '3d6768ad7c2a4eaa86a788527f05ca10',
strategyUid: this.mainUid,
uid: '',
title: '',
orderNo: 0,
editstaus: false,
editshowstaus: true,
orderNo: '',
editstaus: true,
editshowstaus: false,
showtitlechlid: false,
keyResultsVOList: []
})
},
oneaddtitleright () {
this.rightarr.push({
strategyUid: '3d6768ad7c2a4eaa86a788527f05ca10',
strategyUid: this.mainUid,
uid: '',
title: '',
orderNo: 0,
editstaus: false,
editshowstaus: true,
orderNo: '',
editstaus: true,
editshowstaus: false,
showtitlechlid: false,
keyResultsVOList: []
})
},
delateedittitle (item) {
delateedittitle (item, index) {
if (item.title === '') {
this.leftarr.splice(index, 1)
this.leftarr = [...this.leftarr]
return false
}
this.hostuid = item.uid
this.delatelefthosttitlemodal = true
},
delateedittitleright (item, index) {
if (item.title === '') {
this.rightarr.splice(index, 1)
this.rightarr = [...this.rightarr]
return false
}
this.hostuid = item.uid
this.delatelefthostmodal = true
this.delatelefthosttitlemodal = true
},
confiredelatehostListleft () {
delatetitlelist(this.hostuid).then(data => {
if (data.data.success === true) {
this.delatelefthostmodal = false
this.delatelefthosttitlemodal = false
this.$Message.success('删除成功')
this.getList()
this.leftarr = [...this.leftarr]
this.rightarr = [...this.rightarr]
} else {
this.delatelefthostmodal = false
this.delatelefthosttitlemodal = false
this.$Message.error(data.data.body.message)
this.getList()
this.leftarr = [...this.leftarr]
this.rightarr = [...this.rightarr]
}
})
},
......@@ -529,8 +594,22 @@ export default {
this.hosttitlespantitle = data.data.body.title
this.updatetime = data.data.body.modifyTime
this.maintitleuid = data.data.body.uid
this.mainUid = data.data.body.uid
if (data.data.body.leftObjectivesVOList.length === 0) {
this.leftarr = [
{
strategyUid: '',
uid: '',
title: '',
orderNo: '',
editstaus: true,
editshowstaus: false,
showtitlechlid: false,
keyResultsVOList: []
}
]
} else {
this.leftarr = data.data.body.leftObjectivesVOList
this.rightarr = data.data.body.rightObjectivesVOList
this.leftarr.map(item => {
item.editstaus = false
item.editshowstaus = true
......@@ -543,6 +622,22 @@ export default {
})) || null
return item
})
}
if (data.data.body.rightObjectivesVOList.length === 0) {
this.rightarr = [
{
strategyUid: '',
uid: '',
title: '',
orderNo: '',
editstaus: true,
editshowstaus: false,
showtitlechlid: false,
keyResultsVOList: []
}
]
} else {
this.rightarr = data.data.body.rightObjectivesVOList
this.rightarr.map(item => {
item.editstaus = false
item.editshowstaus = true
......@@ -555,12 +650,14 @@ export default {
})) || null
return item
})
}
})
}
},
mounted () {
// this.getSoul()
this.getSoul()
this.getList()
setInterval(this.getSoul, 86400000)
},
created () {
}
......@@ -570,26 +667,65 @@ export default {
.strategymange{
height: 100%;
width: 100%;
background: url('../../static/logo.jpg') repeat;
background-size: 100% 100%;
background: url("../../static/bgss.jpg") no-repeat center 0 / cover;
font-family:"Microsoft Yahei";
overflow: hidden;
}
.left::-webkit-scrollbar{
width:3px;
height:3px;
}
.left::-webkit-scrollbar-track{
background: rgba(239, 239, 239,0.1);
border-radius:2px;
}
.left::-webkit-scrollbar-thumb{
background: rgba(136,136,136,0.1);
border-radius:10px;
}
.left::-webkit-scrollbar-thumb:hover{
background: rgba(136,136,136,0.4);
}
.left::-webkit-scrollbar-corner{
background: #179a16;
}
.right::-webkit-scrollbar{
width:3px;
height:3px;
}
.right::-webkit-scrollbar-track{
background: rgba(239, 239, 239,0.1);
border-radius:2px;
}
.right::-webkit-scrollbar-thumb{
background: rgba(136,136,136,0.1);
border-radius:10px;
}
.right::-webkit-scrollbar-thumb:hover{
background: rgba(136,136,136,0.4);
}
.right::-webkit-scrollbar-corner{
background: #179a16;
}
.heart{
height: 60px;
height: 80px;
width: 100%;
line-height: 60px;
line-height: 80px;
text-align: center;
position: relative;
top:0
}
.strategymange-content{
width: 100%;
height: 90%
height: 90%;
float: left;
}
.left{
width: 35%;
height: 100%;
height: 98%;
float: left;
overflow-y: auto
overflow-y: auto;
padding-bottom: 20px;
}
.leftdiv{
width: 100%;
......@@ -597,14 +733,17 @@ export default {
}
.leftdiv_title{
width: 100%;
min-height: 60px;
float: left;
border: 1px solid rgba(255,255,255,0);
}
.leftdiv_title_icon{
height: 100%;
width: 20px;
width: 5%;
border: 1px solid rgba(255,255,255,0);
float: left;
margin: 0 10px;
cursor: pointer;
}
.leftdiv_title_icon img{
height: 15px;
......@@ -612,13 +751,13 @@ export default {
vertical-align: middle;
}
.leftdiv_title_title{
height: 100%;
min-height: 50px;
width: 80%;
float: left;
text-align: center;
font-size: 16px;
margin-bottom: 20px;
background: white
background: white;
border-radius: 5px
}
.center{
width: 30%;
......@@ -626,17 +765,23 @@ export default {
float: left;
display: flex;
}
.center_content{
min-height: 140px;
margin: auto;
width: 100%;
}
.right{
width:35%;
height: 100%;
height: 98%;
float: left;
overflow-y: auto
overflow-y: auto;
padding-bottom: 20px;
/* border: 1px solid black */
}
.hosttitle{
width: 90%;
min-height:60px;
margin:auto;
/* border: #666 1px solid */
}
.img{
height:20px;
......@@ -659,17 +804,16 @@ export default {
min-height: 60px;
width: 10%;
float: left;
cursor: pointer;
}
.hosttime{
height: 25px;
width: 20%;
width: 90%;
text-align: center;
line-height: 25px;
position: fixed;
bottom: 32%;
left: 46%;
font-size: 16px;
color: #848484
color: white;
margin: 20px 0
}
.hosttitlespan{
height: 100%;
......@@ -683,13 +827,14 @@ export default {
align-items:Center;
padding: 5px 5px;
color: #a2825f;
font-weight: 900
font-weight: 900;
cursor: pointer;
}
.valuespan{
height: 100%;
min-height: 50px;
width: 100%;
font-size: 16px;
font-size: 14px;
background: white;
text-align: center;
display: flex;
......@@ -697,7 +842,10 @@ export default {
align-items:Center;
padding: 5px 5px;
border: 1px solid #a2825f;
border-radius: 2px
border-radius: 5px;
cursor: pointer;
font-family:"Microsoft Yahei";
overflow-y: auto
}
.colorlistvaluespan{
height: 100%;
......@@ -711,7 +859,8 @@ export default {
padding: 5px 5px;
border-radius: 2px;
background: #e8e8e8;
border: 1px solid rgba(255,255,255,0)
border: 1px solid rgba(255,255,255,0);
overflow-y: auto
}
.divwarp{
min-height: 50px;
......@@ -721,29 +870,35 @@ export default {
border: 1px solid rgba(255,255,255,0)
}
.leftdiv_title_class{
height: 30px;
/* border: 1px solid black; */
min-height: 30px;
width: 100%;
text-align: center;
float: left;
margin-top: 20px
}
.classtitle_icon{
width:20%;
height: 100%;
float: left;
cursor: pointer;
border: 1px solid rgba(255,255,255,0)
}
.classtitle_title{
width: 60%;
height: 100%;
float: left;
/* margin-top: 20px; */
/* border: 1px solid black */
}
.classtitle_title_title{
border-bottom: 1px solid #999;
/* border-bottom: 1px solid #999; */
height: 100%;
width: 100%;
display: inline-block;
font-size: 18px
font-size: 18px;
cursor: pointer;
font-family:"Microsoft Yahei";
color: #a2825f;
}
.classtitle_icon img{
height: 15px;
......@@ -761,16 +916,18 @@ export default {
width: 15px
}
.sourcematerialdiv{
height: 25px;
width: 100px;
height: 35px;
width: 120px;
text-align: center;
line-height: 25px;
line-height: 35px;
border: 1px solid #a2825f;
position: fixed;
bottom: 60px;
left: 53%;
left: 51%;
border-radius: 5px;
color: #a2825f
color: #a2825f;
font-size: 20px;
cursor: pointer;
}
.textalign{
text-align: center
......@@ -781,6 +938,12 @@ export default {
text-align: center;
font-size: 16px
}
.textalign_content_host{
height: 60px;
line-height: 30px;
text-align: left;
font-size: 16px
}
.textalign_btn{
text-align: center;
margin-top:20px;
......@@ -791,7 +954,7 @@ export default {
.colorlisttitle{
color: black;
font-weight: 900;
border-bottom: 1px solid black
border-bottom: 1px solid black;
}
</style>
<style>
......@@ -832,19 +995,16 @@ export default {
vertical-align: middle;
resize: none;
background:rgba(255,255,255,0);
/* border-bottom: 1px solid #666 */
}
.aaa{
/* background: white; */
width: 100%;
margin-top:20px;
min-height: 50px;
border: 1px solid rgba(255,255,255,0);
}
.divhome{
min-height: 60px;
width: 100%;
height: 100%;
overflow: hidden;
border: 1px solid rgba(255,255,255,0);
}
</style>
......@@ -5,8 +5,8 @@ import localStorage from './localStorage.service'
// window.Promise = require('es6-promise').Promise
const config = {
timeout: 600000
// withCredentials: true // 允许携带cookie
timeout: 600000,
withCredentials: true // 允许携带cookie
}
const instance = axios.create(Object.assign({}, config))
instance._extend = {}
......
static/add.png

406 Bytes

// A custom Nightwatch assertion.
// The assertion name is the filename.
// Example usage:
//
// browser.assert.elementCount(selector, count)
//
// For more information on custom assertions see:
// http://nightwatchjs.org/guide#writing-custom-assertions
exports.assertion = function (selector, count) {
this.message = 'Testing if element <' + selector + '> has count: ' + count
this.expected = count
this.pass = function (val) {
return val === this.expected
}
this.value = function (res) {
return res.value
}
this.command = function (cb) {
var self = this
return this.api.execute(function (selector) {
return document.querySelectorAll(selector).length
}, [selector], function (res) {
cb.call(self, res)
})
}
}
require('babel-register')
var config = require('../../config')
// http://nightwatchjs.org/gettingstarted#settings-file
module.exports = {
src_folders: ['test/e2e/specs'],
output_folder: 'test/e2e/reports',
custom_assertions_path: ['test/e2e/custom-assertions'],
selenium: {
start_process: true,
server_path: require('selenium-server').path,
host: '127.0.0.1',
port: 4444,
cli_args: {
'webdriver.chrome.driver': require('chromedriver').path
}
},
test_settings: {
default: {
selenium_port: 4444,
selenium_host: 'localhost',
silent: true,
globals: {
devServerURL: 'http://localhost:' + (process.env.PORT || config.dev.port)
}
},
chrome: {
desiredCapabilities: {
browserName: 'chrome',
javascriptEnabled: true,
acceptSslCerts: true
}
},
firefox: {
desiredCapabilities: {
browserName: 'firefox',
javascriptEnabled: true,
acceptSslCerts: true
}
}
}
}
// 1. start the dev server using production config
process.env.NODE_ENV = 'testing'
const webpack = require('webpack')
const DevServer = require('webpack-dev-server')
const webpackConfig = require('../../build/webpack.prod.conf')
const devConfigPromise = require('../../build/webpack.dev.conf')
let server
devConfigPromise.then(devConfig => {
const devServerOptions = devConfig.devServer
const compiler = webpack(webpackConfig)
server = new DevServer(compiler, devServerOptions)
const port = devServerOptions.port
const host = devServerOptions.host
return server.listen(port, host)
})
.then(() => {
// 2. run the nightwatch test suite against it
// to run in additional browsers:
// 1. add an entry in test/e2e/nightwatch.conf.js under "test_settings"
// 2. add it to the --env flag below
// or override the environment flag, for example: `npm run e2e -- --env chrome,firefox`
// For more information on Nightwatch's config file, see
// http://nightwatchjs.org/guide#settings-file
let opts = process.argv.slice(2)
if (opts.indexOf('--config') === -1) {
opts = opts.concat(['--config', 'test/e2e/nightwatch.conf.js'])
}
if (opts.indexOf('--env') === -1) {
opts = opts.concat(['--env', 'chrome'])
}
const spawn = require('cross-spawn')
const runner = spawn('./node_modules/.bin/nightwatch', opts, { stdio: 'inherit' })
runner.on('exit', function (code) {
server.close()
process.exit(code)
})
runner.on('error', function (err) {
server.close()
throw err
})
})
// For authoring Nightwatch tests, see
// http://nightwatchjs.org/guide#usage
module.exports = {
'default e2e tests': function (browser) {
// automatically uses dev Server port from /config.index.js
// default: http://localhost:8080
// see nightwatch.conf.js
const devServer = browser.globals.devServerURL
browser
.url(devServer)
.waitForElementVisible('#app', 5000)
.assert.elementPresent('.hello')
.assert.containsText('h1', 'Welcome to Your Vue.js App')
.assert.elementCount('img', 1)
.end()
}
}
{
"env": {
"jest": true
},
"globals": {
}
}
const path = require('path')
module.exports = {
rootDir: path.resolve(__dirname, '../../'),
moduleFileExtensions: [
'js',
'json',
'vue'
],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1'
},
transform: {
'^.+\\.js$': '<rootDir>/node_modules/babel-jest',
'.*\\.(vue)$': '<rootDir>/node_modules/vue-jest'
},
testPathIgnorePatterns: [
'<rootDir>/test/e2e'
],
snapshotSerializers: ['<rootDir>/node_modules/jest-serializer-vue'],
setupFiles: ['<rootDir>/test/unit/setup'],
mapCoverage: true,
coverageDirectory: '<rootDir>/test/unit/coverage',
collectCoverageFrom: [
'src/**/*.{js,vue}',
'!src/main.js',
'!src/router/index.js',
'!**/node_modules/**'
]
}
import Vue from 'vue'
Vue.config.productionTip = false
import Vue from 'vue'
import HelloWorld from '@/components/HelloWorld'
describe('HelloWorld.vue', () => {
it('should render correct contents', () => {
const Constructor = Vue.extend(HelloWorld)
const vm = new Constructor().$mount()
expect(vm.$el.querySelector('.hello h1').textContent)
.toEqual('Welcome to Your Vue.js App')
})
})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment