Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tianjin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
徐来柯
tianjin
Commits
a53f803d
Commit
a53f803d
authored
Jan 29, 2021
by
tao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
质量模块修复bug
parent
c4e149ef
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
5 deletions
+44
-5
cpk.vue
src/views/cpk/cpk.vue
+44
-5
No files found.
src/views/cpk/cpk.vue
View file @
a53f803d
...
...
@@ -3,7 +3,7 @@
* @since: 2019-11-08 15:00:48
* @Author: jawnwa22
* @LastEditors: Tao
* @LastEditTime: 202
0-08-28 11:02:10
* @LastEditTime: 202
1-01-29 13:50:21
-->
<
template
>
<div
class=
"tapwater"
v-loading=
"this.$store.state.isShow"
...
...
@@ -68,7 +68,7 @@
stripe
ref=
"multipleTable"
border
:header-cell-style=
"
[
{background:(($store.state.color=='grey')?'#D9DBDE':'#5a6c98')},{color:(($store.state.color=='grey')?'#000':'#fff')}, {'border-left':'1px solid #cccccc',height:'50px',padding:'0'}]
"
:header-cell-style=
"
{background:($store.state.color=='grey')?'#D9DBDE':'#5a6c98',color:($store.state.color=='grey')?'#000':'#fff','border-left':'1px solid #cccccc',height:'50px',padding:'0'}
"
@row-click="handleRowChange1"
@cell-mouse-leave="leave"
@cell-dblclick="twoclick"
...
...
@@ -243,7 +243,7 @@ export default {
//表格导入
var
that
=
this
;
const
files
=
e
.
target
.
files
;
console
.
log
(
files
);
if
(
files
.
length
<=
0
)
{
//如果没有文件名
return
false
;
...
...
@@ -253,17 +253,40 @@ export default {
}
const
fileReader
=
new
FileReader
();
fileReader
.
onload
=
ev
=>
{
try
{
const
data
=
ev
.
target
.
result
;
const
workbook
=
XLSX
.
read
(
data
,
{
type
:
'binary'
});
console
.
log
(
workbook
)
const
wsname
=
workbook
.
SheetNames
[
0
];
//取第一张表
const
ws
=
XLSX
.
utils
.
sheet_to_json
(
workbook
.
Sheets
[
wsname
]
);
//生成json表格内容
console
.
log
(
workbook
);
let
timearr
=
[]
console
.
log
(
ws
)
ws
.
forEach
((
item
)
=>
{
timearr
.
push
(
item
.
记录时间
)
})
console
.
log
(
"sj"
,
timearr
)
// this.$axios({
// method:'POST',
// url:'/api/QualityManage/verificationtime',
// data:timearr
// }).then(res=>{
// console.log(res)
// if(res.data.code!==0){
// this.tipchange1 = true;
// this.pdyd3 = true;
// this.w = res.data.msg;
// }else{
let
b
=
0
;
for
(
b
in
workbook
.
Strings
)
{
if
(
!
workbook
.
Strings
[
0
].
t
==
'序号'
)
{
...
...
@@ -290,6 +313,9 @@ export default {
// ws[a].array = null;
// }
}
let
a1
=
parseInt
(
this
.
data
.
PrSampleNumber
);
console
.
log
(
"this"
,
this
.
data
)
if
(
ws
.
length
%
this
.
data
.
PrSampleNumber
!==
0
)
{
...
...
@@ -297,7 +323,8 @@ export default {
this
.
pdyd3
=
true
;
this
.
ccc
=
true
;
this
.
w
=
`导入的样本总数不是样本容量的整数倍,请修改样本表重新导入`
;
}
else
{
}
else
{
let
a3
=
0
;
for
(
a3
=
0
;
a3
<
ws
.
length
;
a3
++
){
let
a4
=
a3
+
1
;
...
...
@@ -410,7 +437,11 @@ export default {
that
.
outputs
.
push
(
sheetData
);
}
this
.
$refs
.
upload
.
value
=
''
;
// }
// })
}
catch
(
e
)
{
console
.
log
(
e
)
return
false
;
}
};
...
...
@@ -587,6 +618,7 @@ export default {
url
:
'/api/QualityManage/samplefromlist'
,
data
:
this
.
wanttable
,
}).
then
(
res1
=>
{
console
.
log
(
"网页"
,
res1
)
if
(
res1
.
data
.
code
==
0
)
{
let
aa
=
JSON
.
stringify
(
res1
.
data
.
data
);
let
bb
=
JSON
.
stringify
(
this
.
data
);
...
...
@@ -623,6 +655,7 @@ export default {
url
:
'/api/QualityManage/samplefromlist'
,
data
:
this
.
wanttable
,
}).
then
(
res1
=>
{
console
.
log
(
"网页"
,
res1
)
if
(
res1
.
data
.
code
==
0
)
{
let
aa
=
JSON
.
stringify
(
res1
.
data
.
data
);
let
bb
=
JSON
.
stringify
(
this
.
data
);
...
...
@@ -928,7 +961,9 @@ export default {
event
.
currentTarget
.
style
.
cursor
=
'move'
;
},
exportTable
()
{
var
s
=
JSON
.
stringify
(
this
.
tabledata1
)
require
.
ensure
([],
()
=>
{
const
{
export_json_to_excel
}
=
require
(
'../../vendor/Export2Excel'
);
...
...
@@ -1715,6 +1750,7 @@ export default {
}
this
.
json2excel
(
this
.
excelDatas
,
'质量管理'
,
true
,
'xlsx'
);
this
.
tabledata1
=
JSON
.
parse
(
s
)
});
},
json2excel
(
tableJson
,
filenames
,
autowidth
,
bookTypes
)
{
...
...
@@ -2012,6 +2048,7 @@ export default {
}
}
else
{
if
(
this
.
$store
.
state
.
a
.
data
){
if
(
this
.
$store
.
state
.
a
.
data
.
length
!==
0
){
this
.
value1
=
this
.
$store
.
state
.
a
.
starttime
;
this
.
value2
=
this
.
$store
.
state
.
a
.
endtime
;
...
...
@@ -2084,6 +2121,8 @@ export default {
}
}
}
},
};
</
script
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment