Browse Source

Merge branch 'v3'

# Conflicts:
#	src/api/knowledge/types.ts
#	src/views/knowledge/knowledge/components/KnowledgeContent.vue
#	src/views/knowledge/knowledge/components/Navili.vue
#	src/views/knowledge/knowledge/components/archivestype.vue
#	src/views/knowledge/knowledge/index.vue
#	src/views/knowledge/news/index.vue
liwenxuan_v2
超级管理员 2 years ago
parent
commit
e6f43d990c
  1. 20
      src/api/knowledge/types.ts
  2. 1
      src/components/workflow/dialog/employeesRoleDialog.vue
  3. 1
      src/components/workflow/dialog/roleDialog.vue
  4. 234
      src/components/workflow/drwer/conditionDrawer.vue
  5. 4
      src/components/workflow/nodeWrap.vue
  6. 7
      src/components/workflow/selectBoxs.vue
  7. 21
      src/store/modules/knowledge.ts
  8. 20
      src/store/workflow/index.js
  9. 10
      src/utils/workflow/const.ts
  10. 97
      src/utils/workflow/index.ts
  11. 4
      src/views/knowledge/knowledge/components/KnowledgeContent.vue
  12. 19
      src/views/knowledge/knowledge/components/Navili.vue
  13. 118
      src/views/knowledge/knowledge/components/archivestype.vue
  14. 174
      src/views/knowledge/knowledge/index.vue
  15. 360
      src/views/knowledge/news/index.vue
  16. 47
      src/views/sysworkflow/flow/flowDrawingBoard.vue

20
src/api/knowledge/types.ts

