安排合成
当前为
此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.cn-greasyfork.org/scripts/471357/1408387/213-%E5%AE%89%E6%8E%92%E5%90%88%E6%88%90.js
function 安排合成(src){
console.log('新的安排合成界面')
var local_李楠和达尔文生物改变颜色=localStorage.getItem('李楠和达尔文生物改变颜色');
var local_圆稀赠引物标签加姓名=localStorage.getItem('圆稀赠引物标签加姓名');
var html=$('iframe[src="'+src+'"]')//页面
html=html.contents().find('body').eq(0)
var toolbar=html.find('.toolbar').eq(0) // 找到了toolbar工具栏
//添加toolbar工具栏按钮
添加toolbar按钮(html)
//添加toolbar工具栏按钮
function 添加toolbar按钮(html){
if (toolbar.find('.weiyiyici').length==0){
//添加标记
toolbar.addClass('weiyiyici')
if (local_李楠和达尔文生物改变颜色=='true'){
安排合成_李楠和达尔文生物_颜色()
}
if(local_圆稀赠引物标签加姓名=='true'){
标签打印按钮=toolbar.find('#a_seq_lable_pr').eq(0)
//点击标签打印按钮
标签打印按钮.click(function(){
安排合成_圆稀赠引物标签加姓名(html)
})
}
}
}
//安排合成_李楠和达尔文生物_颜色
function 安排合成_李楠和达尔文生物_颜色(){
//==============================当table出现数据改变的时候=================================
// 观察器的配置(需要观察什么变动)
var config = {attributes: true}; //, childList: true, subtree: true,characterData:true,characterDataOldValue:true,attributDataOldValue:true
var table变化 = function(mutationRecoard, observer) {
//会有两次变化 根据最终的变化
if ($(html).find('#load_list').css('display')=='none'){
html.find('table').find('tr').each(function(){
课题组信息=$(this).find('[aria-describedby=list_syno_ketizu]')
课题组=课题组信息.text()
if(课题组==="李楠"){
//设置背景颜色
$(this).find('td').attr('Bgcolor','#FF7034')
}
if(课题组==="达尔文生物"){
//设置背景颜色
$(this).find('td').attr('Bgcolor','#C80000')
}
})
}
};
var observer = new MutationObserver(table变化);
// 以上述配置开始观察目标节点
dom=$(html).find('#load_list').get(0)
observer.observe(dom, config);
}
//安排合成_圆稀赠引物标签加姓名
function 安排合成_圆稀赠引物标签加姓名(html){
//弹框加个按钮
$('#uiform').find('#txt_syn_plate').parent().append('<button id="button_addName" onclick="return false">顶部标签加姓名</button>')
//点击按钮
$('#uiform').find('#button_addName').click(function(){
安排合成_圆稀赠引物标签加姓名_详细代码()
})
}
function 安排合成_圆稀赠引物标签加姓名_详细代码(html){
板号=$('#uiform').find('#txt_syn_plate').val()
$.get('/syn/ashx/SynSampleHandler.ashx?_search=true&nd=1720597763777&rows=200&page=1&sidx=syn_s_num&sord=desc&filters={"groupOp":"AND","rules":[{"field":"syn_s_palte","op":"eq","data":"RA8124"}]}',function(data){
console.log(data)
客户名_arr=文本_取中间文本_批量(data,'"cust_name":"','","')
console.log(客户名_arr)
});
// $.get("/syn/xmldata/xmlSynYuangLabelReport.aspx?plate="+板号+"&style=xishi&is_normal=5Nmol",function(data){
// console.log(data)
// });
}
}