Browse Source

完成品类词库管理

master
С·æ 4 years ago
parent
commit
ee4a723152
  1. 23
      src/Coldairarrow.Api/Controllers/HuiYan/catsController.cs
  2. 53
      src/Coldairarrow.Business/HuiYan/catsBusiness.cs
  3. 11
      src/Coldairarrow.Entity/DTO/CatDto.cs
  4. 2
      src/Coldairarrow.IBusiness/HuiYan/IcatsBusiness.cs
  5. 12
      客户端/齐越慧眼/齐越慧眼.sln
  6. 4
      客户端/齐越慧眼/齐越慧眼/UserControls/CatControl.xaml
  7. 27
      客户端/齐越慧眼/齐越慧眼/UserControls/CatControl.xaml.cs
  8. 21
      客户端/齐越慧眼/齐越慧眼/vuepage/client/src/App.vue
  9. 13
      客户端/齐越慧眼/齐越慧眼/vuepage/client/src/api/http.js
  10. 83
      客户端/齐越慧眼/齐越慧眼/vuepage/client/src/assets/css/ViewContainer.less
  11. 229
      客户端/齐越慧眼/齐越慧眼/vuepage/client/src/assets/css/ViewGrid.less
  12. 75
      客户端/齐越慧眼/齐越慧眼/vuepage/client/src/assets/css/common.less
  13. 43
      客户端/齐越慧眼/齐越慧眼/vuepage/client/src/assets/css/reset.less
  14. BIN
      客户端/齐越慧眼/齐越慧眼/vuepage/client/src/assets/imgs/favicon.ico
  15. BIN
      客户端/齐越慧眼/齐越慧眼/vuepage/client/src/assets/logo.png
  16. 2
      客户端/齐越慧眼/齐越慧眼/vuepage/client/src/assets/script/common.js
  17. 5
      客户端/齐越慧眼/齐越慧眼/vuepage/client/src/assets/script/extend.js
  18. 15
      客户端/齐越慧眼/齐越慧眼/vuepage/client/src/assets/script/testFormExtend.js
  19. 11
      客户端/齐越慧眼/齐越慧眼/vuepage/client/src/main.js
  20. 3
      客户端/齐越慧眼/齐越慧眼/vuepage/client/src/router/index.js
  21. 186
      客户端/齐越慧眼/齐越慧眼/vuepage/client/src/views/cats/Index.vue
  22. 5
      客户端/齐越慧眼/齐越慧眼/vuepage/client/vue.config.js
  23. 4
      客户端/齐越慧眼/齐越慧眼/齐越慧眼.csproj

23
src/Coldairarrow.Api/Controllers/HuiYan/catsController.cs

@ -2,6 +2,7 @@
using Coldairarrow.Entity.DTO;
using Coldairarrow.Entity.HuiYan;
using Coldairarrow.Util;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
using System.Threading.Tasks;
@ -80,6 +81,28 @@ namespace Coldairarrow.Api.Controllers.HuiYan
return _catsBus.GetParentCatList();
}
/// <summary>
/// 获取所有品类词列表
/// </summary>
/// <returns></returns>
[HttpGet, AllowAnonymous]
public async Task<List<CatTreeDTO>> GetCatDatas()
{
return await _catsBus.GetTreeDataListAsync();
}
/// <summary>
/// 添加品类词
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpPost, AllowAnonymous]
public AjaxResult AddPLKeyWord(KeyWordDto model)
{
return _catsBus.AddKeyWord(model);
}
#endregion
}
}

53
src/Coldairarrow.Business/HuiYan/catsBusiness.cs

