|
@@ -1,91 +1,144 @@
|
|
|
#set(title="样机报表")
|
|
|
#@header()
|
|
|
<style>
|
|
|
- .sm6{float: left;width: 70%;}
|
|
|
- .sm4{float: left;width: 30%;height: 400px;overflow-y: scroll}
|
|
|
- .items{padding: 8px;border-bottom: 1px solid #e9ebed;color: #545555}
|
|
|
- .item{padding-top: 10px}
|
|
|
- .s1{padding-right: 10px}
|
|
|
- .bh{color: #2D93CA}
|
|
|
- .before{color: #878787;padding-left: 10px}
|
|
|
- .time{font-size: 14px;color: #878787}
|
|
|
- .av{background-color: aliceblue;padding: 7px 0px 7px 7px;color: #545555}
|
|
|
- .av span{padding-left: 10px}
|
|
|
+ .sm6{float: left;width: 73%;}
|
|
|
+ .sm4{float: left;width: 27%;}
|
|
|
+ .mains{padding: 5px;margin-top: -15px;}
|
|
|
+ .box{background-color: white;width: 100%;height: 350px;border-radius: 3px;margin-bottom: 10px;}
|
|
|
+ .iframe1{width: 100%;height: 400px;border: 0px;}
|
|
|
+ .iframe2{width: 100%;height: 710px;border: 0px;}
|
|
|
+ .table{width: 100%;height:340px!important; position: relative;overflow-y: auto;}
|
|
|
</style>
|
|
|
<body>
|
|
|
<div id="app" v-cloak>
|
|
|
- <div class="row">
|
|
|
- <div class="sm6">
|
|
|
- <iframe src="#(path)/" style="width: 100%;height: 400px;"></iframe>
|
|
|
- </div>
|
|
|
- <div class="sm4">
|
|
|
- <div v-for="(item, index) in list" :key="index" class="bg">
|
|
|
- <div v-for="(i, index) in item.times" class="av">
|
|
|
- {{item.ITEM_VERSION}}:
|
|
|
- {{i.ITEM_WT_NUM}}:
|
|
|
- {{i.ITEM_TITLE}}
|
|
|
- <span class="s1 bh">{{i.TYPE}}</span>
|
|
|
- <span class="s1 time">{{i.CREATED}}</span>
|
|
|
- </div>
|
|
|
- <div v-for="(a, index) in item.children" class="items">
|
|
|
- {{item.ITEM_VERSION}}: {{a.ITEM_PKY}} <span class="s1 before">原记录</span>
|
|
|
- <div v-for="(b, index) in a.ITEM_TLOG">
|
|
|
- <div v-if="b.ITEM_NAME" class="item">
|
|
|
- <span>{{item.ITEM_VERSION}}:</span>
|
|
|
- <span class="s1">{{a.ITEM_PKY}}{{b.ITEM_NAME}}</span>
|
|
|
- <span class="s1 bh">变更</span>
|
|
|
- <span class="s1 time">{{b.DAY}}</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <div class="row">
|
|
|
+ <el-form :inline="true" label-width="auto">
|
|
|
+ <el-form-item label="样机选择">
|
|
|
+ <el-input placeholder="请输入样机名称" v-model="param.ITEM_NAME" clearable></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="样机选择" clearable>
|
|
|
+ <el-input placeholder="请输入样机序列号" v-model="param.ITEM_XL_NUM" clearable></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" icon="el-icon-search" @click="search()">搜索</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div class="sm6">
|
|
|
+ <div class="mains">
|
|
|
+ <!--样机-->
|
|
|
+ <div class="box" v-loading="loading" style="height: 400px">
|
|
|
+ <iframe id="yj" :src="'#(path)/index?bh='+param.ITEM_KEY+ '&table=TLK_MYJCS&look=true'" class="iframe1" v-if="param.ITEM_KEY"></iframe>
|
|
|
+ </div>
|
|
|
+ <div style="margin-top:20px;margin-left: -5px;margin-right: -5px">
|
|
|
+ <div class="sm4">
|
|
|
+ <div class="mains">
|
|
|
+ <!--委托单-->
|
|
|
+ <div class="box">
|
|
|
+ <el-table :data="tableData" class="table" :key="key" v-loading="loading" @row-click="select" v-if="param.ITEM_KEY">
|
|
|
+ <el-table-column width="35" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-checkbox :checked="scope.row.check"></el-checkbox>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="ITEM_WT_NUM" align="center" label="委托单号"></el-table-column>
|
|
|
+ <el-table-column prop="ITEM_NAME" align="center" label="样机名称"></el-table-column>
|
|
|
+ <template slot="empty">
|
|
|
+ <el-empty :image-size="100"></el-empty>
|
|
|
+ </template>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="sm6">
|
|
|
+ <div class="mains">
|
|
|
+ <!--委托单联动-->
|
|
|
+ <div class="box">
|
|
|
+ <el-table :data="tableData2"class="table" v-loading="loading2" v-if="param.ITEM_WT_NUM">
|
|
|
+ <el-table-column prop="ITEM_TEST_NAME" align="center" label="检测项名称"></el-table-column>
|
|
|
+ <el-table-column prop="ITEM_PRO_NUM" align="center" label="样机名称"></el-table-column>
|
|
|
+ <el-table-column prop="ITEM_SJ_VALUE" align="center" label="设计参数"></el-table-column>
|
|
|
+ <el-table-column prop="ITEM_PRO_TYPE" align="center" label="产品线"></el-table-column>
|
|
|
+ <el-table-column prop="ITEM_VALUE" align="center" label="结果值"></el-table-column>
|
|
|
+ <template slot="empty">
|
|
|
+ <el-empty :image-size="100"></el-empty>
|
|
|
+ </template>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="sm4">
|
|
|
+ <div class="mains">
|
|
|
+ <div class="box" style="height: 760px;">
|
|
|
+ <iframe :src="'#(path)/report?op=time&time_name='+param.name+ '&ITEM_XL_NUM='+param.ITEM_XL_NUM+' &look=true'" class="iframe2" v-if="param.ITEM_KEY"></iframe>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</body>
|
|
|
<script src="#(path)/static/js/jquery.min.js"></script>
|
|
|
<script src="#(path)/static/js/layer/layer.js"></script>
|
|
|
<script src="#(path)/static/js/vue.js"></script>
|
|
|
<script src="#(path)/static/js/common.js"></script>
|
|
|
-<script src="#(path)/static/js/echarts.min.js"></script>
|
|
|
<script src="#(path)/static/js/element-ui.js"></script>
|
|
|
<script>
|
|
|
- let myChart = null;
|
|
|
let vm = new Vue({
|
|
|
el: "#app",
|
|
|
data: {
|
|
|
- dialogVisible: false,
|
|
|
- list: [],
|
|
|
+ loading: false,
|
|
|
+ loading2: false,
|
|
|
param: {
|
|
|
- time_name:'#(time_name)',
|
|
|
+ ITEM_NAME: 'CLG923FCR',
|
|
|
+ ITEM_XL_NUM: '',
|
|
|
+ time_name: '#(time_name)',
|
|
|
DOMAINID: '#(DOMAINID)',
|
|
|
- ID: '#(ID)',
|
|
|
- value: ['#(value)'],
|
|
|
- begin: '#(begin)',
|
|
|
- end: '#(end)',
|
|
|
- created: ['#(begin)', '#(end)'],
|
|
|
+ ID: '#(ID)'
|
|
|
},
|
|
|
+ key: true, //解决el-table 表体数据发生变化时,未重新渲染问题
|
|
|
+ tableData: [], //委托单
|
|
|
+ tableData2: [] //委托单联动
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.getData();
|
|
|
+ //this.getData();
|
|
|
},
|
|
|
methods: {
|
|
|
- handleChange(value) {
|
|
|
- this.param.ID = value[value.length - 1]
|
|
|
- },
|
|
|
search() {
|
|
|
+ this.param.name=this.param.ITEM_NAME;
|
|
|
this.getData();
|
|
|
},
|
|
|
getData() {
|
|
|
- sendAjax("#(path)/report/time", this.param, res => {
|
|
|
+ vm.loading = true;
|
|
|
+ sendAjax("#(path)/report/getYj", this.param, res => {
|
|
|
+ cancelLoding();
|
|
|
+ //vm.param.time = res.time;
|
|
|
+ if( res.yj.ITEM_KEY){
|
|
|
+ vm.param.ITEM_KEY = res.yj.ITEM_KEY;
|
|
|
+ }
|
|
|
+ vm.tableData = res.wtd;
|
|
|
+ setTimeout(() => {
|
|
|
+ vm.loading = false;
|
|
|
+ }, 1000);
|
|
|
+ vm.$forceUpdate();
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //委托单联动
|
|
|
+ select(row) {
|
|
|
+ vm.loading2 = true;
|
|
|
+ this.tableData.forEach(item => {
|
|
|
+ item.check = false;
|
|
|
+ });
|
|
|
+ row.check = true;
|
|
|
+ this.key = !this.key;
|
|
|
+ this.param.ITEM_WT_NUM=row.ITEM_WT_NUM;
|
|
|
+ this.param.ITEM_PRO_NUM=vm.param.ITEM_NAME;
|
|
|
+ sendAjax("#(path)/report/getWtd", this.param, res => {
|
|
|
cancelLoding();
|
|
|
- vm.param.time = res.time;
|
|
|
- vm.list=res.data;
|
|
|
- vm.list.forEach(item=>{
|
|
|
- item.children.forEach(item=>{
|
|
|
- item.ITEM_TLOG=JSON.parse(item.ITEM_TLOG);
|
|
|
- })
|
|
|
- })
|
|
|
+ vm.tableData2 = res.data;
|
|
|
+ vm.loading2 = false;
|
|
|
+ vm.$forceUpdate();
|
|
|
})
|
|
|
}
|
|
|
}
|