Browse Source

加入表格样式

master
feng 2 years ago
parent
commit
321f22e4d4
  1. 2
      src/Coldairarrow.Business/HuiYan/teamitemsBusiness.cs
  2. 9
      src/Coldairarrow.Entity/Enum/teamItemState.cs
  3. 32
      客户端/齐越慧眼/WpfNoticeMsg/NoticeMessage.xaml.cs
  4. 12
      客户端/齐越慧眼/齐越慧眼/UserControls/ItemControl.xaml.cs
  5. 29
      客户端/齐越慧眼/齐越慧眼/Windows/CompetingWindow.xaml.cs
  6. 6
      客户端/齐越慧眼/齐越慧眼/Windows/ItemDetailWindow.xaml.cs
  7. 30
      客户端/齐越慧眼/齐越慧眼/vuepage/client/src/views/competing/Index.vue
  8. 6
      客户端/齐越慧眼/齐越慧眼/vuepage/client/src/views/competing/List.vue
  9. 2
      客户端/齐越慧眼/齐越慧眼/vuepage/dist/js/app.js
  10. 2
      客户端/齐越慧眼/齐越慧眼/vuepage/dist/js/app.js.map

2
src/Coldairarrow.Business/HuiYan/teamitemsBusiness.cs

@ -130,7 +130,7 @@ namespace Coldairarrow.Business.HuiYan
{
if (state == -1)
{
where = where.And(c => c.State!=3);
where = where.And(c => c.State != (int)TeamItemState.&&c.State!= (int)TeamItemState.);
}
else
where = where.And(c => c.State == state);

9
src/Coldairarrow.Entity/Enum/teamItemState.cs

@ -12,17 +12,14 @@ namespace Coldairarrow.Entity.Enum
= 1,
= 8,
= 2,
= 3,
= 5,
= 6,
= 7
= 7,
= 8,
=9
}

32
客户端/齐越慧眼/WpfNoticeMsg/NoticeMessage.xaml.cs