@ -34,13 +34,16 @@ namespace Coldairarrow.Business.HuiYan
Id = x.Id,
ParentId = x.ParentId,
Text = x.Name,
Value = x.Id
Value = x.Id,
Type = x.Type
}).ToList();
return TreeHelper.BuildTree(treeList);
}
public AjaxResult GetParentCatList()
{
var list = GetIQueryable().Where(c => string.IsNullOrEmpty(c.ParentId)).ToList();
@ -200,5 +203,53 @@ namespace Coldairarrow.Business.HuiYan
#region 私有成员
#endregion
public async Task<List<CatTreeDTO>> GetTreeDataListAsync()
{
var where = LinqHelper.True<cats>().And(c => c.Type == 0 || string.IsNullOrEmpty(c.TeamId));
var list = await GetIQueryable().Where(where).ToListAsync();
var treeList = list
.Select(x => new CatTreeDTO
{
Id = x.Id,
ParentId = x.ParentId,
Text = x.Name,
Value = x.Id,
Type = x.Type
}).ToList();
return TreeHelper.BuildTree(treeList);
}
public AjaxResult AddKeyWord(KeyWordDto model)
{
var cat = new cats()
{
Id = IdHelper.GetId(),
CreateTime = DateTime.Now,
CreatorId = "admin",
Deleted = false,
Name = model.KeyWord,
ParentId = model.LastCat,
//设置为团队库
Type = model.Type,
//暂时没有登录信息
TeamId = string.Empty
};
int row = Db.Insert<cats>(cat);
if (row > 0)
{
return Success(cat.Id);
}
else
{
return Error();
}
}
}
}

11
src/Coldairarrow.Entity/DTO/CatDto.cs

@ -29,4 +29,15 @@ namespace Coldairarrow.Entity.DTO
/// </summary>
public string Text { get; set; }
}
public class KeyWordDto
{
public string LastCat { get; set; }
public string KeyWord { get; set; }
public int Type { get; set; }
}
}

2
src/Coldairarrow.IBusiness/HuiYan/IcatsBusiness.cs

@ -19,6 +19,8 @@ namespace Coldairarrow.Business.HuiYan
AjaxResult GetParentCatList();
AjaxResult AddKeyWord(CatDto model);
Task<List<CatTreeDTO>> GetTreeDataListAsync();
AjaxResult AddKeyWord(KeyWordDto model);
}

12
客户端/齐越慧眼/齐越慧眼.sln

@ -3,18 +3,24 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30804.86
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "齐越慧眼", "齐越慧眼\齐越慧眼.csproj", "{BAF5933E-1C5F-4316-ABFF-D02263E4AC5A}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "齐越慧眼", "齐越慧眼\齐越慧眼.csproj", "{BAF5933E-1C5F-4316-ABFF-D02263E4AC5A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BAF5933E-1C5F-4316-ABFF-D02263E4AC5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BAF5933E-1C5F-4316-ABFF-D02263E4AC5A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BAF5933E-1C5F-4316-ABFF-D02263E4AC5A}.Debug|Any CPU.ActiveCfg = Debug|x64
{BAF5933E-1C5F-4316-ABFF-D02263E4AC5A}.Debug|Any CPU.Build.0 = Debug|x64
{BAF5933E-1C5F-4316-ABFF-D02263E4AC5A}.Debug|x64.ActiveCfg = Debug|x64
{BAF5933E-1C5F-4316-ABFF-D02263E4AC5A}.Debug|x64.Build.0 = Debug|x64
{BAF5933E-1C5F-4316-ABFF-D02263E4AC5A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BAF5933E-1C5F-4316-ABFF-D02263E4AC5A}.Release|Any CPU.Build.0 = Release|Any CPU
{BAF5933E-1C5F-4316-ABFF-D02263E4AC5A}.Release|x64.ActiveCfg = Release|x64
{BAF5933E-1C5F-4316-ABFF-D02263E4AC5A}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

4
客户端/齐越慧眼/齐越慧眼/UserControls/CatControl.xaml

@ -7,7 +7,7 @@
xmlns:cef="clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<cef:ChromiumWebBrowser x:Name="web"></cef:ChromiumWebBrowser>
<Grid x:Name="grid">
<Button Click="Button_Click" Panel.ZIndex="999999" Content="点我"></Button>
</Grid>
</UserControl>

27
客户端/齐越慧眼/齐越慧眼/UserControls/CatControl.xaml.cs