@ -24,7 +24,12 @@ export interface UserDetail {
//导航栏查询
export interface NaviQuery {
atParentId: string;
<<<<<<< HEAD
=======
userkey: String,
usertoken: String,
>>>>>>> v3
}
//导航栏信息
export interface Navi{
@ -42,7 +47,12 @@ export interface Navi{
atUid:string;
//排序
atSort:string;
<<<<<<< HEAD
=======
//该导航栏中有无card
hasCard:Boolean;
>>>>>>> v3
}
export type cardList = PageResult<Graphicform[]>
//卡片
@ -156,4 +166,14 @@ interface PageResultJava<T> {
//当前页
pageNum:number;
<<<<<<< HEAD
}
=======
}
//标题下有无内容
export interface ShowTitle {
atIdAndGParentSun: string;//导航栏id
hasCard:Boolean;//是否展示
}
>>>>>>> v3

1
src/components/workflow/dialog/employeesRoleDialog.vue

@ -46,6 +46,7 @@ let list = computed(()=> {
type: 'role',
not: false,
data: roles.value,
isDepartment: props.isDepartment,
isActive: (item)=> $func.toggleClass(checkedRoleList.value, item, 'roleId'),
change: (item)=> $func.toChecked(checkedRoleList.value, item, 'roleId')
}]

1
src/components/workflow/dialog/roleDialog.vue

@ -28,6 +28,7 @@ let list = computed(() => {
return [{
type: 'role',
not: true,
isDepartment:false,
data: roles.value,
isActive: (item) => $func.toggleClass(checkedRoleList.value, item, 'roleId'),
change: (item) => {

234
src/components/workflow/drwer/conditionDrawer.vue

@ -23,7 +23,7 @@ let props = defineProps({
},
});
let copyerVisible = ref(false)
const flowFactorList = ref<any[]>([]);
let conditionVisible = ref(false)
@ -56,6 +56,11 @@ watch(conditionsConfig1, (val:any) => {
conditionConfig.value = val.priorityLevel
? conditionsConfig.value.conditionNodes[val.priorityLevel - 1]
: { nodeUserList: [], conditionList: [] }
if(conditionConfig.value.conditionList){
// tableList.value = conditionsConfig.conditionList
tableList.value = conditionConfig.value.conditionList
}
})
watch(visible,(val:any)=>{
@ -80,7 +85,7 @@ watch(visible,(val:any)=>{
}
gainNodeFactor(sendData)
.then(({data}) =>{
console.log("......>",data)
// console.log("......>",data)
if(data.length > 0){
data.forEach(item=>{
flowFactorList.value.push({
@ -103,11 +108,6 @@ watch(visible,(val:any)=>{
})
const closeDrawer = (val?:any) => {
initFactor()
setCondition(false)
@ -125,11 +125,13 @@ const pickFactor = (val:any) => {
tableList.value.forEach(item=>{
tableKeyAry.push(item.factorid)
})
let filefName = 0
let types = 0
let options = new Array
let isCheckbox = false
flowFactorList.value.forEach(item=>{
if(item.keyid == val){
filefName=item.name
item.isok=true
types = item.type
options = item.options
@ -149,15 +151,22 @@ const pickFactor = (val:any) => {
item.type = types
item.options = options
item.isCheckbox = isCheckbox
item.name=filefName
}
})
console.log("tableList--->",tableList.value,val,types);
// console.log("tableList--->",tableList.value,val,types);
}
//
const addFactorCondition = () => {
let currLent = tableList.value.length
let tableKeyAry = new Array
if(currLent > 0){
tableList.value.forEach(item=>{
tableKeyAry.push(item.factorid)
})
}
if(currLent < flowFactorList.value.length){
tableList.value.push({id:currLent+1,factorid:"",type:0})
tableList.value.push({id:currLent+1,name:"",factorid:"",type:0,isok:false,isCheckbox:true,options:[],answers:[],customFields:[]})
if(currLent+1 >= flowFactorList.value.length){
maxFactor.value = true
}else{
@ -172,6 +181,15 @@ const addFactorCondition = () => {
isDelField.value = false
}
if(tableKeyAry.length>0){
flowFactorList.value.forEach(item=>{
if(tableKeyAry.includes(item.keyid)){
item.isok=true
}else{
item.isok=false
}
})
}
}
const initFactor = () => {
maxFactor.value = false
@ -210,23 +228,122 @@ const delTiaoJian = (val:any) => {
}
}
const saveCondition = () => {
let isError = false
if(tableList.value.length>0){
for (var i = 0; i < tableList.value.length; i++) {
var {name,type,options,nodeUserList,answers,isCheckbox,customFields} = tableList.value[i]
console.log("conditionConfig.conditionList--1->",name);
console.log("conditionConfig.conditionList--2->",type);
console.log("conditionConfig.conditionList--3->",options);
console.log("conditionConfig.conditionList--4->",nodeUserList);
console.log("conditionConfig.conditionList--5->",answers);
console.log("conditionConfig.conditionList--6->",isCheckbox);
console.log("conditionConfig.conditionList--7->",customFields);
switch(type){
case 1:
if(nodeUserList){
if(nodeUserList.length <= 0){
isError = true
}
}else{
isError = true
}
conditionConfig.conditionList = tableList.value
console.log("conditionConfig.conditionList--->",conditionConfig.conditionList,tableList);
// var a = conditionsConfig.value.conditionNodes.splice(PriorityLevel.value - 1, 1)//
// conditionsConfig.value.conditionNodes.splice(conditionConfig.value.priorityLevel - 1, 0, a[0])//
// conditionsConfig.value.conditionNodes.map((item, index) => {
// item.priorityLevel = index + 1
// });
// for (var i = 0; i < conditionsConfig.value.conditionNodes.length; i++) {
// conditionsConfig.value.conditionNodes[i].error = $func.conditionStr(conditionsConfig.value, i) == "" && i != conditionsConfig.value.conditionNodes.length - 1
// }
// setConditionsConfig({
// value: conditionsConfig.value,
// flag: true,
// id: conditionsConfig1.value.id
// })
break;
case 2:
if(customFields.length <= 0){
isError = true
}else{
customFields.forEach((item:any)=>{
if(item.wordfield == "" || item.wordfield == null){
isError = true
}
})
}
break;
case 3:
if(answers.length > 0){
if(!Array.isArray(answers)){
tableList.value[i].answers=[answers]
}
}else{
isError = true
}
break;
default:
isError = true
}
}
}
if(isError){
ElNotification({
title: '温馨提示!',
message: '判断条件未赋值!',
type: 'error',
})
}else{
conditionConfig.value.conditionList = tableList.value
// console.log("conditionConfig.conditionList--1->",conditionConfig.value);
// console.log("conditionConfig.conditionList--2->",conditionConfig.value.conditionList);
// console.log("conditionConfig.conditionList--3->",conditionsConfig1);
var a = conditionsConfig.value.conditionNodes.splice(PriorityLevel.value - 1, 1)//
conditionsConfig.value.conditionNodes.splice(conditionConfig.value.priorityLevel - 1, 0, a[0])//
conditionsConfig.value.conditionNodes.map((item, index) => {
item.priorityLevel = index + 1
});
for (var i = 0; i < conditionsConfig.value.conditionNodes.length; i++) {
conditionsConfig.value.conditionNodes[i].error = $func.conditionStr(conditionsConfig.value, i) == "请设置条件" && i != conditionsConfig.value.conditionNodes.length - 1
}
setConditionsConfig({
value: conditionsConfig.value,
flag: true,
id: conditionsConfig1.value.id
})
closeDrawer()
}
}
//
const addOrEditUser = (val:any) => {
copyerVisible.value = true;
checkedList.value = val
}
//
const sureCopyer = (data) => {
// console.log("",data)
// copyerConfig.value.nodeUserList = data;
copyerVisible.value = false;
if(tableList.value.length > 0){
tableList.value.forEach(item=>{
if(item.factorid == "applicant" && item.type == 1){
item.nodeUserList = data
}
})
}
}
//
const addCustomFields = () =>{
if(tableList.value.length > 0){
tableList.value.forEach(item=>{
if(item.factorid == "customFields" && item.type == 2){
item.customFields.push({
wordfield:"",
optType:"1",
leftval:""
})
}
})
}
console.log("添加自定义条件",tableList)
}
//
const myoptChhange = (val:any) =>{
console.log("添加自定义条件",val)
}
//
const delCuresTiaoJian = (val:any,old:any) => {
if(old.length>0){
old.splice(val,1)
}
}
</script>
<template>
@ -259,19 +376,19 @@ const saveCondition = () => {
</el-col>
<el-col :span="16">
<template v-if="itemw.type==1">
<el-button type="primary" style="margin-bottom:0px" >添加/修改成员</el-button>
<el-button type="primary" style="margin-bottom:0px" @click="addOrEditUser(itemw.nodeUserList)">添加/修改成员</el-button>
<p class="selected_list">
<el-tag closable type="info" effect="plain" class="tag_us">演员1</el-tag><el-tag closable type="info" effect="plain" class="tag_us">1</el-tag><el-tag closable type="info" effect="plain" class="tag_us">1</el-tag><el-tag closable type="info" effect="plain" class="tag_us">1</el-tag><el-tag closable type="info" effect="plain" class="tag_us">1</el-tag><el-tag closable type="info" effect="plain" class="tag_us">1</el-tag><el-tag closable type="info" effect="plain" class="tag_us">1</el-tag><el-tag closable type="info" effect="plain" class="tag_us">1</el-tag><el-tag closable type="info" effect="plain" class="tag_us">1</el-tag><el-tag closable type="info" effect="plain" class="tag_us">1</el-tag>
<el-tag v-for="(item_us,index_us) in itemw.nodeUserList" :key="index_us" closable type="info" effect="plain" class="tag_us" @close="$func.removeEle(itemw.nodeUserList,item_us,'targetId')">{{item_us.name}}</el-tag>
</p>
</template>
<template v-if="itemw.type==2">
<el-row v-for="(itemCustomFields,index) in itemw" :key="index" :gutter="5">
<el-col :span="6">
<el-row v-for="(itemCustomFields,index) in itemw.customFields" :key="index" style="margin-bottom:10px" :gutter="5">
<el-col :span="7">
<el-input v-model="itemCustomFields.wordfield" placeholder="判断关键字"></el-input>
</el-col>
<el-col :span="itemCustomFields.optType != 6?7:16">
<el-select v-model="itemCustomFields.optType" class="selectInfo" @change="myoptChhange($event,itemCustomFields)">
<el-select v-model="itemCustomFields.optType" class="selectInfo" style="width:100%">
<el-option
v-for="itemSel in optTypes"
:key="itemSel.value"
@ -282,10 +399,46 @@ const saveCondition = () => {
</el-select>
</el-col>
<el-col v-if="itemCustomFields.optType != 6" :span="9">
<el-input v-model="itemCustomFields.leftval" placeholder="请输入值"></el-input>
<el-input v-model="itemCustomFields.leftval" type="text" placeholder="请输入" />
</el-col>
<el-col :span="1">
<el-icon color="#E6A23C" size="20px" class="delIcon" @click="delCuresTiaoJian(index,itemw.customFields)"><CircleClose /></el-icon>
</el-col>
<el-col v-if="itemCustomFields.optType == 6" :span="24">
<el-row :gutter="5" style="margin-top:10px">
<el-col :span="5">
<el-input v-model="itemCustomFields.leftval" type="text" placeholder="请输入" />
</el-col>
<el-col :span="5">
<el-select v-model="itemCustomFields.leftoptType">
<el-option
v-for="itemSel in opt1s"
:key="itemSel.value"
:label="itemSel.label"
:value="itemSel.value"
/>
</el-select>
</el-col>
<el-col :span="4" class="cuiZhi_junZhong">
<span>{{ itemCustomFields.wordfield }}</span>
</el-col>
<el-col :span="5">
<el-select v-model="itemCustomFields.rightoptType">
<el-option
v-for="itemSel in opt1s"
:key="itemSel.value"
:label="itemSel.label"
:value="itemSel.value"
/>
</el-select>
</el-col>
<el-col :span="5">
<el-input v-model="itemCustomFields.rightval" type="text" placeholder="请输入" />
</el-col>
</el-row>
</el-col>
</el-row>
<el-button type="warning" style="margin-top:10px" >添加条件</el-button>
<el-button type="warning" style="margin-top:0px" @click="addCustomFields">添加条件</el-button>
</template>
<template v-if="itemw.type==3">
<el-radio-group v-if="!itemw.isCheckbox" v-model="itemw.answers">
@ -296,7 +449,7 @@ const saveCondition = () => {
</el-checkbox-group>
</template>
</el-col>
<el-col :span="1"><el-icon v-if="isDelField" color="#FF0000" size="20px" class="delIcon" @click="delTiaoJian(itemw)"><CircleClose /></el-icon></el-col>
<el-col :span="1"><el-icon color="#FF0000" size="20px" class="delIcon" @click="delTiaoJian(itemw)"><CircleClose /></el-icon></el-col>
</el-row>
@ -308,6 +461,15 @@ const saveCondition = () => {
<el-button @click="closeDrawer"> </el-button>
</div>
</div>
<employees-role-dialog
v-model:visible="copyerVisible"
:data="checkedList"
:is-department="true"
@change="sureCopyer"
/>
</el-drawer>
</template>
<style lang="less">
@ -444,4 +606,12 @@ const saveCondition = () => {
margin:5px 5px 4px 0px;
}
}
.cuiZhi_junZhong {
text-align:center;
display: flex;
justify-content: space-between;
align-items: center;
margin: auto;
overflow:hidden;
}
</style>

4
src/components/workflow/nodeWrap.vue

@ -232,7 +232,7 @@ onMounted(() => {
<div class="content" @click="setPerson">
<div class="text">
<span v-if="!showText" class="placeholder">请选择{{defaultText}}</span>
{{showText}}{{ nodeConfig.nodeNumber }}
{{showText}}
</div>
<i class="anticon anticon-right arrow"></i>
</div>
@ -270,7 +270,7 @@ onMounted(() => {
<i class="anticon anticon-close close" @click="delTerm(index)"></i>
</div>
<div v-if="index != nodeConfig.conditionNodes.length - 1" class="sort-right" @click="arrTransfer(index)">&gt;</div>
<div class="content" @click="setPerson(item.priorityLevel)">{{ $func.conditionStr(nodeConfig, index) }}{{ item.nodeNumber }}</div>
<div class="content" @click="setPerson(item.priorityLevel)">{{ $func.conditionStr(nodeConfig, index) }}</div>
<div v-if="isTried && item.error" class="error_tip" >
<i class="anticon anticon-exclamation-circle"></i>
</div>

7
src/components/workflow/selectBoxs.vue

@ -18,8 +18,11 @@ defineProps({
<template v-if="elem.type === 'role'">
<li v-for="item in elem.data" :key="item.roleId" class="check_box" :class="{not: !elem.isDepartment}">
<div :class="elem.isActive(item) && 'active'">
<a :title="item.departmentNames" @click="elem.change(item)">
<a v-if="elem.isDepartment" :title="item.departmentNames" @click="elem.change(item)">
<span></span><img src="@/assets/images/icon_file.png">{{item.departmentName}}
<img src="@/assets/images/icon_role.png">{{item.roleName}}
</a>
<a v-else :title="item.departmentNames" @click="elem.change(item)">
<img src="@/assets/images/icon_role.png">{{item.roleName}}
</a>
</div>

21
src/store/modules/knowledge.ts

@ -0,0 +1,21 @@
import { defineStore } from 'pinia'
import { ShowTitle } from '@/api/knowledge/types';
// 第一个参数是应用程序中 store 的唯一 id
export const useKnowledgeStore = defineStore('knowledge', {
state: () => {
//const knowledgeTitlesShow = ref<Array<ShowTitle>>([]);
const knowledgeTitlesShow = ref<ShowTitle[]>([]);
return {knowledgeTitlesShow};
},
getters: {
// 自动将返回类型推断为数字
getArray(state) {
return state
},
},
})

20
src/store/workflow/index.ts → src/store/workflow/index.js

@ -18,34 +18,34 @@ export const useStore = defineStore('store', {
},
}),
actions: {
setTableId(payload:any) {
setTableId(payload) {
this.tableId = payload
},
setIsTried(payload:any) {
setIsTried(payload) {
this.isTried = payload
},
setPromoter(payload:any) {
setPromoter(payload) {
this.promoterDrawer = payload
},
setFlowPermission(payload:any) {
setFlowPermission(payload) {
this.flowPermission1 = payload
},
setApprover(payload:any) {
setApprover(payload) {
this.approverDrawer = payload
},
setApproverConfig(payload:any) {
setApproverConfig(payload) {
this.approverConfig1 = payload
},
setCopyer(payload:any) {
setCopyer(payload) {
this.copyerDrawer = payload
},
setCopyerConfig(payload:any) {
setCopyerConfig(payload) {
this.copyerConfig1 = payload
},
setCondition(payload:any) {
setCondition(payload) {
this.conditionDrawer = payload
},
setConditionsConfig(payload:any) {
setConditionsConfig(payload) {
this.conditionsConfig1 = payload
},
}

10
src/utils/workflow/const.ts

@ -33,14 +33,16 @@ export let optTypes = [
{value: '4', label: '等于'},
{value: '5', label: '大于等于'},
{value: '6', label: '介于两个数之间'},
{value: '7', label: '包含'},
{value: '8', label: '不包含'},
]
export let opt1s = [
{value: '<', label: '<'},
{value: '', label: '≤'},
{value: '1', label: '<'},
{value: '3', label: '≤'},
]
//工作流判断条件(类型:1、申请人;2、自定义字段;3、单选;4、多选;5、开关)
export let flowFactor = [
{id:1,name:"申请人",keyid:"applicant",type:1,isok:false,isCheckbox:true,options:[]},
{id:2,name:"自定义字段",keyid:"customFields",type:2,isok:false,isCheckbox:false,options:[]}
{id:1,name:"申请人",keyid:"applicant",type:1,isok:false,isCheckbox:true,options:[],customFields:[]},
{id:2,name:"自定义字段",keyid:"customFields",type:2,isok:false,isCheckbox:false,options:[],customFields:[]}
]

97
src/utils/workflow/index.ts

@ -139,32 +139,103 @@ All.prototype = {
},
conditionStr(nodeConfig:any, index:any) {
var { conditionList, nodeUserList } = nodeConfig.conditionNodes[index];
// console.log("判断调教--1->",nodeConfig)
// console.log("判断调教--2->",index)
// console.log("判断调教--3->",conditionList)
// console.log("判断调教--4->",nodeUserList)
// console.log("判断调教--5->",nodeConfig.conditionNodes[index])
// if(conditionList[0].nodeUserList){
// console.log("判断调教--6->",conditionList[0].nodeUserList)
// }
// conditionList.forEach((ites:any)=>{
// console.log("判断调教--6->",nodeConfig.conditionNodes.length - 1)
// })
// console.log("判断调教--7->",nodeConfig.conditionNodes[0].conditionList)
// console.log("判断调教--8->",(index == nodeConfig.conditionNodes.length - 1) && nodeConfig.conditionNodes[0].conditionList.length != 0)
if (conditionList.length == 0) {
return (index == nodeConfig.conditionNodes.length - 1) && nodeConfig.conditionNodes[0].conditionList.length != 0 ? '其他条件进入此流程' : '请设置条件'
return (index == nodeConfig.conditionNodes.length - 1) && nodeConfig.conditionNodes[0].conditionList.length != 0 ? '未满足其他条件分支的情况,将使用此流程!' : '请设置条件'
} else {
let str = ""
for (var i = 0; i < conditionList.length; i++) {
var { columnId, columnType, showType, showName, optType, zdy1, opt1, zdy2, opt2, fixedDownBoxValue } = conditionList[i];
if (columnId == 0) {
if (nodeUserList.length != 0) {
// console.log("判断调教分支形同--6->",conditionList[i])
var {name,type,options,nodeUserList,answers,isCheckbox,customFields} = conditionList[i]
switch(type){
case 1:
if(nodeUserList.length > 0){
str += '发起人属于:'
str += nodeUserList.map((item: { name: any; }) => { return item.name }).join("或") + " 并且 "
}
break;
case 2:
if(customFields.length > 0){
customFields.forEach((item:any) =>{
if (item.optType != 6 && item.leftval) {
var optTypeStr = ["", "<", ">", "≤", "=", "≥"][item.optType]
str += `${item.wordfield} ${optTypeStr} ${item.leftval} 并且 `
}else if (item.optType == 6 && item.leftval && item.rightval) {
let opt1 = ["", "<", ">", "≤", "=", "≥"][item.leftoptType]
let opt2 = ["", "<", ">", "≤", "=", "≥"][item.rightoptType]
str += `${item.leftval} ${opt1} ${item.wordfield} ${opt2} ${item.rightval} 并且 `
}
if (columnType == "String" && showType == "3") {
if (zdy1) {
str += showName + '属于:' + this.dealStr(zdy1, JSON.parse(fixedDownBoxValue)) + " 并且 "
})
}
break;
case 3:
if(answers.length > 0){
str += name + "为"
if(Array.isArray(answers)){
let valStr = ""
options.forEach((item:any)=>{
if(answers.includes(item.value)){
valStr += `${item.label}`
}
if (columnType == "Double") {
if (optType != 6 && zdy1) {
var optTypeStr = ["", "<", ">", "≤", "=", "≥"][optType]
str += `${showName} ${optTypeStr} ${zdy1} 并且 `
} else if (optType == 6 && zdy1 && zdy2) {
str += `${zdy1} ${opt1} ${showName} ${opt2} ${zdy2} 并且 `
// console.log("answers.includes(item.value)",answers.includes(item.value),answers,item.value,valStr)
})
// str += valStr+` 并且 `
str += valStr ? valStr.substring(0, valStr.length - 2)+` 并且 `:"";
}else{
options.forEach((item:any)=>{
if(item.value == answers){
str += item.label+` 并且 `
}
})
}
}
break;
default:
}
}
// for (var i = 0; i < conditionList.length; i++) {
// var { columnId, columnType, showType, showName, optType, zdy1, opt1, zdy2, opt2, fixedDownBoxValue } = conditionList[i];
// if (columnId == 0) {
// if (nodeUserList.length != 0) {
// str += '发起人属于:'
// str += nodeUserList.map((item: { name: any; }) => { return item.name }).join("或") + " 并且 "
// }
// }
// if (columnType == "String" && showType == "3") {
// if (zdy1) {
// str += showName + '属于:' + this.dealStr(zdy1, JSON.parse(fixedDownBoxValue)) + " 并且 "
// }
// }
// if (columnType == "Double") {
// if (optType != 6 && zdy1) {
// var optTypeStr = ["", "<", ">", "≤", "=", "≥"][optType]
// str += `${showName} ${optTypeStr} ${zdy1} 并且 `
// } else if (optType == 6 && zdy1 && zdy2) {
// str += `${zdy1} ${opt1} ${showName} ${opt2} ${zdy2} 并且 `
// }
// }
// }
return str ? str.substring(0, str.length - 4) : '请设置条件'
}
},

4
src/views/knowledge/knowledge/components/KnowledgeContent.vue

@ -43,7 +43,11 @@ watch(() => props.isShow, () => {
} else {
pdfIframeShow.value = true
}
<<<<<<< HEAD
console.log(pdfIframeShow.value)
=======
//console.log(pdfIframeShow.value)
>>>>>>> v3
}
})
onMounted(() => {

19
src/views/knowledge/knowledge/components/Navili.vue

@ -1,5 +1,9 @@
<script lang='ts' setup>
import { scrollTo } from '@/api/knowledge/scroll'
<<<<<<< HEAD
=======
const showli = ref(true);
>>>>>>> v3
const props = defineProps({
oneli: {
type: Object,
@ -13,12 +17,27 @@ const props = defineProps({
active: {
type: Number,
default: 0
<<<<<<< HEAD
}
})
const liIndex = props.index + 1;
</script>
<template>
<li :class="{ active: active === index }" @click="scrollTo(index)">
=======
},
knowledgeStore: {
type: Object,
},
fatherisReady1: {
type: Number,
}
})
</script>
<template>
<li :class="{ active: active === index }" @click="scrollTo(index)" v-if="showli">
>>>>>>> v3
{{ oneli?.atTitle }}
</li>
</template>

118
src/views/knowledge/knowledge/components/archivestype.vue

@ -1,18 +1,34 @@
<script lang='ts' setup>
import { useUserStore } from "@/store/modules/user"
import { ref, watch } from 'vue'
<<<<<<< HEAD
import { getUserDetail, getZxxyNavis, getTuijian } from '@/api/knowledge/index'
import KnowledgeContent from '@/views/knowledge/knowledge/components/KnowledgeContent.vue'
import { UserQuery, UserDetail, NaviQuery, Navi, Graphicform, PageParam } from '@/api/knowledge/types'
import { formatDate } from '@/api/knowledge/scroll'
import { useRouter } from 'vue-router'
import errimg from '@/assets/404_images/imgNotFound.png'
=======
import { getTuijian } from '@/api/knowledge/index'
import KnowledgeContent from '@/views/knowledge/knowledge/components/KnowledgeContent.vue'
import { UserDetail, NaviQuery, Navi, Graphicform, PageParam, ShowTitle } from '@/api/knowledge/types'
import { formatDate } from '@/api/knowledge/scroll'
import errimg from '@/assets/404_images/imgNotFound.png'
import { useKnowledgeStore } from "@/store/modules/knowledge"
const showArea = ref(true);
>>>>>>> v3
const props = defineProps({
liContent: {
type: Object,
},
<<<<<<< HEAD
routerUrl:{
=======
routerUrl: {
>>>>>>> v3
type: String,
},
@ -27,14 +43,22 @@ const props = defineProps({
fatherisReady: {
type: Number,
default: 0
<<<<<<< HEAD
}
=======
},
>>>>>>> v3
})
const userStore = useUserStore();
const { userKey, userToken } = userStore;
<<<<<<< HEAD
=======
>>>>>>> v3
const userDetail = ref<UserDetail>({
//
idcardno: ["1", "2"],
@ -51,6 +75,7 @@ const userDetail = ref<UserDetail>({
});
const tuijianPage = ref<Graphicform[]>();
<<<<<<< HEAD
/* const naviList = ref<Navi[]>(); */
/* //用户信息查询参数
const userQueryParam = reactive<UserQuery>({
@ -60,6 +85,14 @@ const userQueryParam = reactive<UserQuery>({
//navi
const naviQueryParam = reactive<NaviQuery>({
atParentId: "",//
=======
//navi
const naviQueryParam = reactive<NaviQuery>({
atParentId: "",//
userkey: userKey,
usertoken: userToken,
>>>>>>> v3
});
const pageParamTuijian = reactive<PageParam>({
total: 0,
@ -81,6 +114,7 @@ function errorImg(e: any) {
//.once
e.srcElement.onerror = null; //
}
<<<<<<< HEAD
onMounted(() => {
//console.log(props.liContent?.gParentSun)
@ -151,6 +185,58 @@ watch(() => [props.fatherisReady, props.liContent,props.routerUrl], (newVal, old
}) */
=======
watch(() => [props.fatherisReady, props.liContent, props.routerUrl], (newVal, oldVal) => {
//console.log(newVal, oldVal); // [11, 22], [1, 2]
const routerUrl = oldVal[2] as String;
const liContent = newVal[1] as any;
//console.log(newVal[1])
//console.log(oldVal[2])
//console.log(routerUrl)
if (routerUrl?.endsWith("index")) {//
naviQueryParam.atParentId = '16213848089876281'
pageParamTuijian.archivesTypeAtParentId = '16213848089876281'
} else if (routerUrl?.endsWith("news")) {//
naviQueryParam.atParentId = '16213847972425134'
pageParamTuijian.archivesTypeAtParentId = '16213847972425134'
}
pageParamTuijian.gParentSun = liContent.atId;
//
if (props.liContent?.hasCard == true) {
//console.log(props.liContent?.hasCard)
getTuijian(pageParamTuijian)
.then(({ data }) => {
tuijianPage.value = data.list
//console.log(tuijianPage.value)
pageParamTuijian.page = data.pageNum
pageParamTuijian.total = data.total
if (pageParamTuijian.total > 0) {
showCards.value = 1;
}
const KnowledgeStore = useKnowledgeStore();
if (tuijianPage.value.length > 0) {
//
KnowledgeStore.$patch((state) => {
state.knowledgeTitlesShow.push({ atIdAndGParentSun: liContent.atId, hasCard: true })
})
showArea.value = true;
} else {
KnowledgeStore.$patch((state) => {
state.knowledgeTitlesShow.push({ atIdAndGParentSun: liContent.atId, hasCard: false })
})
//showArea.value = false;
}
});
}
})
>>>>>>> v3
function handleCurrentChange() {
getTuijian(pageParamTuijian)
@ -158,8 +244,11 @@ function handleCurrentChange() {
tuijianPage.value = data.list
pageParamTuijian.page = data.pageNum
pageParamTuijian.total = data.total
<<<<<<< HEAD
console.log(tuijianPage.value)
=======
>>>>>>> v3
});
}
@ -169,11 +258,20 @@ const showCards = ref(0)
//dialog
const cardContentSource = ref<Graphicform>({});
<<<<<<< HEAD
const showContentBox= ref(false); //
function showContentDialog(item:any){
showContentBox.value = true;
cardContentSource.value=item;
=======
const showContentBox = ref(false); //
function showContentDialog(item: any) {
showContentBox.value = true;
cardContentSource.value = item;
>>>>>>> v3
}
@ -186,12 +284,20 @@ function showContentDialog(item:any){
<h3>{{ props.liContent?.atTitle }}</h3>
</div>
<<<<<<< HEAD
<div v-show="!showCards" style="text-align: center;padding-top: 5%;" >暂无数据</div>
=======
<div v-show="!showCards" style="text-align: center;padding-top: 5%;">暂无数据</div>
>>>>>>> v3
<div class="grid-tuijian" v-show="showCards">
<div v-for="(item, index) in tuijianPage" :key="index" class="tuijian-card" @click="showContentDialog(item)">
<<<<<<< HEAD
<img style="width: 140px; height: 126px;border-radius:8px;margin-top: 4px; margin-left: 4px;"
=======
<img style="width: 170px; height: 126px;border-radius:8px;margin-top: 4px; margin-left: 4px;"
>>>>>>> v3
referrerpolicy="no-referrer" :src="item.gThumbnail" fit="fill" loading="lazy" @error="errorImg($event)" />
<div class="card-right">
@ -218,7 +324,11 @@ function showContentDialog(item:any){
<style>
.models {
width: 100%;
<<<<<<< HEAD
min-height: 200px;
=======
min-height: 200px;
>>>>>>> v3
}
@ -232,7 +342,11 @@ function showContentDialog(item:any){
.grid-tuijian {
/* border-top: solid 1px; */
display: grid;
<<<<<<< HEAD
grid-template-columns: repeat(auto-fill, 415px);
=======
grid-template-columns: repeat(auto-fill, 484px);
>>>>>>> v3
gap: 10px;
grid-auto-flow: row dense;
@ -240,7 +354,11 @@ function showContentDialog(item:any){
.tuijian-card {
display: flex;
<<<<<<< HEAD
width: 412px;
=======
width: 481px;
>>>>>>> v3
height: 140px;
padding: 3px;
border-radius: 8px;

174
src/views/knowledge/knowledge/index.vue

@ -1,10 +1,19 @@
<script lang='ts' setup>
import { useUserStore } from "@/store/modules/user"
<<<<<<< HEAD
import { ref } from 'vue'
import { getUserDetail, getZxxyNavis, getTuijian, getCarousel } from '@/api/knowledge/index'
import Archivestype from '@/views/knowledge/knowledge/components/archivestype.vue'
import Navili from '@/views/knowledge/knowledge/components/Navili.vue'
import KnowledgeContent from '@/views/knowledge/knowledge/components/KnowledgeContent.vue'
=======
import { ref } from 'vue'
import { getUserDetail, getZxxyNavis, getTuijian, getCarousel } from '@/api/knowledge/index'
import Archivestype from '@/views/knowledge/knowledge/components/archivestype.vue'
import Navili from './components/Navili.vue'
import KnowledgeContent from './components/KnowledgeContent.vue'
>>>>>>> v3
import { UserQuery, UserDetail, NaviQuery, Navi, Graphicform, PageParam } from '@/api/knowledge/types'
import { onScroll, scrollTo, formatDate } from '@/api/knowledge/scroll'
import { useRouter } from 'vue-router'
@ -17,7 +26,10 @@ const userStore = useUserStore();
const { userKey, userToken } = userStore;
<<<<<<< HEAD
=======
>>>>>>> v3
const userDetail = ref<UserDetail>({
//
idcardno: ["1", "2"],
@ -35,6 +47,10 @@ const userDetail = ref<UserDetail>({
const tuijianPage = ref<Graphicform[]>();
const naviList = ref<Navi[]>();
<<<<<<< HEAD
=======
const naviList1 = ref<Navi[]>();
>>>>>>> v3
//
const userQueryParam = reactive<UserQuery>({
userkey: userKey,
@ -43,6 +59,11 @@ const userQueryParam = reactive<UserQuery>({
//navi
const naviQueryParam = reactive<NaviQuery>({
atParentId: "",//
<<<<<<< HEAD
=======
userkey: userKey,
usertoken: userToken,
>>>>>>> v3
});
const pageParamTuijian = reactive<PageParam>({
total: 0,
@ -65,9 +86,21 @@ function errorImg(e: any) {
e.srcElement.onerror = null; //
}
const fatherisReady = ref(0);
<<<<<<< HEAD
const router = useRouter()
const routerUrl = toRaw(router).currentRoute.value.fullPath
onBeforeMount(() => {
=======
const router = useRouter()
const routerUrl = toRaw(router).currentRoute.value.fullPath
onBeforeMount(() => {
//
getUserDetail(userQueryParam)
.then(({ data }) => {
userDetail.value = data
});
>>>>>>> v3
})
@ -86,6 +119,7 @@ onMounted(() => {
getZxxyNavis(naviQueryParam)
.then(({ data }) => {
naviList.value = data
<<<<<<< HEAD
//console.log(naviList.value)
}).finally(() => {
@ -101,17 +135,26 @@ onMounted(() => {
=======
}).finally(() => {
fatherisReady.value = 100;
})
>>>>>>> v3
//
getTuijian(pageParamTuijian)
.then(({ data }) => {
tuijianPage.value = data.list
pageParamTuijian.page = data.pageNum
pageParamTuijian.total = data.total
<<<<<<< HEAD
//console.log(tuijianPage.value)
=======
>>>>>>> v3
});
getCarousel(pageParamTuijian)
.then(({ data }) => {
carousel.value = data.list
<<<<<<< HEAD
//console.log(tuijianPage.value)
@ -122,6 +165,12 @@ onMounted(() => {
//setTimeout(function(){ fatherisReady.value = 100;}, 3000);  //
});
=======
});
});
>>>>>>> v3
function jsScroll() {
active.value = onScroll();
}
@ -137,28 +186,46 @@ function handleCurrentChange() {
tuijianPage.value = data.list
pageParamTuijian.page = data.pageNum
pageParamTuijian.total = data.total
<<<<<<< HEAD
//console.log(tuijianPage.value)
=======
>>>>>>> v3
});
}
//dialog
const cardContentSource = ref<Graphicform>({});
<<<<<<< HEAD
const showContentBox= ref(false); //
function showContentDialog(item:any){
showContentBox.value = true;
cardContentSource.value=item;
=======
const showContentBox = ref(false); //
function showContentDialog(item: any) {
showContentBox.value = true;
cardContentSource.value = item;
>>>>>>> v3
}
</script>
<template>
<<<<<<< HEAD
<div class="know-main">
<KnowledgeContent v-model:isShow="showContentBox" :contentSource="cardContentSource"></KnowledgeContent>
<!-- 内容区域 -->
<div class="content" style="margin-left: 10% ;padding-right: 15%;">
=======
<div class="app-container">
<KnowledgeContent v-model:isShow="showContentBox" :contentSource="cardContentSource"></KnowledgeContent>
<!-- 内容区域 -->
<div class="content">
>>>>>>> v3
<div class="models ">
@ -167,16 +234,27 @@ function showContentDialog(item:any){
</div>
<div class="grid-tuijian">
<<<<<<< HEAD
<el-carousel indicator-position="outside" class="mycarousel" style="width: 412px;height:290px; " arrow="always">
<el-carousel-item v-for="(item, index) in carousel" :key="index" >
<!-- <h3 text="2xl" justify="center">{{ item.gThumbnail }}</h3> -->
<img style="width: 412px; height: 300px;border-radius:16px;margin-top: 4px; margin-left: 4px;"
=======
<el-carousel indicator-position="outside" class="mycarousel" arrow="always">
<el-carousel-item v-for="(item, index) in carousel" :key="index" @click="showContentDialog(item)">
<img style="width: 495px; height: 300px;border-radius:16px;margin-top: 4px; margin-left: 4px;"
>>>>>>> v3
referrerpolicy="no-referrer" :src="item.gThumbnail" fit="fill" loading="lazy" @error="errorImg($event)" />
</el-carousel-item>
</el-carousel>
<div v-for="(item, index) in tuijianPage" :key="index" class="tuijian-card" @click="showContentDialog(item)">
<<<<<<< HEAD
<img style="width: 140px; height: 126px;border-radius:8px;margin-top: 4px; margin-left: 4px;"
=======
<img style="width: 170px; height: 126px;border-radius:8px;margin-top: 4px; margin-left: 4px;"
>>>>>>> v3
referrerpolicy="no-referrer" :src="item.gThumbnail" fit="fill" loading="lazy" @error="errorImg($event)" />
<div class="card-right">
@ -195,6 +273,7 @@ function showContentDialog(item:any){
</div>
</div>
<<<<<<< HEAD
<el-pagination
v-if="pageParamTuijian.total > 0" v-model:current-page="pageParamTuijian.page"
v-model:page-size="pageParamTuijian.pagesize" layout="prev, pager, next, jumper" :total="pageParamTuijian.total" class="pagi"
@ -203,16 +282,35 @@ v-if="pageParamTuijian.total > 0" v-model:current-page="pageParamTuijian.page"
<!-- 各知识/新闻分区 -->
<Archivestype v-for="(item, index) in naviList" :key="index" :fatherisReady="fatherisReady" :liContent=item :index=(index) :routerUrl="routerUrl">
</Archivestype>
=======
<el-pagination class="pagi" v-model:current-page="pageParamTuijian.page" v-if="pageParamTuijian.total > 0"
v-model:page-size="pageParamTuijian.pagesize" layout="prev, pager, next, jumper" :total="pageParamTuijian.total"
@current-change="handleCurrentChange" />
</div>
<!-- 各知识/新闻分区 -->
<template v-for="(item, index) in naviList">
<Archivestype :liContent=item :index=(index) :fatherisReady="fatherisReady" :routerUrl="routerUrl"></Archivestype>
</template>
>>>>>>> v3
</div>
<<<<<<< HEAD
<!-- 导航区域 -->
=======
<!-- 导航区域 -->
>>>>>>> v3
<ul class="navs">
<li :class="{ active: active === 0 }" @click="scrollTo(0)">
推荐
</li>
<<<<<<< HEAD
<Navili v-for="(item, index) in naviList" :key="index" :class="{ active: active === index+1 }" :oneli=item :index=(index+1)
:active=active @click="scrollTo(index+1)"></Navili>
@ -220,11 +318,22 @@ v-if="pageParamTuijian.total > 0" v-model:current-page="pageParamTuijian.page"
</div>
=======
<template v-for="(item, index) in naviList">
<Navili :class="{ active: active === index+1 }" :oneli=item :index=(index+1) v-if="item.hasCard" :active=active
@click="scrollTo(index + 1)"></Navili>
</template>
</ul>
</div>
>>>>>>> v3
</template>
<style scoped>
<<<<<<< HEAD
/* 内容区的样式 */
.content {
background-color: white;
@ -243,15 +352,46 @@ v-if="pageParamTuijian.total > 0" v-model:current-page="pageParamTuijian.page"
.navs {
position: fixed;
top: 100px;
=======
.content {
background-color: white;
width: 89.1%;
margin-left: 190px;
box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
border-radius: 5px;
}
/* 导航栏的样式 */
.navs {
width: 192px;
position: fixed;
height: auto;
top: 95px;
>>>>>>> v3
}
.navs li {
<<<<<<< HEAD
padding: 0 40px;
line-height: 2.6;
font-size: 15px;
color: #909399;
=======
text-align: center;
line-height: 3;
font-size: 15.5px;
color: #909399;
background-color: white;
margin-right: 15px;
>>>>>>> v3
}
.navs li:hover {
@ -265,12 +405,23 @@ v-if="pageParamTuijian.total > 0" v-model:current-page="pageParamTuijian.page"
}
.model-title {
<<<<<<< HEAD
=======
margin-top: -9px;
>>>>>>> v3
height: 30px;
}
.grid-tuijian {
<<<<<<< HEAD
display: grid;
grid-template-columns: repeat(auto-fill, 415px);
=======
display: grid;
grid-template-columns: repeat(auto-fill, 484px);
>>>>>>> v3
gap: 10px;
grid-auto-flow: row dense;
@ -278,26 +429,46 @@ v-if="pageParamTuijian.total > 0" v-model:current-page="pageParamTuijian.page"
.tuijian-card {
display: flex;
<<<<<<< HEAD
width: 412px;
=======
width: 481px;
>>>>>>> v3
height: 140px;
padding: 3px;
border-radius: 8px;
flex-direction: row;
flex-wrap: wrap;
<<<<<<< HEAD
/* border:#909399 1px solid; */
/* box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px; */
=======
>>>>>>> v3
box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}
.mycarousel {
<<<<<<< HEAD
grid-row-start: 1;
grid-row-end: 3;
border-radius: 15px;
=======
grid-row-start: 1;
grid-row-end: 3;
border-radius: 15px;
width: 480px;
height: 290px;
>>>>>>> v3
}
.card-right {
display: flex;
<<<<<<< HEAD
width: 260px;
=======
width: 300px;
>>>>>>> v3
flex-direction: column;
flex-wrap: wrap;
padding-left: 8px;
@ -305,6 +476,7 @@ v-if="pageParamTuijian.total > 0" v-model:current-page="pageParamTuijian.page"
.card-title {
<<<<<<< HEAD
/* height: 1.5em !important;
overflow: hidden;
text-overflow: ellipsis;
@ -314,6 +486,8 @@ v-if="pageParamTuijian.total > 0" v-model:current-page="pageParamTuijian.page"
line-height: 25px;
height: 85px; */
=======
>>>>>>> v3
height: 1.5em !important;
display: -webkit-box;

360
src/views/knowledge/news/index.vue

@ -1,3 +1,4 @@
<<<<<<< HEAD
<!--
@ 作者: 鲁智强
@ 时间: 2023-08-28 11:13:14
@ -16,3 +17,362 @@ import aaComponent from "./aa.vue"
background-color: #fff;
}
</style>
=======
<script lang='ts' setup>
import { useUserStore } from "@/store/modules/user"
import { ref } from 'vue'
import { getUserDetail, getZxxyNavis, getTuijian, getCarousel } from '@/api/knowledge/index'
import Archivestype from '@/views/knowledge/knowledge/components/archivestype.vue'
import Navili from '@/views/knowledge/knowledge/components/Navili.vue'
import KnowledgeContent from '@/views/knowledge/knowledge/components/KnowledgeContent.vue'
import { UserQuery, UserDetail, NaviQuery, Navi, Graphicform, PageParam } from '@/api/knowledge/types'
import { onScroll, scrollTo, formatDate } from '@/api/knowledge/scroll'
import { useRouter } from 'vue-router'
import errimg from '@/assets/404_images/imgNotFound.png'
const active = ref(0); //
const userStore = useUserStore();
const { userKey, userToken } = userStore;
const userDetail = ref<UserDetail>({
//
idcardno: ["1", "2"],
//
name: 'a',
//url
icon: 'b',
//
wmNumber: '2',
//
wmKey: "1",
//adminorg
adminorg: "9999",
});
const tuijianPage = ref<Graphicform[]>();
const naviList = ref<Navi[]>();
const naviList1 = ref<Navi[]>();
//
const userQueryParam = reactive<UserQuery>({
userkey: userKey,
usertoken: userToken,
});
//navi
const naviQueryParam = reactive<NaviQuery>({
atParentId: "",//
userkey: userKey,
usertoken: userToken,
});
const pageParamTuijian = reactive<PageParam>({
total: 0,
page: 1,
pagesize: 7,
archivesTypeAtParentId: "", //or
gParentSun: "",
//
key: String(userDetail.value.wmKey),
//adminorg
adminorg: String(userDetail.value.adminorg),
userkey: userKey,
usertoken: userToken,
})
const carousel = ref<Graphicform[]>();
function errorImg(e: any) {
e.srcElement.src = errimg;
//.once
e.srcElement.onerror = null; //
}
const fatherisReady = ref(0);
const router = useRouter()
const routerUrl = toRaw(router).currentRoute.value.fullPath
onBeforeMount(() => {
//
getUserDetail(userQueryParam)
.then(({ data }) => {
userDetail.value = data
});
})
onMounted(() => {
//
window.addEventListener('scroll', jsScroll, false)
if (routerUrl.endsWith("index")) {//
naviQueryParam.atParentId = '16213848089876281'
pageParamTuijian.archivesTypeAtParentId = '16213848089876281'
} else if (routerUrl.endsWith("news")) {//
naviQueryParam.atParentId = '16213847972425134'
pageParamTuijian.archivesTypeAtParentId = '16213847972425134'
}
getZxxyNavis(naviQueryParam)
.then(({ data }) => {
naviList.value = data
}).finally(() => {
fatherisReady.value = 100;
})
//
getTuijian(pageParamTuijian)
.then(({ data }) => {
tuijianPage.value = data.list
pageParamTuijian.page = data.pageNum
pageParamTuijian.total = data.total
});
getCarousel(pageParamTuijian)
.then(({ data }) => {
carousel.value = data.list
});
});
function jsScroll() {
active.value = onScroll();
}
onUnmounted(() => {
// vue
window.removeEventListener('scroll', onScroll)
});
function handleCurrentChange() {
getTuijian(pageParamTuijian)
.then(({ data }) => {
tuijianPage.value = data.list
pageParamTuijian.page = data.pageNum
pageParamTuijian.total = data.total
});
}
//dialog
const cardContentSource = ref<Graphicform>({});
const showContentBox = ref(false); //
function showContentDialog(item: any) {
showContentBox.value = true;
cardContentSource.value = item;
}
</script>
<template>
<div class="app-container">
<KnowledgeContent v-model:isShow="showContentBox" :contentSource="cardContentSource"></KnowledgeContent>
<!-- 内容区域 -->
<div class="content">
<div class="models ">
<div class="model-title">
<h3>推荐</h3>
</div>
<div class="grid-tuijian">
<el-carousel indicator-position="outside" class="mycarousel" arrow="always">
<el-carousel-item v-for="(item, index) in carousel" :key="index" @click="showContentDialog(item)">
<img style="width: 495px; height: 300px;border-radius:16px;margin-top: 4px; margin-left: 4px;"
referrerpolicy="no-referrer" :src="item.gThumbnail" fit="fill" loading="lazy" @error="errorImg($event)" />
</el-carousel-item>
</el-carousel>
<div v-for="(item, index) in tuijianPage" :key="index" class="tuijian-card" @click="showContentDialog(item)">
<img style="width: 170px; height: 126px;border-radius:8px;margin-top: 4px; margin-left: 4px;"
referrerpolicy="no-referrer" :src="item.gThumbnail" fit="fill" loading="lazy" @error="errorImg($event)" />
<div class="card-right">
<span class="card-title" :title=item.gTitle>{{ item.gTitle }}</span>
<span class="card-text" :title=item.gDescribe>{{ item.gDescribe }}</span>
<span class="time-span"><span class="fa fa-clock-o"></span>{{ formatDate(item.gAddTime) }}</span>
<span class="myicons">
<span class="fa fa-star-o"></span>收藏(<span>{{ item.gCollectionSum }}</span>) <span
class="fa fa-thumbs-o-up"></span>(<span>{{
item.gLikes }}</span>) <span class="fa fa-thumbs-o-down"></span>(<span>{{ item.gStepOn }}</span>)
<span class="fa fa-eye">阅读</span>(<span>{{ item.gRead }}</span>)
</span>
</div>
</div>
</div>
<el-pagination class="pagi" v-model:current-page="pageParamTuijian.page" v-if="pageParamTuijian.total > 0"
v-model:page-size="pageParamTuijian.pagesize" layout="prev, pager, next, jumper" :total="pageParamTuijian.total"
@current-change="handleCurrentChange" />
</div>
<!-- 各知识/新闻分区 -->
<template v-for="(item, index) in naviList">
<Archivestype :liContent=item :index=(index) :fatherisReady="fatherisReady" :routerUrl="routerUrl"></Archivestype>
</template>
</div>
<!-- 导航区域 -->
<ul class="navs">
<li :class="{ active: active === 0 }" @click="scrollTo(0)">
推荐
</li>
<template v-for="(item, index) in naviList">
<Navili :class="{ active: active === index+1 }" :oneli=item :index=(index+1) v-if="item.hasCard" :active=active
@click="scrollTo(index + 1)"></Navili>
</template>
</ul>
</div>
</template>
<style scoped>
.content {
background-color: white;
width: 89.1%;
margin-left: 190px;
box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
border-radius: 5px;
}
/* 导航栏的样式 */
.navs {
width: 192px;
position: fixed;
height: auto;
top: 95px;
}
.navs li {
text-align: center;
line-height: 3;
font-size: 15.5px;
color: #909399;
background-color: white;
margin-right: 15px;
}
.navs li:hover {
cursor: pointer;
}
/* 当导航被点亮后改变颜色 */
.navs .active {
color: #409EFF;
}
.model-title {
margin-top: -9px;
height: 30px;
}
.grid-tuijian {
display: grid;
grid-template-columns: repeat(auto-fill, 484px);
gap: 10px;
grid-auto-flow: row dense;
}
.tuijian-card {
display: flex;
width: 481px;
height: 140px;
padding: 3px;
border-radius: 8px;
flex-direction: row;
flex-wrap: wrap;
box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}
.mycarousel {
grid-row-start: 1;
grid-row-end: 3;
border-radius: 15px;
width: 480px;
height: 290px;
}
.card-right {
display: flex;
width: 300px;
flex-direction: column;
flex-wrap: wrap;
padding-left: 8px;
}
.card-title {
height: 1.5em !important;
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
-webkit-line-clamp: 1;
}
.card-text {
margin-top: 2px;
margin-bottom: 2px;
height: 3.1em;
font-size: 14px;
color: #909399;
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
-webkit-line-clamp: 2;
}
.time-span {
height: 1.5em;
align-self: end;
margin-top: auto;
font-size: 13px;
margin-right: 5px;
color: #909399;
}
.myicons {
align-self: end;
margin-right: 5px;
font-size: 13px;
color: #909399;
}
.el-pagination {
margin-top: 20px;
margin-bottom: 10px;
justify-content: center;
}
</style>
>>>>>>> v3

47
src/views/sysworkflow/flow/flowDrawingBoard.vue

@ -88,21 +88,27 @@ onMounted(async ()=>{
})
//
const initWorkFlowData = async() => {
let { data } = await initializeWorkFlow({name:""})
let { data } = await initializeWorkFlow({name:props.customerFormName})
// console.log("data-=------>",data)
processConfig.value = data;
let {
nodeConfig: nodes,
flowPermission: flows,
directorMaxLevel: directorMaxLevel,
workFlowDef: works,
nodeConfig:nodes,
flowPermission,
directorMaxLevel,
workFlowDef:workName,
tableId,
} = data;
nodeConfig.value = nodes;
flowPermission.value = flows;
flowPermission = flowPermission;
directorMaxLeveling = directorMaxLevel;
workFlowDef.value = works;
workFlowDef.value = workName;
setTableId(tableId);
// console.log("max--->",flowPermission.value)
// console.log("max--1->",data)
// console.log("max--6->",tableId)
// console.log("max--2->",flowPermission)
// console.log("max--3->",flowPermission)
// console.log("max--4->",directorMaxLevel)
console.log("max--5->",workName)
}
//
const reErr = ({ childNode }:any) => {
@ -135,23 +141,26 @@ const reErr = ({ childNode }:any) => {
const saveSet = async () => {
setIsTried(true);
tipList.value = [];
processConfig.value.flowPermission = flowPermission.value;
// eslint-disable-next-line no-console
// console.log("processConfig",JSON.stringify(nodeConfig.value));
// console.log("processConfig",nodeConfig.value);
reErr(nodeConfig.value);
if (tipList.value.length != 0) {
tipVisible.value = true;
return;
}
processConfig.value.flowPermission = flowPermission.value;
// eslint-disable-next-line no-console
console.log("processConfig",processConfig.value);
console.log("flowPermission",flowPermission.value);
console.log("nodeConfig",nodeConfig.value);
// let res = await setWorkFlowData(processConfig.value);
// if (res.code == 200) {
// ElMessage.success("")
// setTimeout(function () {
// window.location.href = "";
// }, 200);
// }
let res = await setWorkFlowData(processConfig.value);
if (res.code == 200) {
ElMessage.success("设置成功")
setTimeout(function () {
window.location.href = "";
}, 200);
}
};
//
const zoomSize = (type:number) => {

Loading…
Cancel
Save