@ -55,6 +55,38 @@ namespace WpfNoticeMsg
}));
}
public static void Show(Window window, string msg, string title = "提示", int sleep = 2000)
{
window.Dispatcher.BeginInvoke(new Action(() =>
{
NoticeMessage noticeMessage = new NoticeMessage();
try
{
noticeMessage.Owner = window;
}
catch
{
}
noticeMessage.txt_Title.Text = title;
noticeMessage.txtMsg.Text = msg;
noticeMessage.Height = noticeMessage.grid.ActualHeight;
noticeMessage.Width = noticeMessage.grid.ActualWidth + 30;
noticeMessage.Show();
Task.Factory.StartNew(() =>
{
Thread.Sleep(sleep);
window.Dispatcher.Invoke(() =>
{
noticeMessage.Close();
});
});
}));
}
private void close_Click(object sender, RoutedEventArgs e)
{
this.Close();

12
客户端/齐越慧眼/齐越慧眼/UserControls/ItemControl.xaml.cs

@ -1,6 +1,7 @@
using CefSharp;
using CefSharp.Wpf;
using HandyControl.Expression.Shapes;
using HandyControl.Tools.Extension;
using System;
using System.Collections.Generic;
using System.Drawing;
@ -109,16 +110,19 @@ namespace 齐越慧眼.UserControls
public bool? onShowWindow(string itemJson,string type)
{
var item = Newtonsoft.Json.JsonConvert.DeserializeObject<TeamItem>(itemJson);
if(type== "0") {
bool? result = false;
MainWindow.Main.Dispatcher.Invoke(() =>
{
Windows.CompetingWindow window = new Windows.CompetingWindow(item);
Windows.CompetingWindow window = new Windows.CompetingWindow(item,type);
result= window.ShowDialog();
if (result == true)
{
WpfNoticeMsg.NoticeMessage.Show("保存成功!");
}
});
return result;
}
return false;
}
public string getToken()

29
客户端/齐越慧眼/齐越慧眼/Windows/CompetingWindow.xaml.cs

@ -29,12 +29,24 @@ namespace 齐越慧眼.Windows
public partial class CompetingWindow : Window
{
public ExtChromiumBrowser web;
public CompetingWindow(TeamItem item)
public CompetingWindow(TeamItem item,string type)
{
InitializeComponent();
this.DataContext = new CompetingWindowViewModel(item);
web = new ExtChromiumBrowser($"https://search.jd.com/Search?keyword={item.Title}")
string url = $"https://search.jd.com/Search?keyword={item.Title}";
//修改
if (type == "1")
{
url="nacollector://home/competingList";
firstGrid.Visibility = Visibility.Collapsed;
nextGrid.Visibility = Visibility.Visible;
topPanel.Visibility = Visibility.Collapsed;
btn_canel.Visibility = Visibility.Collapsed;
}
web = new ExtChromiumBrowser(url)
{
BrowserSettings =
{
@ -124,7 +136,7 @@ namespace 齐越慧眼.Windows
if (Windows.ItemDetailWindow.Show(this,e.Url) == true)
{
StartPage();
WpfNoticeMsg.NoticeMessage.Show("添加成功!");
WpfNoticeMsg.NoticeMessage.Show(this, "添加成功!");
}
});
t.IsBackground = true;
@ -272,7 +284,7 @@ namespace 齐越慧眼.Windows
List<string> itemIds = Newtonsoft.Json.JsonConvert.DeserializeObject<List<string>>(Newtonsoft.Json.JsonConvert.SerializeObject(res.result));
//已经添加的spu
var result = CompetingWindowViewModel.Instance.ItemList.Where(d => itemIds.Contains(d.Spu)).ToList();
var result = CompetingWindowViewModel.Instance.ItemList.Where(d => itemIds.Contains(d.Spu)).GroupBy(c=>c.Spu).Select(c=>c.Key).ToList();
foreach (var item in result)
{
@ -297,8 +309,10 @@ namespace 齐越慧眼.Windows
//if (item.IsScreening)
//{
DoJavaScript($@"$($('div#J_goodsList li[data-sku=""{item.Sku}""]')).find('.myitemState').addClass(""trueBg"")");
DoJavaScript($@"$($('div#J_goodsList li[data-sku=""{item.Sku}""]')).find('.stateGraydiv').addClass(""divshow"")");
//DoJavaScript($@"$($('div#J_goodsList li[data-sku=""{item.Sku}""]')).find('.myitemState').addClass(""trueBg"")");
//DoJavaScript($@"$($('div#J_goodsList li[data-sku=""{item.Sku}""]')).find('.stateGraydiv').addClass(""divshow"")");
DoJavaScript($@"$($('div#J_goodsList li[data-spu=""{item}""]')).find('.myitemState').addClass(""trueBg"")");
DoJavaScript($@"$($('div#J_goodsList li[data-spu=""{item}""]')).find('.stateGraydiv').addClass(""divshow"")");
//}
//if (item.IsAdded)
@ -590,12 +604,11 @@ namespace 齐越慧眼.Windows
{
if (ApiHelper.UpdateItemCompeting(CompetingWindowViewModel.Instance.ItemList.ToList(), CompetingWindowViewModel.Instance.Item.Id))
{
WpfNoticeMsg.NoticeMessage.Show("保存成功!");
this.DialogResult = true;
}
else
{
WpfNoticeMsg.NoticeMessage.Show("保存失败!");
WpfNoticeMsg.NoticeMessage.Show(this,"保存失败!");
}
}
}

6
客户端/齐越慧眼/齐越慧眼/Windows/ItemDetailWindow.xaml.cs

@ -158,7 +158,7 @@ namespace 齐越慧眼.Windows
//判断是否加载完成
if (!result.Success)
{
WpfNoticeMsg.NoticeMessage.Show("请等待页面加载完成后重试!");
WpfNoticeMsg.NoticeMessage.Show(this, "请等待页面加载完成后重试!");
return;
}
@ -193,7 +193,7 @@ namespace 齐越慧眼.Windows
if (string.IsNullOrEmpty(model.Price) || string.IsNullOrEmpty(model.Sku) || string.IsNullOrEmpty(model.CommentCount))
{
WpfNoticeMsg.NoticeMessage.Show("请等待页面加载完成!");
WpfNoticeMsg.NoticeMessage.Show(this, "请等待页面加载完成!");
return;
}
@ -206,7 +206,7 @@ namespace 齐越慧眼.Windows
if (ViewModels.CompetingWindowViewModel.Instance.ItemList.Any(c => c.Spu == model.Spu))
{
WpfNoticeMsg.NoticeMessage.Show("当前已有相同Spu竞品存在!");
WpfNoticeMsg.NoticeMessage.Show(this, "当前已有相同Spu竞品存在!");
return;
}

30
客户端/齐越慧眼/齐越慧眼/vuepage/client/src/views/competing/Index.vue

@ -52,7 +52,18 @@
<a-button @click="searchDatas">搜索</a-button>
</a-col>
</a-row> -->
<a-tabs @change="changeTab" v-model="currentTab">
<a-tab-pane
key="-1"
:tab="'待分析'"
>
</a-tab-pane>
<a-tab-pane
key="9"
:tab="'已分析'"
>
</a-tab-pane>
</a-tabs>
<div class="border">
<!--标题-->
@ -123,10 +134,11 @@
</div>
<div style="flex-direction: column;width: 177px;color: #02a7f0;" class="contentDiv" >
<div @click="()=>{onShowWindow(item,0)}">查找竞品</div>
<div style="margin-top: 10px;">完成分析</div>
<div style="margin-top: 10px;" @click="()=>{onShowWindow(item,1)}">编辑修改</div>
<div style="margin-top: 10px;">放弃</div>
<div v-if="currentTab=='-1'" @click="()=>{onShowWindow(item,0)}" style="cursor: pointer;">查找竞品</div>
<div v-if="currentTab=='-1'" style="margin-top: 10px;cursor: pointer;" @click="setState(item.Id,9)">完成分析</div>
<div v-if="currentTab=='-1'" style="margin-top: 10px;cursor: pointer;" @click="()=>{onShowWindow(item,1)}">编辑修改</div>
<div style="margin-top: 10px;cursor: pointer;" @click="setState(item.Id,3)">放弃</div>
</div>
</div>
</div>
@ -166,7 +178,7 @@ export default {
loading: false,
queryParam: { condition: "State", keyword: 0 },
selectedRowKeys: [],
currentTab: "0",
currentTab: "-1",
catKeyWord:undefined,
lastEditData: undefined,
extFormList: ["以图搜款"],
@ -373,7 +385,7 @@ export default {
})
},
changeTab(e) {
if(e!='-1')
if(e!='-1'&&e!="9")
{
this.$router.push({name:'item',params:{tabId:e} })
return
@ -403,7 +415,7 @@ export default {
PageRows: this.pagination.pageSize,
SortField: this.sorter.field || "Id",
SortType: this.sorter.order,
Search: { condition: "State", keyword: -1 },
Search: { condition: "State", keyword:this.currentTab },
...this.filters,
})
.then((res) => {
@ -498,7 +510,7 @@ export default {
.then((res) => {
if (res.Success) {
this.$message.success("操作成功!");
this.getDatas(this.currentTab);
this.getDatas(0);
} else {
this.$message.error(res.Msg);
}

6
客户端/齐越慧眼/齐越慧眼/vuepage/client/src/views/competing/List.vue

@ -51,7 +51,7 @@ export default {
{
title: '竞品链接',
dataIndex: 'ItemUrl',
width:'535px'
minWidth:'535px'
},
{
title: '平台',
@ -78,7 +78,7 @@ export default {
});
},
handleEdit(item){
hyCoreModel.editItem(item).then(res=>{
hyCoreModel.editItem(JSON.stringify( item)).then(res=>{
if(res)
{
this.getDatas()
@ -86,7 +86,7 @@ export default {
})
},
handleDelete(item){
hyCoreModel.deleteItem(item).then(res=>{
hyCoreModel.deleteItem(JSON.stringify( item)).then(res=>{
if(res)
{
this.getDatas()

2
客户端/齐越慧眼/齐越慧眼/vuepage/dist/js/app.js

File diff suppressed because one or more lines are too long

2
客户端/齐越慧眼/齐越慧眼/vuepage/dist/js/app.js.map

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save