@ -1,4 +1,5 @@
using CefSharp;
using CefSharp.Wpf;
using System;
using System.Collections.Generic;
using System.Text;
@ -23,18 +24,30 @@ namespace 齐越慧眼.UserControls
{
InitializeComponent();
Loaded += CatControl_Loaded;
web.Initialized += Web_Initialized;
}
private void Web_Initialized(object sender, EventArgs e)
ChromiumWebBrowser web;
private void CatControl_Loaded(object sender, RoutedEventArgs e)
{
web.BrowserSettings.FileAccessFromFileUrls = CefSharp.CefState.Enabled;
web.BrowserSettings.UniversalAccessFromFileUrls = CefSharp.CefState.Enabled;
web = new ChromiumWebBrowser("nacollector://home")
{
BrowserSettings =
{
DefaultEncoding = "UTF-8",
Plugins= CefState.Enabled,
//关于跨域限制
WebSecurity = CefState.Disabled
},
};
grid.Children.Add(web);
}
private void CatControl_Loaded(object sender, RoutedEventArgs e)
private void Button_Click(object sender, RoutedEventArgs e)
{
web.Load("nacollector://home");
web.ShowDevTools();
}
}

21
客户端/齐越慧眼/齐越慧眼/vuepage/client/src/App.vue

@ -5,24 +5,5 @@
</template>
<style lang="less">
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
}
#nav {
padding: 30px;
a {
font-weight: bold;
color: #2c3e50;
&.router-link-exact-active {
color: #42b983;
}
}
}
</style>

13
客户端/齐越慧眼/齐越慧眼/vuepage/client/src/api/http.js

