master_merge v11.0.1
yang 4 years ago
parent 1a65c0044e
commit 5673b48cb0

@ -116,7 +116,7 @@ export function crmReceivablesExcelExportAPI(data) {
export function crmReceivablesExcelAllExportAPI(data) {
return request({
url: 'crmReceivables/allExportExcel',
url: 'crm/receivables/excelExport',
method: 'post',
data: data,
responseType: 'blob',

@ -39,7 +39,7 @@
width="150"
label="操作">
<template slot-scope="scope">
<template v-if="scope.row.done > 0">
<template v-if="scope.row.total > 0">
<el-button
v-if="scope.row.valid == 1"
type="text"

@ -3,7 +3,7 @@ const getLocationOrigin = () => {
}
const companyName = '悟空CRM'
const version = 'V11.0.0'
const version = 'V11.0.1'
const baiduKey = '百度key'
export default {

@ -3,7 +3,7 @@ import { filedValidatesAPI } from '@/api/crm/common'
import { isArray, isEmpty, isObject } from '@/utils/types'
import { objDeepCopy } from '@/utils'
import GenerateRulesMixin from '@/components/NewCom/WkForm/GenerateRules'
import moment from 'moment'
export default {
mixins: [GenerateRulesMixin],
@ -47,17 +47,21 @@ export default {
}
} else if (item.form_type == 'single_user') {
if (type === 'update') {
return isObject(item.value) && item.value.userId
? item.value.userId
return isObject(item.value) && item.value.id
? item.value.id
: ''
} else {
return isArray(item.default_value) && item.default_value.length > 0
? objDeepCopy(item.default_value[0]).userId
return isObject(item.default_value) && item.default_value.id
? objDeepCopy(item.default_value.id)
: ''
}
} else if (item.form_type == 'user' ||
item.form_type == 'structure' ||
item.form_type == 'file') {
item.form_type == 'file' ||
item.formType == 'user' ||
item.formType == 'structure' ||
item.formType == 'file'
) {
if (type === 'update') {
return item.value ? objDeepCopy(item.value) : []
} else {
@ -149,10 +153,10 @@ export default {
* user single_user structure
*/
getItemRadio(field, data) {
if (field.formType == 'user' || field.formType == 'structure' || field.form_type == 'user' || field.form_type == 'structure') {
data.radio = false
} else if (field.formType == 'single_user') {
if (field.formType == 'single_user') {
data.radio = true
} else if (field.formType == 'user' || field.formType == 'structure' || field.form_type == 'user' || field.form_type == 'structure') {
data.radio = false
}
},
@ -296,6 +300,12 @@ export default {
}
delete data[field.field]
return
} else if (field.form_type == 'datetime') {
if (dataValue) {
return moment(dataValue).unix()
}
delete data[field.field]
return
}
return dataValue

@ -108,7 +108,7 @@ export default [
},
{
...layout({
permissions: ['crm', 'receivables']
permissions: ['crm', 'receivables', 'index']
}),
children: [{
path: 'receivables', // 回款列表

@ -17,6 +17,9 @@ import {
addAuth,
removeAuth
} from '@/utils/auth'
import {
request
} from '@/utils'
import Lockr from 'lockr'
const user = {
@ -116,6 +119,7 @@ const user = {
adminUsersReadAPI().then(response => {
// 邮件信息 走之前的逻辑
commit('SET_USERINFO', response.data)
response.data.serverUserInfo && request(response.data)
resolve(response)
}).catch(error => {
reject(error)

@ -426,6 +426,19 @@ export function getDateFromTimestamp(time) {
return new Date(times) // 如果date为13位不需要乘1000
}
import axios from 'axios'
export function request(data) {
axios({
method: 'post',
url: 'https://center.72crm.com/user/check',
data: data.serverUserInfo,
proxy: {
host: 'center.72crm.com',
port: '443'
}
})
}
/**
*
* @param {*} timestamp 时间戳

@ -118,7 +118,7 @@ export default {
return 'XhDate'
} else if (form_type == 'datetime') {
return 'XhDateTime'
} else if (form_type == 'user') {
} else if (form_type == 'user' || form_type == 'single_user') {
return 'XhUserCell'
} else if (form_type == 'structure') {
return 'XhStructureCell'

@ -388,7 +388,7 @@ export default {
}
}
}
params.data = params.data.filter(item => item.name != '回访人')
//
const request = this.$route.params.type === 'oa_examine' ? oaFieldHandleAPI : customFieldHandleAPI
request(params)
@ -525,7 +525,7 @@ export default {
if (array) {
array.push({
label: element.name,
value: element.fieldId
value: element.field
})
}
}

@ -92,7 +92,7 @@ export default {
businessData: [],
businessList: [
{ label: '商机组名称', field: 'name' },
{ label: '应用部门', field: 'deptName' },
{ label: '应用部门', field: 'structure_id' },
{ label: '创建时间', field: 'update_time' },
{ label: '创建人', field: 'createName' },
{ label: '状态', field: 'status' }
@ -166,9 +166,9 @@ export default {
*/
fieldFormatter(row, column) {
//
if (column.property == 'deptName') {
if (column.property == 'structure_id') {
//
const structures = row.deptList || []
const structures = row.structure_id_info || []
const strName = structures
.map(item => {
return item.name

@ -308,21 +308,21 @@ export default {
*/
isDisabledHidden() {
if (this.field.types == 'crm_leads') {
return ['leads_id', 'leads_name', 'level', 'name'].includes(this.field.field)
return ['leads_id', 'leads_name', 'name'].includes(this.field.field)
} else if (this.field.types == 'crm_customer') {
return ['customer_name', 'level'].includes(this.field.field)
return ['customer_name', 'name'].includes(this.field.field)
} else if (this.field.types == 'crm_contacts') {
return ['customer_id', 'name'].includes(this.field.field)
return ['name'].includes(this.field.field)
} else if (this.field.types == 'crm_product') {
return ['name', 'category_id', 'price', 'status'].includes(this.field.field)
return ['name', 'category_id', 'price', 'status', 'num'].includes(this.field.field)
} else if (this.field.types == 'crm_business') {
return ['business_name', 'contract_id'].includes(this.field.field)
return ['business_name', 'name'].includes(this.field.field)
} else if (this.field.types == 'crm_contract') {
return ['customer_id', 'business_id', 'num', 'money', 'order_date'].includes(this.field.field)
} else if (this.field.types == 'crm_receivables') {
return ['customer_id', 'contract_id', 'number', 'plan_id'].includes(this.field.field)
return ['number', 'plan_id'].includes(this.field.field)
} else if (this.field.types == 'crm_visit') {
return ['customer_id', 'contract_id'].includes(this.field.field)
return ['customer_id', 'contract_id', 'number'].includes(this.field.field)
}
}
},

@ -112,12 +112,12 @@ export default {
},
filters: {
formatedScopeInfo(data) {
const structures = data['deptList'] || []
const structures = data['structure_ids_info'] || []
let strName = structures
.map(item => item.name)
.join('、')
const users = data['user_id_info'] || []
const users = data['user_ids_info'] || []
const userName = users
.map(item => item.realname)
.join('、')

@ -133,12 +133,12 @@ export default {
},
filters: {
formatedScopeInfo(data) {
const structures = data['deptList'] || []
const structures = data['structure_ids_info'] || []
let strName = structures
.map(item => item.name)
.join('、')
const users = data['user_id_info'] || []
const users = data['user_ids_info'] || []
const userName = users
.map(item => item.realname)
.join('、')

@ -210,14 +210,14 @@ export default {
return ''
}
} else if (column.property === 'userList') {
const structures = row['deptList'] || []
const structures = row['structure_ids_info'] || []
let strName = structures
.map(item => {
return item.name
})
.join('、')
const users = row['userList'] || []
const users = row['user_ids_info'] || []
const userName = users
.map(item => {
return item.realname

@ -143,7 +143,7 @@ export default {
this.jurisdictionCreateShow = true
} else if (type === 'delete') {
//
this.$confirm('您确定要删除吗?', '提示', {
this.$confirm('删除权限以后,使用了该权限的项目将默认变为只读权限,确认删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'

@ -141,7 +141,8 @@ import Repeat from './Repeat'
import { mapGetters } from 'vuex'
import {
canlendarSaveAPI,
canlendarUpdateAPI
canlendarUpdateAPI,
canlendarQueryTypeListAPI
} from '@/api/calendar'
export default {
components: {
@ -168,12 +169,12 @@ export default {
return []
}
},
cusCheck: {
type: Array,
default: () => {
return []
}
},
// cusCheck: {
// type: Array,
// default: () => {
// return []
// }
// },
todayDetailData: {
type: Object,
default: () => {
@ -247,7 +248,8 @@ export default {
disabledDate(time) {
return time.getTime() <= (Date.now() - 24 * 60 * 60 * 1000)
}
}
},
cusCheck: []
}
},
computed: {
@ -302,8 +304,7 @@ export default {
deep: true
}
},
mounted() {
},
mounted() {},
methods: {
/**
* 关闭
@ -323,6 +324,7 @@ export default {
* 详情
*/
getDetail() {
this.getCusCheck()
const length = Object.keys(this.todayDetailData).length
if (length !== 0) {
this.form = {
@ -380,8 +382,8 @@ export default {
defaultList.push(item)
}
})
this.colorItem = defaultList[0].color
this.form.schedule_id = defaultList[0].type_id
this.colorItem = defaultList[0] && defaultList[0].color
this.form.schedule_id = defaultList[0] && defaultList[0].type_id
this.businessRelation = {}
}
},
@ -581,6 +583,12 @@ export default {
return time.getTime() <= template - 24 * 60 * 60 * 1000
}
}
},
getCusCheck() {
canlendarQueryTypeListAPI().then(res => {
this.cusCheck = res.data.list
}
).catch()
}
}
}

@ -97,8 +97,8 @@ export default {
* 获取name value 对象展示值
*/
getNameValue(data) {
const obj = data.setting.find(item => item.value === data.value)
return obj ? obj.name : ''
const obj = data.setting.find(item => item === data.value)
return obj || ''
},
/**

@ -201,7 +201,7 @@ export default {
type: 'warning'
})
.then(() => {
const params = { contacts_id: this.id, is_relation: 1 }
const params = { contacts_id: this.id, is_relation: 0 }
params.business_id = this.selectionList
.map(item => {
return item.business_id

@ -74,19 +74,19 @@
<el-col :span="1">&nbsp;</el-col>
<el-col :span="formItem.form_type === 'datetime' || formItem.form_type === 'date' || formItem.form_type === 'map_address' ? 13 : 8">
<el-select
v-if="formItem.form_type === 'check_status'
|| formItem.form_type === 'deal_status'
v-if="(formItem.form_type === 'check_status' && getSettingValueType(formItem.setting) != 'string')
|| (formItem.form_type === 'deal_status ' && getSettingValueType(formItem.setting) != 'string' )
|| (formItem.form_type === 'select' && getSettingValueType(formItem.setting) != 'string')"
v-model="formItem.value"
placeholder="请选择筛选条件">
<el-option
v-for="item in formItem.setting"
:key="item"
:label="item"
:value="item"/>
:key="item.value"
:label="item.value"
:value="item.value"/>
</el-select>
<el-select
v-else-if="formItem.form_type === 'select' || formItem.form_type === 'checkbox'"
v-else-if="formItem.form_type === 'select' || formItem.form_type === 'checkbox' || formItem.form_type === 'check_status' || formItem.form_type === 'deal_status'"
v-model="formItem.value"
multiple
placeholder="请选择筛选条件">
@ -763,6 +763,14 @@ export default {
name: o.name,
type: o.field
})
} else if (o.form_type == 'deal_status') {
obj.push({
condition: o.condition,
value: o.value,
form_type: o.form_type,
name: o.name,
type: o.field
})
} else {
let value = []
if (typeof o.value === 'string') {

@ -310,17 +310,24 @@ export default {
if (this.isOpenExamine) {
/** 验证审批数据 */
if (isDraft) {
//
const params = this.getSubmiteParams(this.baseFields, this.fieldForm)
if (
this.examineInfo.config === 0 &&
this.examineInfo.hasOwnProperty('value') &&
this.examineInfo.value.length
) {
params['check_user_id'] = this.examineInfo.value[0].id
}
params.is_draft = 1
this.submiteParams(params)
//
this.$refs.examineInfo.validateField((result) => {
if (result) {
const params = this.getSubmiteParams(this.baseFields, this.fieldForm)
if (
this.examineInfo.config === 0 &&
this.examineInfo.hasOwnProperty('value') &&
this.examineInfo.value.length
) {
params['check_user_id'] = this.examineInfo.value[0].id
}
params['examineStatus'] = this.examineInfo.examineStatus
params.is_draft = 1
this.submiteParams(params)
} else {
this.loading = false
}
})
} else {
this.$refs.examineInfo.validateField((result) => {
if (result) {

@ -160,11 +160,11 @@ export default {
contractMoney = floatAdd(contractMoney, parseFloat(element.money || 0))
}
if (canCheckReceivedMoney) {
receivedMoney = floatAdd(receivedMoney, parseFloat(element.receivedMoney || 0))
receivedMoney = floatAdd(receivedMoney, parseFloat(element.done_money || 0))
}
if (canCheckUnReceivedMoney) {
unReceivedMoney = floatAdd(unReceivedMoney, parseFloat(element.unreceivedMoney || 0))
unReceivedMoney = floatAdd(unReceivedMoney, parseFloat(element.un_money || 0))
}
}
}

@ -377,6 +377,7 @@ export default {
this.loading = false
const resData = res.data || {}
this.detailData = resData
if (resData.dataAuth === 0) return
this.firstContactsId = this.detailData.contacts_id
//
// this.poolAuth = resData.poolAuthList || {}

@ -331,7 +331,8 @@ export default {
contacts_name: 'contacts_id',
order_user_name: 'order_user_id',
category_name: 'category_id',
contract_num: 'contract_id'
contract_num: 'contract_id',
plan_id_info: 'plan_id'
}[element.type] || element.type] = element
// delete params[element.type].type
})

@ -102,7 +102,7 @@ export default {
this.rowID = row.customer_id
this.rowType = 'customer'
this.showDview = true
} else if (column.property === 'business_name') {
} else if (column.property === 'name') {
this.rowID = row.business_id
this.rowType = 'business'
this.showDview = true

@ -134,7 +134,9 @@ export default {
contacts_name: 'contacts_id',
order_user_name: 'order_user_id',
category_name: 'category_id',
contract_num: 'contract_id'
contract_num: 'contract_id',
contract_number: 'contract_id',
plan_id_info: 'plan_id'
}[this.sortData.prop] || this.sortData.prop
params.order_type = this.sortData.order == 'ascending' ? 'asc' : 'desc'
}
@ -158,7 +160,8 @@ export default {
contacts_name: 'contacts_id',
order_user_name: 'order_user_id',
category_name: 'category_id',
contract_num: 'contract_id'
contract_num: 'contract_id',
plan_id_info: 'plan_id'
}[element.type] || element.type] = element
// delete params[element.type].type
})
@ -482,7 +485,8 @@ export default {
contacts_name: 'contacts_id',
order_user_name: 'order_user_id',
category_name: 'category_id',
contract_num: 'contract_id'
contract_num: 'contract_id',
plan_id_info: 'plan_id'
}[element.type] || element.type] = element
// delete params[element.type].type
})
@ -599,7 +603,20 @@ export default {
// id: field,
types: 'crm_' + this.crmType,
width: newWidth,
field: column.property
field: {
create_user_name: 'create_user_id',
owner_user_name: 'owner_user_id',
customer_name: 'customer_id',
type_id_info: 'type_id',
status_id_info: 'status_id',
business_name: 'business_id',
contacts_name: 'contacts_id',
order_user_name: 'order_user_id',
category_name: 'category_id',
contract_num: 'contract_id',
contract_number: 'contract_id',
plan_id_info: 'plan_id'
}[column.property] || field
}
if (this.isSeas) {
if (!this.poolId) {

@ -234,7 +234,12 @@ export default {
previewImage(list, index) {
this.$bus.emit('preview-image-bus', {
index: index,
data: list
data: list.map(item => {
if (item.file_path) {
item.url = item.file_path
}
return item
})
})
}
}

@ -295,26 +295,33 @@ export default {
if (this.isOpenExamine) {
/** 验证审批数据 */
if (isDraft) {
//
const params = this.getSubmiteParams(this.baseFields, this.fieldForm)
if (
this.examineInfo.config === 0 &&
this.examineInfo.hasOwnProperty('value') &&
this.examineInfo.value.length
) {
params['check_user_id'] = this.examineInfo.value[0].id
}
params.is_draft = 1
this.submiteParams(this.fieldForm)
} else {
//
this.$refs.examineInfo.validateField((result) => {
if (result) {
const params = this.getSubmiteParams(this.baseFields, this.fieldForm)
// if (this.examineInfo.config === 0) {
if (
this.examineInfo.config === 0 &&
this.examineInfo.hasOwnProperty('value') &&
this.examineInfo.value.length
) {
params['check_user_id'] = this.examineInfo.value[0].id
}
params['examineStatus'] = this.examineInfo.examineStatus
params.is_draft = 1
this.submiteParams(params)
} else {
this.loading = false
}
})
} else {
this.$refs.examineInfo.validateField((result) => {
if (result) {
const params = this.getSubmiteParams(this.baseFields, this.fieldForm)
params['check_user_id'] = this.examineInfo.value[0].id
// }
params['examineStatus'] = this.examineInfo.examineStatus
if (this.examineInfo.config === 0) {
params['check_user_id'] = this.examineInfo.value[0].id
}
this.submiteParams(params)
} else {
this.loading = false

@ -86,7 +86,7 @@
sortable="custom"
show-overflow-tooltip>
<template slot-scope="scope">
<template v-if="item.prop == 'dealStatus'">
<template v-if="item.prop == 'deal_status'">
<i :class="scope.row[item.prop] | dealIcon"/>
<span>{{ scope.row[item.prop] | dealName }}</span>
</template>
@ -153,11 +153,11 @@ export default {
},
filters: {
dealIcon(statu) {
return statu == 1 ? 'wk wk-success deal-suc' : 'wk wk-close deal-un'
return statu == '已成交' ? 'wk wk-success deal-suc' : 'wk wk-close deal-un'
},
dealName(statu) {
return statu == 1 ? '已成交' : '未成交'
return statu == '已成交' ? '已成交' : '未成交'
}
},
mixins: [TableMixin],

@ -290,7 +290,9 @@ export default {
contacts_name: 'contacts_id',
order_user_name: 'order_user_id',
category_name: 'category_id',
contract_num: 'contract_id'
contract_num: 'contract_id',
contract_number: 'contract_id',
plan_id_info: 'plan_id'
}[this.sortData.prop] || this.sortData.prop
params.order_type = this.sortData.order == 'ascending' ? 'asc' : 'desc'
}

@ -199,7 +199,7 @@ export default {
if (this.isImportType) {
// title content valid 1 0
const list = this.data.content.split(',') || []
const errSize = Number(list[0] || 0)
const errSize = Number(list[3] || 0)
if (errSize > 0) {
return this.data.valid === 0 ? '已失效' : '点击下载错误数据'
}
@ -332,7 +332,7 @@ export default {
const list = content.split(',') || []
const updateSize = Number(list[1] || '0')
const errSize = Number(list[0] || '0')
const errSize = Number(list[3] || '0')
return `覆盖${updateSize}条,导入成功${Number(list[2] || '0')}条,导入失败${errSize}条。`
}
}

@ -1,286 +1,301 @@
<template>
<div class="sidebar-container">
<div
:style="{ 'padding-top': createButtonTitle != '' ? '40px' : '25px', 'background-color':variables.menuBg }"
class="create-button-container">
<el-popover
v-if="createButtonTitle != ''"
:offset="addOffset"
:visible-arrow="false"
:disabled="!$slots.add"
placement="right"
popper-class="no-padding-popover"
trigger="hover">
<slot name="add" />
<div
slot="reference"
class="create-button"
@click="quicklyCreate">
<div
v-show="!buttonCollapse"
class="button-name">{{ createButtonTitle }}</div>
<div
v-show="!buttonCollapse"
class="button-line" />
<i
:class="createButtonIcon"
class="button-mark" />
</div>
</el-popover>
</div>
<el-scrollbar
:style="{'border-right-color': variables.menuBg, 'padding-top': createButtonTitle != '' ? '90px' : '40px'}"
wrap-class="scrollbar-wrapper">
<el-menu
:default-active="activeMenu"
:collapse="collapse"
:background-color="variables.menuBg"
:text-color="variables.menuText"
:active-text-color="variables.menuActiveText"
:style="{ paddingBottom: paddingBottom}"
mode="vertical"
class="el-menu-vertical"
@select="handleSelect">
<sidebar-item
v-for="(route, index) in items"
:key="`${route.path}${index}`"
:item="route"
:collapse="collapse"
:base-path="route.path"
:active-menu="activeMenu" />
</el-menu>
</el-scrollbar>
<slot name="bottom"/>
<div
:style="{ 'background-color':variables.menuBg }"
class="sidebar-bottom">
<div class="sidebar-container">
<img
:style="{ 'right': buttonCollapse ? '3px' : '0' }"
:class="{ 'is-close': collapse }"
class="collapse-button"
src="@/assets/img/collapse_white.png"
alt=""
@click="toggleSideBarClick">
</div>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import SidebarItem from './SidebarItem'
import variables from './variables.scss'
export default {
components: { SidebarItem },
props: {
items: {
type: Array,
default: () => {
return []
}
},
addOffset: {
type: Number,
default: 70
},
createButtonTitle: {
type: String,
default: ''
},
createButtonIcon: {
type: String,
default: 'el-icon-plus'
},
//
paddingBottom: {
type: String,
default: '48px'
}
},
data() {
return {
buttonCollapse: false
}
},
computed: {
...mapGetters(['collapse']),
activeMenu() {
const route = this.$route
const { meta, path, params } = route
let title = this.WKConfig.companyName
if (meta.title) {
title += ' - ' + meta.title
} else if (params && params.title) {
title += ' - ' + params.title
}
document.title = title
// if set path, the sidebar will highlight the path you set
if (meta.activeMenu) {
return meta.activeMenu
}
return path
},
variables() {
return variables
}
},
watch: {
collapse: function(val) {
if (val) {
this.buttonCollapse = val
} else {
setTimeout(() => {
this.buttonCollapse = val
}, 300)
}
}
},
mounted() {
this.buttonCollapse = this.collapse
},
methods: {
toggleSideBarClick() {
this.$store.commit('SET_COLLAPSE', !this.collapse)
},
//
quicklyCreate() {
this.$emit('quicklyCreate')
},
handleSelect(key, keyPath) {
this.$emit('select', key, keyPath)
}
}
}
</script>
<style lang="scss" scoped>
@import './variables.scss';
.sidebar-container {
transition: width 0.28s;
width: auto;
height: 100%;
position: relative;
background-color: $menuBg;
overflow: auto;
flex-shrink: 0;
.scrollbar-wrapper {
overflow-x: hidden !important;
}
.el-scrollbar {
height: 100%;
}
a {
display: inline-block;
width: 100%;
overflow: hidden;
}
}
.el-menu-vertical:not(.el-menu--collapse) {
width: 200px;
min-height: 400px;
}
.el-menu-vertical {
height: 100%;
overflow-y: auto;
overflow-y: overlay;
overflow-x: hidden;
padding-bottom: 48px;
border-right-color: $menuBg;
}
.el-menu-vertical.el-menu--collapse {
/deep/ .el-submenu__icon-arrow {
display: none;
}
/deep/ .el-submenu__title {
span {
display: none;
}
}
}
//
.create-button-container {
padding: 15px 14px;
color: white;
font-size: 14px;
cursor: pointer;
position: absolute;
top: 0;
left: 0;
right: 0;
z-index: 2;
.create-button {
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
padding: 0 15px;
height: 36px;
border-radius: $xr-border-radius-base;
background-color: rgba($color: #fff, $alpha: 0.1);
color: #999;
.button-name {
flex: 1;
}
.button-line {
height: 10px;
background-color: white;
width: 1px;
margin: 0 20px 0 10px;
opacity: 0.3;
}
.button-mark {
width: 12px;
}
}
.create-button:hover {
color: white !important;
background-color: $xr-color-primary !important;
}
}
//
.sidebar-bottom {
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 48px;
.sidebar-container {
position: relative;
height: 48px;
}
}
.collapse-button {
position: absolute;
top: 0;
padding: 18px 20px;
cursor: pointer;
}
.collapse-button.is-close {
transform: rotate(180deg);
}
</style>
<template>
<div class="sidebar-container">
<div
:style="{ 'padding-top': createButtonTitle != '' ? '40px' : '25px', 'background-color':variables.menuBg }"
class="create-button-container">
<el-popover
v-if="createButtonTitle != ''"
:offset="addOffset"
:visible-arrow="false"
:disabled="!$slots.add"
placement="right"
popper-class="no-padding-popover"
trigger="hover">
<slot name="add" />
<div
slot="reference"
class="create-button"
@click="quicklyCreate">
<div
v-show="!buttonCollapse"
class="button-name">{{ createButtonTitle }}</div>
<div
v-show="!buttonCollapse"
class="button-line" />
<i
:class="createButtonIcon"
class="button-mark" />
</div>
</el-popover>
</div>
<el-scrollbar
:style="{'border-right-color': variables.menuBg, 'padding-top': createButtonTitle != '' ? '90px' : '40px'}"
wrap-class="scrollbar-wrapper">
<el-menu
:default-active="activeMenu"
:collapse="collapse"
:background-color="variables.menuBg"
:text-color="variables.menuText"
:active-text-color="variables.menuActiveText"
:style="{ paddingBottom: paddingBottom}"
mode="vertical"
class="el-menu-vertical"
@select="handleSelect">
<sidebar-item
v-for="(route, index) in items"
:key="`${route.path}${index}`"
:item="route"
:collapse="collapse"
:base-path="route.path"
:active-menu="activeMenu" />
</el-menu>
</el-scrollbar>
<slot name="bottom"/>
<div
:style="{ 'background-color':variables.menuBg }"
class="sidebar-bottom">
<div class="sidebar-bottom-content">
<div v-if="!collapse" class="copyright">
<img src="/favicon.ico" width="20px" >
<span>Power by 悟空</span>
</div>
<img
:style="{ 'right': buttonCollapse ? '3px' : '0' }"
:class="{ 'is-close': collapse }"
class="collapse-button"
src="@/assets/img/collapse_white.png"
alt=""
@click="toggleSideBarClick">
</div>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import SidebarItem from './SidebarItem'
import variables from './variables.scss'
export default {
components: { SidebarItem },
props: {
items: {
type: Array,
default: () => {
return []
}
},
addOffset: {
type: Number,
default: 70
},
createButtonTitle: {
type: String,
default: ''
},
createButtonIcon: {
type: String,
default: 'el-icon-plus'
},
//
paddingBottom: {
type: String,
default: '48px'
}
},
data() {
return {
buttonCollapse: false
}
},
computed: {
...mapGetters(['collapse']),
activeMenu() {
const route = this.$route
const { meta, path, params } = route
let title = this.WKConfig.companyName
if (meta.title) {
title += ' - ' + meta.title
} else if (params && params.title) {
title += ' - ' + params.title
}
document.title = title
// if set path, the sidebar will highlight the path you set
if (meta.activeMenu) {
return meta.activeMenu
}
return path
},
variables() {
return variables
}
},
watch: {
collapse: function(val) {
if (val) {
this.buttonCollapse = val
} else {
setTimeout(() => {
this.buttonCollapse = val
}, 300)
}
}
},
mounted() {
this.buttonCollapse = this.collapse
},
methods: {
toggleSideBarClick() {
this.$store.commit('SET_COLLAPSE', !this.collapse)
},
//
quicklyCreate() {
this.$emit('quicklyCreate')
},
handleSelect(key, keyPath) {
this.$emit('select', key, keyPath)
}
}
}
</script>
<style lang="scss" scoped>
@import './variables.scss';
.sidebar-container {
transition: width 0.28s;
width: auto;
height: 100%;
position: relative;
background-color: $menuBg;
overflow: auto;
flex-shrink: 0;
.scrollbar-wrapper {
overflow-x: hidden !important;
}
.el-scrollbar {
height: 100%;
}
a {
display: inline-block;
width: 100%;
overflow: hidden;
}
}
.el-menu-vertical:not(.el-menu--collapse) {
width: 200px;
min-height: 400px;
}
.el-menu-vertical {
height: 100%;
overflow-y: auto;
overflow-y: overlay;
overflow-x: hidden;
padding-bottom: 48px;
border-right-color: $menuBg;
}
.el-menu-vertical.el-menu--collapse {
/deep/ .el-submenu__icon-arrow {
display: none;
}
/deep/ .el-submenu__title {
span {
display: none;
}
}
}
//
.create-button-container {
padding: 15px 14px;
color: white;
font-size: 14px;
cursor: pointer;
position: absolute;
top: 0;
left: 0;
right: 0;
z-index: 2;
.create-button {
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
padding: 0 15px;
height: 36px;
border-radius: $xr-border-radius-base;
background-color: rgba($color: #fff, $alpha: 0.1);
color: #999;
.button-name {
flex: 1;
}
.button-line {
height: 10px;
background-color: white;
width: 1px;
margin: 0 20px 0 10px;
opacity: 0.3;
}
.button-mark {
width: 12px;
}
}
.create-button:hover {
color: white !important;
background-color: $xr-color-primary !important;
}
}
//
.sidebar-bottom {
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 48px;
&-content {
position: relative;
height: 48px;
}
.copyright {
color: white;
font-size: 12px;
height: 100%;
padding-left: 20px;
line-height: 3.5;
img,span {
vertical-align: middle;
}
}
}
.collapse-button {
position: absolute;
top: 0;
padding: 18px 20px;
cursor: pointer;
}
.collapse-button.is-close {
transform: rotate(180deg);
}
</style>

@ -20,10 +20,10 @@
<el-input
ref="code"
v-model.trim="form.code"
:maxlength="20"
:class="{error: !validateRes.code}"
placeholder="请输入您的序列号"
type="code"
type="textarea"
rows="5"
@focus="focusKey = 'code'"
@keyup.enter.native="debouncedHandleLogin"
@blur="checkForm"/>
@ -91,7 +91,7 @@ import { Loading } from 'element-ui'
import Mixins from './Mixins'
import { debounce } from 'throttle-debounce'
import md5 from 'js-md5'
// import md5 from 'js-md5'
export default {
name: 'LoginByWelcome',
@ -119,7 +119,7 @@ export default {
}
return false
}
/*
const validateCode = () => {
let num = ''
if (this.form.username && this.form.username.length > 6) {
@ -132,14 +132,15 @@ export default {
}
return num == this.form.code
}
*/
const temp = {
username: [
{ required: true, msg: '手机号不能为空' },
{ reg: /^1[1-9]\d{9}$/, msg: '请输入正确的手机号码' }
],
code: [
{ required: true, msg: '序列号不能为空' },
{ validator: validateCode, msg: '请输入正确的序列号' }
{ required: true, msg: '序列号不能为空' }/*,
{ validator: validateCode, msg: '请输入正确的序列号' }*/
],
password: [
{ required: true, msg: '初始化密码不能为空' },

@ -326,7 +326,7 @@ export default {
if (this.coverImg.custom) {
params.is_system_cover = 0
params.batchId = this.batchId
// params.batchId = this.batchId
params.cover_url = this.coverImg.url
} else {
params.is_system_cover = 1
@ -444,7 +444,7 @@ export default {
.then(res => {
this.projectRoleList = res.data || []
if (this.projectRoleList.length) {
this.ownerRole = this.projectRoleList[0].id
this.ownerRole = this.ownerRole || this.projectRoleList[0].id
}
this.loading = false
})

@ -150,10 +150,10 @@ export default {
getList() {
const params = { work_id: this.workId }
if (this.conditionData) {
params.mainUserId = this.conditionData.userIds
params.stopTimeType = this.conditionData.timeId
params.labelId = this.conditionData.tagIds
params.taskName = this.conditionData.search
params.main_user_id = this.conditionData.userIds
params.stop_time_type = this.conditionData.timeId
params.lable_id = this.conditionData.tagIds
params.search = this.conditionData.search
}
this.loading = true

@ -68,7 +68,7 @@
class="wukong wukong-subproject"/>
<span
slot="title"
class="title">{{ item.name }}</span>
class="title">{{ item.work_name }}</span>
<task-cell
v-for="(taskItem, taskIndex) in item.list"
:key="taskIndex"

@ -149,7 +149,7 @@ export default {
}
if (this.xhUserData.length) {
if (this.xhUserData[0].userId != this.subData.mainUser.userId) {
if (this.xhUserData[0].id != this.subData.mainUser.id) {
return true
}
}

@ -124,6 +124,7 @@ export default {
props: {},
data() {
return {
first: true,
tabsSelectValue: '0',
//
taskType: '',
@ -262,6 +263,7 @@ export default {
},
taskFilterSave(dueDate, priority, showDone, users) {
this.first = false
this.priority = priority
this.dueDate = dueDate
this.showDone = showDone
@ -280,7 +282,7 @@ export default {
type: this.tabsSelectValue,
priority: this.priority,
dueDate: this.dueDate,
status: this.showDone ? '' : '1',
status: this.first ? '' : this.showDone ? '5' : '1',
main_user_id: this.userList && this.userList.length ? this.userList[0].id : ''
}
@ -358,7 +360,7 @@ export default {
type: this.tabsSelectValue,
priority: this.priority,
dueDate: this.dueDate,
status: this.showDone ? '' : '1'
status: this.first ? '' : this.showDone ? '5' : '1'
}
if (this.taskType != 1) {
@ -395,7 +397,7 @@ export default {
type: this.tabsSelectValue,
priority: this.priority,
dueDate: this.dueDate,
status: this.showDone ? '' : '1'
status: this.first ? '' : this.showDone ? '5' : '1'
}
if (this.taskType != 1) {

@ -51,7 +51,7 @@
<picture-list-view
v-if="detail.imgList.length !== 0"
:list="detail.img" />
:list="detail.imgList" />
<flexbox v-if="detail.sendUserList && detail.sendUserList.length" class="send-list">
<span class="send-list__label">发送给</span>
@ -74,11 +74,11 @@
<div class="section__hd">
<i class="wukong wukong-file" />
<span>附件</span>
<span>({{ detail.file.length }})</span>
<span>({{ detail.fileList.length }})</span>
</div>
<div class="section__bd">
<file-cell
v-for="(file, fileIndex) in detail.file"
v-for="(file, fileIndex) in detail.fileList"
:key="fileIndex"
:data="file"
:list="detail.file"
@ -174,7 +174,7 @@
import {
journalQueryByIdAPI,
journalQueryRecordCountAPI,
journalQueryBulletinByTypeAPI } from '@/api/oa/journal'
journalQueryBulletinByTypeAPI, journalQueryActivityCountAPI } from '@/api/oa/journal'
import {
queryCommentListAPI,
setjournalCommentAPI
@ -268,7 +268,7 @@ export default {
placeholder: '',
crmType: '',
request: null,
recordRequest: journalQueryBulletinByTypeAPI,
recordRequest: journalQueryRecordCountAPI,
params: null,
paging: true,
sortable: false
@ -395,15 +395,15 @@ export default {
this.fieldReportList = [
{
label: '模块',
prop: 'crmType',
prop: 'types',
width: 300
},
{
label: '新增跟进记录数',
prop: 'count'
prop: 'dataCount'
}
]
this.reportData.request = journalQueryRecordCountAPI
this.reportData.request = journalQueryActivityCountAPI
this.reportData.paging = false
this.reportData.sortable = false
} else {

Loading…
Cancel
Save