@ -1,4 +1,5 @@
import axios from 'axios'
import store from '../store'
axios.defaults.timeout = 50000;
//axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
@ -7,10 +8,10 @@ axios.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8';
//'application/json;charset=utf-8';//
if (process.env.NODE_ENV == 'development') {
axios.defaults.baseURL = 'http://127.0.0.1:9991/';
axios.defaults.baseURL = 'http://localhost:5000/';
}
else if (process.env.NODE_ENV == 'production') {
axios.defaults.baseURL = 'http://132.232.2.109:9991/';
axios.defaults.baseURL = 'http://localhost:5000/';
}
let ipAddress = axios.defaults.baseURL;
axios.interceptors.request.use((config) => {
@ -56,14 +57,13 @@ const _Authorization = 'Authorization', _Bearer = 'Bearer ';
function init(vue) {
$httpVue = vue
console.log(vue)
}
function getToken() {
if (currentToken) {
return _Bearer + currentToken;
}
return $httpVue.$store.getters.getToken();
return store.getters.getToken();
}
//_showLoading=true异步请求时会显示遮罩层,_showLoading=字符串,异步请求时遮罩层显示当前字符串
@ -171,10 +171,10 @@ function getNewToken(callBack) {
json: true,
success: function (x) {
if (x.status) {
let userInfo = $httpVue.$store.getters.getUserInfo();
let userInfo = store.getters.getUserInfo();
userInfo.token = x.data;
currentToken = x.data;
$httpVue.$store.commit('setUserInfo', userInfo);
store.commit('setUserInfo', userInfo);
callBack();
} else {
console.log(x.message);
@ -253,4 +253,5 @@ ajax.post = function (url, param, success, errror) {
ajax.get = function (url, param, success, errror) {
ajax({ url: url, param: param, success: success, error: errror, type: 'post' })
}
export default { post, get, ajax, init, ipAddress }

83
客户端/齐越慧眼/齐越慧眼/vuepage/client/src/assets/css/ViewContainer.less

@ -1,83 +0,0 @@
.layout-container {
// border-top: 1px solid #eee;
background: #eee;
// padding: 15px;
/* margin-bottom: 40px; */
}
// .animated {
// -webkit-animation-duration: 1s;
// animation-duration: 1s;
// -webkit-animation-fill-mode: both;
// animation-fill-mode: both;
// }
// .animated.infinite {
// -webkit-animation-iteration-count: infinite;
// animation-iteration-count: infinite;
// }
// .animated.hinge {
// -webkit-animation-duration: 2s;
// animation-duration: 2s;
// }
// .animated.bounceIn,
// .animated.bounceOut,
// .animated.flipOutX,
// .animated.flipOutY {
// -webkit-animation-duration: 0.75s;
// animation-duration: 0.75s;
// }
// @-webkit-keyframes fadeInDown {
// 0% {
// opacity: 0;
// -webkit-transform: translate3d(0, -100%, 0);
// transform: translate3d(0, -100%, 0);
// }
// to {
// opacity: 1;
// -webkit-transform: none;
// transform: none;
// }
// }
// @keyframes fadeInDown {
// 0% {
// opacity: 0;
// -webkit-transform: translate3d(0, -100%, 0);
// transform: translate3d(0, -100%, 0);
// }
// to {
// opacity: 1;
// -webkit-transform: none;
// transform: none;
// }
// }
// .fadeInDown {
// -webkit-animation-name: fadeInDown;
// animation-name: fadeInDown;
// }
// @-webkit-keyframes slideInDown {
// 0% {
// -webkit-transform: translate3d(0, -100%, 0);
// transform: translate3d(0, -100%, 0);
// visibility: visible;
// }
// to {
// -webkit-transform: translateZ(0);
// transform: translateZ(0);
// }
// }
// @keyframes slideInDown {
// 0% {
// -webkit-transform: translate3d(0, -100%, 0);
// transform: translate3d(0, -100%, 0);
// visibility: visible;
// }
// to {
// -webkit-transform: translateZ(0);
// transform: translateZ(0);
// }
// }
// .slideInDown {
// -webkit-animation-name: slideInDown;
// animation-name: slideInDown;
// }

229
客户端/齐越慧眼/齐越慧眼/vuepage/client/src/assets/css/ViewGrid.less

@ -1,229 +0,0 @@
.view-container{
padding: 15px;
background: white;
}
.view-header {
height: 45px;
position: relative;
padding-bottom: 11px;
display: -webkit-flex;
display: flex;
.search-line {
flex: 1;
margin-left: 50px;
display: flex;
text-align: right;
}
.search-line > div {
margin-left: 30px;
margin-right: 20px;
}
.search-line > div > div{
width: 200px;
text-align: left;
}
.search-line > div:first-child{
flex: 1;
}
.search-line > div .ivu-select-dropdown{
max-height: 300px;
}
// .btn-group > button {
// text-align: right;
// }
.btn-group{
white-space: nowrap;
button {
margin-left: 10px;
// padding: 5px 16px;
}
.dropdown{
height: 31px;
padding-right: 9px;
padding-left: 11px;
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
}
.r-dropdown{
height: 31px;
margin-left: 0px;
padding-left: 5px;
padding-right: 5px;
border-bottom-left-radius: 0px;
border-left: 1px solid #eee;
border-top-left-radius: 0;
}
}
// .btn-group button {
// margin-left: 10px;
// // padding: 5px 16px;
// }
// .btn-group .dropdown {
// position: relative;
// padding: 5px 34px 5px 10px;
// }
// .btn-group .dropdown span i.ivu-icon-ios-arrow-down {
// top: 0px;
// height: 34px;
// border-left: 1px solid;
// height: 100%;
// position: absolute;
// margin-left: 10px;
// padding: 9px 5px 5px 5px;
// }
// .btn-group .dropdown .ivu-dropdown {
// bottom: 0;
// right: 0;
// left: 0;
// position: absolute;
// }
.btn-group .ivu-dropdown-item {
text-align: left !important;
}
.btn-group .ivu-dropdown-item:not(:last-child) {
border-bottom: 1px dotted #eee;
}
.desc-text {
margin-top: 5px;
font-weight: bold;
margin-bottom: 3px;
font-size: 15px;
color: #607d8b;
white-space: nowrap;
border-bottom: 2px solid #009688;
}
.desc-text .ivu-icon {
font-size: 20px;
bottom: 2px;
position: relative;
}
.search-box {
background: #fefefe;
margin-top: 45px;
border: 1px solid #ececec;
position: absolute;
z-index: 999;
left: 0;
right: 0;
// width: 100%;
padding: 25px 40px;
padding-bottom: 0;
box-shadow: 0px 7px 18px -12px #bdc0bb;
}
.notice {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
position: relative;
top: 12px;
left: 10px;
}
}
.table-info-cell-title {
background-color: #f5f5f5 !important;
}
.iview-com {
background: #f3f3f3;
> div.item{
// margin-bottom: 10px;
margin-bottom: 12px;
background: white;
}
> div.form-item{
padding: 8px 16px 7px 16px;
//box-shadow: 0 1px 7px rgb(199, 199, 199);
}
> div.table-item{
// padding: 0px 16px 12px 16px;
border: 1px solid #e8e8e8;
box-shadow: 0 1px 7px rgb(199, 199, 199);
}
.v-text{
line-height: 27px;
}
.form-text{
position: relative;
/* height: 38px; */
/* line-height: 38px; */
/* padding: 0 15px; */
// border-bottom: 1px solid #e4e4e4;
border-bottom: 1px solid #eee;
/* border-radius: 2px 2px 0 0; */
font-size: 14px;
margin-bottom: 14px;
.title{
border-bottom: 2px solid #00BCD4;
color: #009688;
font-weight: bold;
letter-spacing: 1px;
// border-bottom-right-radius: 5px;
// border-top-left-radius: 5px;
padding: 6px 0;
// background: #009688;
// color: white;
}
.icon{
color: #00BCD4;
font-size: 19px;
position: relative;
top: -1px;
}
}
}
.form-closex {
text-align: right;
padding-bottom: 24px;
}
.form-closex button {
margin-left: 10px;
padding: 4px 13px;
}
.grid-detail{
// margin-left:16px;
// // margin-top:-28px;
// padding-bottom: 16px;
}
.toolbar{
padding: 3px 15px;
width: 100%;
display: flex;
// padding: 3px;
border-top: 1px solid #eae9e9;
// border-top-left-radius: 5px;
// // background: #37aba0;
// border-top-right-radius: 5px;
// border: 1px solid #f1f1f1;
.title{
line-height: 28px;
border-bottom: 2px solid #03A9F4;
font-size: 14px;
font-weight: bolder;
margin-bottom: 0;
color: #828282;
.icon{
color: #009688;
font-size: 18px;
}
}
.btns{
line-height: 28px;
flex: 1;
text-align: right;
margin-right: 12px;
button{
border: none;
margin-left:15px;
border: 0px;
color: #009688;
}
button:hover{
color: #FF9800;
border-color: #FF9800;
border: none;
}
}
}

75
客户端/齐越慧眼/齐越慧眼/vuepage/client/src/assets/css/common.less

@ -1,75 +0,0 @@
*{
box-sizing:border-box;
-moz-box-sizing:border-box; /* Firefox */
-webkit-box-sizing:border-box; /* Safari */
}
.el-pager li{
font-weight: 100;
margin-right: 9px;
border: 1px solid #eee;
border-radius: 3px;
min-width: 28px;
}
.el-pager li.active,.el-pager li:hover{
background: #ed4014;
color: white;
}
.el-pagination__editor.el-input .el-input__inner{
height: 23px;
}
.animated {
-webkit-animation-duration: 0.5s;
animation-duration: 0.5s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
@media (print), (prefers-reduced-motion) {
.animated {
-webkit-animation: unset !important;
animation: unset !important;
-webkit-transition: none !important;
transition: none !important;
}
}
@-webkit-keyframes fadeInDown {
from {
opacity: 1;
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes fadeInDown {
from {
opacity: 0;
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.fadeInDown {
-webkit-animation-name: fadeInDown;
animation-name: fadeInDown;
}
.ivu-message{
z-index: 999999999 !important;
}
.ivu-form-item-content{
text-align: left;
}

43
客户端/齐越慧眼/齐越慧眼/vuepage/client/src/assets/css/reset.less

@ -0,0 +1,43 @@
@import '~ant-design-vue/dist/antd.less';
.ant-tree-node-content-wrapper
{
display: unset;
}
.ant-tree li .ant-tree-node-content-wrapper
{
display: unset;
cursor: default;
}
.ant-tree-title
{
display: inline-block;
}
.ant-tree-title:hover
{
background: unset;
cursor: unset;
}
.ant-card-body:hover{
cursor: unset;
}
.ant-tree-node-content-wrapper
{
cursor: default;
}
.ant-tree li .ant-tree-node-content-wrapper.ant-tree-node-selected
{
background-color: unset;
}
.ant-tree li .ant-tree-node-content-wrapper:hover
{
background-color: unset;
}

BIN
客户端/齐越慧眼/齐越慧眼/vuepage/client/src/assets/imgs/favicon.ico

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

BIN
客户端/齐越慧眼/齐越慧眼/vuepage/client/src/assets/logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

2
客户端/齐越慧眼/齐越慧眼/vuepage/client/src/assets/script/common.js

@ -1,2 +0,0 @@
var test1 = function () { alert(11) }
export { test1 }

5
客户端/齐越慧眼/齐越慧眼/vuepage/client/src/assets/script/extend.js

@ -1,5 +0,0 @@
//对vue参数进行扩展
var extend = function (param) {
console.log(param)
}
export { extend }

15
客户端/齐越慧眼/齐越慧眼/vuepage/client/src/assets/script/testFormExtend.js

@ -1,15 +0,0 @@
//对vue参数进行扩展
var extend = function ($vueParam) {
$vueParam.methods.volBoxFrom = function () {
this.$Message.info("扩展js,增加弹出消息");
this.$refs.volBoxFrom.show();
}
//修改data属性:
let data = $vueParam.data();
data.formFileds['extend'] = "动态扩展字段";
data.formOptions.splice(0,0,{ filed: "extend", title: "动态增加字段", type: "text", required: true });
$vueParam.data = function () {
return data;
}
}
export { extend }

11
客户端/齐越慧眼/齐越慧眼/vuepage/client/src/main.js

@ -6,14 +6,19 @@ import store from './store'
import http from './api/http'
import 'ant-design-vue/dist/antd.css';
import './assets/css/reset.less'
Vue.config.productionTip = false
Vue.use(Antd);
Vue.prototype.http = http
Vue.use(Antd)
var vue =new Vue({
router,
store,
render: function (h) { return h(App) }
}).$mount('#app')
Vue.prototype.http = http;
Vue.prototype.http.init(vue);
Vue.prototype.http.init(vue)

3
客户端/齐越慧眼/齐越慧眼/vuepage/client/src/router/index.js

@ -13,9 +13,6 @@ const routes = [
{
path: '/about',
name: 'About',
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: function () {
return import(/* webpackChunkName: "about" */ '../views/About.vue')
}

186
客户端/齐越慧眼/齐越慧眼/vuepage/client/src/views/cats/Index.vue

@ -1,33 +1,161 @@
<template>
<div class="card-container">
<a-tabs type="card">
<a-tab-pane key="1" tab="Tab Title 1">
<p @click="testHttp">Content of Tab Pane 1</p>
<p>{{html}}</p>
</a-tab-pane>
<a-tab-pane key="2" tab="Tab Title 2">
<p>Content of Tab Pane 2</p>
</a-tab-pane>
<a-tab-pane key="3" tab="Tab Title 3">
<p>Content of Tab Pane 3</p>
</a-tab-pane>
</a-tabs>
</div>
</template>
<script>
export default {
data() {
return {
html:''
}
<div class="card-container">
<a-tabs>
<a-tab-pane key="1" tab="淘宝">
</a-tab-pane>
<a-tab-pane key="2" tab="京东">
</a-tab-pane>
<a-tab-pane key="3" tab="拼多多">
</a-tab-pane>
</a-tabs>
<a-card>
<a-tree>
<a-tree-node :key="index" v-for="(cats,index) in datas">
<template v-slot:title>
<span
style="font-size: 15px;font-weight:700;font-family: 'Arial Negreta', 'Arial Normal', 'Arial', sans-serif;">
{{cats.title}}
</span>
</template>
<a-tree-node :key="index+'-'+i2" v-for="(twoCat,i2) in cats.children">
<template v-slot:title>
<span
style="font-size: 15px;font-weight:700;font-family: 'Arial Negreta', 'Arial Normal', 'Arial', sans-serif;">
{{twoCat.title}}
</span>
</template>
<a-tree-node :key="index+'-'+i2+'-'+i3" v-for="(lastCat,i3) in twoCat.children">
<template v-slot:title>
<a-row style="width: 500px;" :gutter="15">
<a-col :span="4">
<span style="font-size: 15px;font-family: 'Arial Negreta', 'Arial Normal', 'Arial', sans-serif;">
{{lastCat.title}}
</span>
</a-col>
<a-col :span="8">
<a-input size="small" style="z-index: 99;" placeholder="请输入品类词" v-model="lastCat.newKey" />
</a-col>
<a-col>
<a-button type="primary" size="small" style="font-size: 13px;" @click="()=>{addCats(lastCat)}">添加品类词
</a-button>
</a-col>
</a-row>
</template>
<a-tree-node>
<template v-slot:title>
<div>
<a-card :bordered="false">
<a-row>
<a-col :span="8">
集团库
</a-col>
<a-col :span="16">
<a-tag style="cursor: pointer;" :key="i4"
v-for="(keyword,i4) in lastCat.children.filter(c=>c.Type==0)">
{{keyword.title}}</a-tag>
</a-col>
</a-row>
</a-card>
<a-card style="margin-top: 10px;" :bordered="false">
<a-row>
<a-col :span="8">
团队库
</a-col>
<a-col :span="16">
<a-tag style="cursor: pointer;" :key="i4"
v-for="(keyword,i4) in lastCat.children.filter(c=>c.Type==1)">
{{keyword.title}}</a-tag>
</a-col>
</a-row>
</a-card>
</div>
</template>
</a-tree-node>
</a-tree-node>
</a-tree-node>
</a-tree-node>
</a-tree>
</a-card>
</div>
</template>
<script>
export default {
data() {
return {
datas: []
}
},
mounted() {
this.getDatas()
},
methods: {
getDatas() {
this.http.get('/HuiYan/cats/GetCatDatas').then(res => {
this.datas = res.Data
})
},
methods: {
testHttp(){
this.http.get('http://www.baidu.com').then(res=>{
this.html=res
})
}
addCats(lastCat) {
var that = this
this.$confirm({
title: '新增类目词',
content: `新增类目词【${lastCat.newKey}】添加至哪个数据库?`,
okText: '团队库',
cancelText: '集团库',
onOk(e) {
that.http.post('/HuiYan/cats/AddPLKeyWord', { LastCat: lastCat.value, KeyWord: lastCat.newKey,Type:1 }).then(res => {
if (res.Success) {
that.$message.success('添加成功!')
if(!lastCat.children)
{
lastCat.children=[]
}
lastCat.children.push({
title:lastCat.newKey,
Type:1,
value:res.Data
})
e()
} else {
that.$message.error('添加失败!')
}
})
},
onCancel() {
that.http.post('/HuiYan/cats/AddPLKeyWord', { LastCat: lastCat.value, KeyWord: lastCat.newKey,Type:0 }).then(res => {
if (res.Success) {
that.$message.success('添加成功!')
if(!lastCat.children)
{
lastCat.children=[]
}
lastCat.children.push({
title:lastCat.newKey,
Type:0,
value:res.Data
})
e()
} else {
that.$message.error('添加失败!')
}
})
},
});
}
}
</script>
}
</script>
<style>
</style>

5
客户端/齐越慧眼/齐越慧眼/vuepage/client/vue.config.js

@ -13,5 +13,10 @@ module.exports = {
chunkFilename: `css/[name].css`
})
]
},
css: {
loaderOptions: {
less: {javascriptEnabled: true}
}
}
}

4
客户端/齐越慧眼/齐越慧眼/齐越慧眼.csproj

@ -4,6 +4,7 @@
<OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<UseWPF>true</UseWPF>
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>
<ItemGroup>
@ -62,13 +63,12 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="CefSharp.Wpf.NETCore" Version="94.4.50" />
<PackageReference Include="CefSharp.Wpf.NETCore" Version="89.0.170" />
<PackageReference Include="HandyControl" Version="3.2.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="vuepage\client\dist\css\app.b0aefef5.css" />
<EmbeddedResource Include="vuepage\client\dist\css\app.css" />
<EmbeddedResource Include="vuepage\client\dist\css\chunk-vendors.09af4a6b.css" />
<EmbeddedResource Include="vuepage\client\dist\css\chunk-vendors.css" />

Loading…
Cancel
Save